From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | deedham(at)pbo(dot)net |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Bad timestamp 7.1->7.2 |
Date: | 2002-02-22 17:49:10 |
Message-ID: | 17922.1014400150@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Doug Needham <dneedham(at)pbo(dot)net> writes:
> I created a database on postgres 7.1
> one of the fields was defined with a default of :
> 'select now()::"timestamp"
> When I try to create this table under 7.2 it fails.
Hmm, looks fine to me:
regression=# create table foobar (f1 timestamp default now()::"timestamp");
CREATE
regression=# insert into foobar default values;
INSERT 401822 1
regression=# select * from foobar;
f1
-------------------------------
2002-02-22 12:45:39.189714-05
(1 row)
Could you be more exact in your description of what you entered and what
problem you saw?
Personally I'd just say "default now()", or "default current_timestamp"
if I wanted to be SQL92-correct, but the cast should be okay too.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2002-02-22 17:50:21 | Re: Builded Postgresql 7.2 for Redhat 7.1 |
Previous Message | Stephan Szabo | 2002-02-22 16:17:11 | Re: Client Authentication |