pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedBad timestamp 7.1->7.2
2+ messages / 2 participants
[nested] [flat]
* Bad timestamp 7.1->7.2
@ 2002-02-22 14:43 Doug Needham <dneedham@pbo.net>
0 siblings, 1 reply; 2+ messages in thread
From: Doug Needham @ 2002-02-22 14:43 UTC (permalink / raw)
To: pgsql-admin
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.
Is there a new way to do timestamping of records?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Bad timestamp 7.1->7.2
@ 2002-02-22 17:49 Tom Lane <tgl@sss.pgh.pa.us>
parent: Doug Needham <dneedham@pbo.net>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2002-02-22 17:49 UTC (permalink / raw)
To: deedham@pbo.net; +Cc: pgsql-admin
Doug Needham <dneedham@pbo.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-02-22 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-22 14:43 Bad timestamp 7.1->7.2 Doug Needham <dneedham@pbo.net>
2002-02-22 17:49 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox