On Update (trigger hint)

From: MaRCeLO PeReiRA <gandalf_mp(at)yahoo(dot)com(dot)br>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: On Update (trigger hint)
Date: 2004-02-27 16:50:22
Message-ID: 20040227165022.81353.qmail@web20210.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

Please, give me some advices on how to do the
following:

I have the following table:

CREATE TABLE products (
id SERIAL,
description TEXT,
lastupdate date
);

Well, I would like to update the column "lastupdate"
with the value "now()" on every UPDATE executed on a
row of this table.

Do I have to create a function to do it? Can you help
me?

Regards,

Marcelo

______________________________________________________________________

Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
http://br.yahoo.com/info/mail.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 2004-02-27 16:53:13 Re: field must appear in the GROUP BY clause or be used
Previous Message John Sidney-Woollett 2004-02-27 16:46:30 Re: field must appear in the GROUP BY clause or be used