Re: How do I make a timestamp column default to current time
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: How do I make a timestamp column default to current time |
| Дата | |
| Msg-id | 19937.1142541405@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: How do I make a timestamp column default to current time ("John D. Burger" <john@mitre.org>) |
| Ответы |
Re: How do I make a timestamp column default to current time
|
| Список | pgsql-general |
"John D. Burger" <john@mitre.org> writes:
>> mycol timestamp default now()
>> or
>> mycol timestamp default current_timestamp
> And both of these return start time of the current transaction, yes?
> Is it the case that there is no SQL-standard way to get the current
> time?
AFAIK the spec doesn't really define the meaning of current_timestamp
all that closely. I believe there's a patch in the queue to add some
additional nonstandard functions for current time and start of current
interactive command, though.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера