"mike" <matrix@vianet.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#&%!@bar'::date;
regards, tom lane