Re: Trigger question

From: Dave Wedwick <news(at)wedwick(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Trigger question
Date: 2001-02-14 15:06:29
Message-ID: 3A8A9EF5.8C8929C@wedwick.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

One person suggested setting now() as default.

That would work sometimes, but I have a situation where the user program is
updating the default field with 0. now() never gets into the field.

So, regardless of what the user enters, I want now() to be updated, and I
guess it would be via a trigger...

Thanks!

Dave Wedwick wrote:

> Hi!
>
> I have a table with an int4 field called inserttime. Regardless of what
> the user enters in this field, I want a trigger to put now() into it.
>
> What's the syntax for the trigger?
>
> Thanks!

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2001-02-14 15:19:47 Re: createuser problem
Previous Message Frank Joerdens 2001-02-14 13:01:09 displaying constraints