Re: Should we document how column DEFAULT expressions work? - Mailing list pgsql-hackers

From David Rowley
Subject Re: Should we document how column DEFAULT expressions work?
Date
Msg-id CAApHDvomTw5i0F3TdvPvjG+4FUiS2pXV1PrVV+mrCOOZM8R4Ww@mail.gmail.com
Whole thread Raw
In response to Re: Should we document how column DEFAULT expressions work?  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
On Wed, 26 Jun 2024 at 11:05, James Coleman <jtc331@gmail.com> wrote:
> Hmm, I guess I'd never considered anything besides cases like
> nextval() and now(), but I see now that now() must also be special
> cased (when quoted) since 'date_trunc(day, now())'::timestamp doesn't
> work but 'now()'::timestamp does.

'now()'::timestamp only works because we ignore trailing punctuation
in ParseDateTime() during timestamp_in(). 'now!!'::timestamp works
equally as well.

David



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: TruncateMultiXact() bugs
Next
From: "David G. Johnston"
Date:
Subject: Re: Should we document how column DEFAULT expressions work?