table foobar { [...] created datetime NOT NULL DEFAULT x
}
I want to put the current transaction time into
"created" when inserting into the table. After reading the manual
I've tried the following combinations for x:
'now'
''now''
(''now'')
('now')
datetime('now')
datetime(''now'')
datetime('now'::abstime)
'now'::datetime
('now'::datetime)
And perhaps some more I forgot. The only one not resulting in an
syntax error when creating the table is 'now'. But using simply 'now'
gives a strange result:
When I insert the first tuple the datetime-value is okay.
But when I insert further tuples they get the same datetime-value
as the first inserted tuple.
--
Martin Neumann
mne@mne.de
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.