Re: In 7.4 ensure you have DEFAULT now () with no spaces - Mailing list pgsql-sql

From Tom Lane
Subject Re: In 7.4 ensure you have DEFAULT now () with no spaces
Date
Msg-id 17939.1087671023@sss.pgh.pa.us
Whole thread Raw
In response to Re: In 7.4 ensure you have DEFAULT now () with no spaces  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Peter Eisentraut <peter_e@gmx.net> writes:
> David B wrote:
>> Looking at those tables the create DDL's for those few tables
>> contained now ()
>> as in:
>> 
>> created_timestamp  timestamp DEFAULT now ()   -- note the space
>> between now and ()

> Whatever it was, that was not the problem.  With 7.4.1:

Nope.  I suppose this was a garbled report of the problem withdefault 'now'
as opposed todefault now()

The timestamp input parser will take 'now()' and variants on that,
since it basically ignores punctuation.  So probably what was really
at stake wasdefault 'now()'
(wrong because a string literal) versusdefault now()
(correct because a function call).
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql - Insert from a record variable?
Next
From: "Pankaj Chugh"
Date:
Subject: Number of rows effected