| От | Christopher J. Bottaro |
|---|---|
| Тема | CURRENT_TIMESTAMP vs actual time |
| Дата | |
| Msg-id | d46k11$6nc$1@sea.gmane.org обсуждение исходный текст |
| Ответы |
Re: CURRENT_TIMESTAMP vs actual time
|
| Список | pgsql-general |
Hi, I understand that CURRENT_TIMESTAMP marks the beginning of the current transaction. I want it to be the actual time. How do I do this? timeofday() returns a string, how do I convert that into a TIMESTAMP? Is it possible to create a column with DEFAULT value evaluated to the actual current time (i.e. not the CURRENT_TIMESTAMP which is the beginning of the current transaction). What I do now to get it to work is do a COMMIT right before the insert, that way CURRENT_TIMESTAMP is (pretty close to) the actual time. ...but that is so crappy and doesn't work if I actually need to use transactional features (i.e. rollback). Thanks for the help, -- C
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера