calculated default

Поиск
Список
Период
Сортировка
От SunWuKung
Тема calculated default
Дата
Msg-id 1163666888.533735.163930@m73g2000cwd.googlegroups.com
обсуждение исходный текст
Ответы Re: calculated default
Re: calculated default
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Recovering deleted or updated rows
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: ORDER BY