Re: Should we document how column DEFAULT expressions work?

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should we document how column DEFAULT expressions work?
Date: 2024-06-26 22:58:35
Message-ID: CAApHDvomTw5i0F3TdvPvjG+4FUiS2pXV1PrVV+mrCOOZM8R4Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 26 Jun 2024 at 11:05, James Coleman <jtc331(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2024-06-26 23:14:57 Re: Should we document how column DEFAULT expressions work?
Previous Message Heikki Linnakangas 2024-06-26 20:55:40 Re: TruncateMultiXact() bugs