Re: In 7.4 ensure you have DEFAULT now () with no spaces

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: In 7.4 ensure you have DEFAULT now () with no spaces
Дата
Msg-id 17939.1087671023@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: In 7.4 ensure you have DEFAULT now () with no spaces  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql - Insert from a record variable?
Следующее
От: "Pankaj Chugh"
Дата:
Сообщение: Number of rows effected