From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "mike" <matrix(at)vianet(dot)ca> |
Cc: | "PostgreSQL Mailing Lists-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: default modifiers for 7.2b4 |
Date: | 2001-12-23 01:56:09 |
Message-ID: | 19661.1009072569@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
"mike" <matrix(at)vianet(dot)ca> writes:
> create table news(
> id serial,
> date date DEFAULT 'select now()::date' NOT NULL,
> topic varchar(256),
> body text
> );
[ goggles ]
> the above query results in ERROR: Bad date external representation 'select=
> now()::date', yet if I use this on a production 7.1.2 machine it works fin=
> e.
Apparently the 7.1.* date parser was rather more forgiving than it
should have been. You might care to contemplate the difference between
select 'now'::date;
and
select 'select now()::date'::date;
or just to make it crystal clear,
select 'foo now#&%!(at)bar'::date;
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-12-23 05:42:46 | Re: default modifiers for 7.2b4 |
Previous Message | mike | 2001-12-23 01:25:57 | default modifiers for 7.2b4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-12-23 05:42:46 | Re: default modifiers for 7.2b4 |
Previous Message | Tom Lane | 2001-12-23 01:45:23 | Re: Possible bug in vacuum redo |