Re: Auto Insert date/time

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Auto Insert date/time
Дата
Msg-id 20020408173005.A2600@svana.org
обсуждение исходный текст
Ответ на Auto Insert date/time  (impala <bhnnc@yahoo.co.uk>)
Список pgsql-general
On Sun, Apr 07, 2002 at 11:06:54PM -0700, impala wrote:
> What 'serial' does for auto incrementation of intgers,
> are there something similar in PSQL where the db can
> autoinsert the correct date/time data each time you
> add a new row , without have to specify the code e.g.
> Date() class in a java/C++ file? If well, how do I
> manage to make this work? Is there maybe an PSQL
> function which can do it? AN example will be nice :)

At a guess, you would set the default value of the column to now(). I
beleive this is in the docs somewhere...

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>   http://svana.org/kleptog/
> Ignorance continues to thrive when intelligent people choose to do
> nothing.  Speaking out against censorship and ignorance is the imperative
> of all intelligent people.

В списке pgsql-general по дате отправления:

Предыдущее
От: Bo Lorentsen
Дата:
Сообщение: Re: Inherit or Foreign Keys
Следующее
От: Denis Gasparin
Дата:
Сообщение: Re: binary data storage