Re: serial data type

Поиск
Список
Период
Сортировка
Искать
От
Joseph Healy
Тема
Re: serial data type
Дата
Msg-id
20040926000133.GB17139@joes
Ответ на
Re: serial data type (Tom Allison)
Список
Дерево обсуждения
serial data type Tom Allison <tallison@tacocat.net>
Re: serial data type Doug McNaught <doug@mcnaught.org>
Re: serial data type Tom Allison <tallison@tacocat.net>
Re: serial data type Joseph Healy <joe_healy@dodo.com.au>
Re: serial data type Doug McNaught <doug@mcnaught.org>
Re: serial data type Tom Allison <tallison@tacocat.net>
Re: serial data type Doug McNaught <doug@mcnaught.org>
On Sat, Sep 25, 2004 at 07:20:23PM -0400, Tom Allison wrote:
>
> Any idea how to set up a timestamp=now on every insert/update ?

when you create your table, use:

create table mytable (
        id serial primary key,
	updated timestamp default(now()),
	mydata int4
);

Joe

В списке pgsql-general по дате отправления
От: gearond@fireserve.net
Дата:
Сообщение: IN or JOIN
От: Doug McNaught
Дата:
Сообщение: Re: serial data type
FAQ