Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2EACF475A9E for ; Fri, 22 Feb 2002 12:49:11 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g1MHnBS17925; Fri, 22 Feb 2002 12:49:11 -0500 (EST) To: deedham@pbo.net Cc: pgsql-admin@postgresql.org Subject: Re: Bad timestamp 7.1->7.2 In-reply-to: <200202221553.g1MFrbb30865@pbo.net> References: <200202221553.g1MFrbb30865@pbo.net> Comments: In-reply-to Doug Needham message dated "Fri, 22 Feb 2002 09:43:46 -0500" Date: Fri, 22 Feb 2002 12:49:10 -0500 Message-ID: <17922.1014400150@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200202/301 X-Sequence-Number: 3454 Doug Needham 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