Stupid question about default time value

From: "Nikolay Mijaylov" <nmmm(at)nsi(dot)bg>
To: <pgsql-sql(at)postgreSQL(dot)org>
Subject: Stupid question about default time value
Date: 1999-07-12 08:21:02
Message-ID: 001001becc3f$7e2962c0$ce2a18c3@skillbrokers.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message John Bowden 1999-07-12 13:35:53 SQL: Getting table structure
Previous Message Philip Warner 1999-07-12 02:36:24 Re: [HACKERS] accumulated statistics