Stupid question about default time value

Поиск
Список
Период
Сортировка
От Nikolay Mijaylov
Тема Stupid question about default time value
Дата
Msg-id 001001becc3f$7e2962c0$ce2a18c3@skillbrokers.bg
обсуждение исходный текст
Ответы Re: [SQL] Stupid question about default time value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I made a table such as:

create teble x(
i int2,
d date default 'today',
t time default 'now',
dt datetime default 'now'
);

So these default values are not working as i think... they make the default
values to be equal to time when table was created....



i fixed problem in this way:
create teble x(
i int2,
d date default date( now() ),                             // or now() ::
date
t time default datetime_time(datetime (now ()) ),
dt datetime default now()
);

is there better way to do this?????

Niki
w3.nsi.bg/nmmm
www.nsi.bg/nmmm
nmmm.hypermart.net

?????
thanx



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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: [HACKERS] accumulated statistics
Следующее
От: John Bowden
Дата:
Сообщение: SQL: Getting table structure