| От | Petter Reinholdtsen |
|---|---|
| Тема | Problems with default date 'now' |
| Дата | |
| Msg-id | 199806091619.SAA10905@sleeper.games.no обсуждение исходный текст |
| Ответы |
Re: [SQL] Problems with default date 'now'
|
| Список | pgsql-sql |
I have a table where I want the default value of a date field to be
todays date when I do insert. I have this table definition:
CREATE TABLE testdate(
received date DEFAULT 'now',
info text NOT NULL
);
The problem is that the 'now' apparently is substituted when I create
the table, not when I insert into it. Is there another way to handle
this? This is on Linux RedHat 5.0 with PostgreSQL 6.2.1.
Please remember to send replies to me (too), as I am not member on
this mailing-list.
Happy hacking,
--
##> Petter Reinholdtsen <## | pere@td.org.uit.no
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера