Search Postgresql Archives

calculated default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux