calculated default - Mailing list pgsql-general

From SunWuKung
Subject calculated default
Date
Msg-id 1163666888.533735.163930@m73g2000cwd.googlegroups.com
Whole thread Raw
Responses Re: calculated default
Re: calculated default
List pgsql-general
I have a table with a sequence as its primary key.
On insert I would like to have all its fields (except the primary key)
default to the last one in the table (order by id desc limit 1).
I guess I should use a trigger to do this but I don't know how.

Thanks for the help.
SWK


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Recovering deleted or updated rows
Next
From: Alban Hertroys
Date:
Subject: Re: ORDER BY