Re: on update set default - Mailing list pgsql-general

From Doug McNaught
Subject Re: on update set default
Date
Msg-id m31yi475kt.fsf@belphigor.mcnaught.org
Whole thread Raw
In response to on update set default  ("Ben-Nes Michael" <miki@canaan.co.il>)
Responses Re: on update set default
List pgsql-general
"Ben-Nes Michael" <miki@canaan.co.il> writes:

> Hi All
>
> Im want that on each insert, update to a table the column:
> changed_on TIMESTAMP DEFAULT now()
> will be set to now();
>
> any one can hint me ?
> I tried few rulles and triggers for hours with no luck :(

An AFTER trigger to do this should be pretty easy.  Why don't you post
what you've tried and we'll see where you went wrong?

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: "Ben-Nes Michael"
Date:
Subject: on update set default
Next
From: Francisco Reyes
Date:
Subject: Questions about the upcoming 7.2?