Stupid question about default time value - Mailing list pgsql-sql

From Nikolay Mijaylov
Subject Stupid question about default time value
Date
Msg-id 001001becc3f$7e2962c0$ce2a18c3@skillbrokers.bg
Whole thread Raw
Responses Re: [SQL] Stupid question about default time value  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Philip Warner
Date:
Subject: Re: [HACKERS] accumulated statistics
Next
From: John Bowden
Date:
Subject: SQL: Getting table structure