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

From Bruce Momjian
Subject Re: Should we document how column DEFAULT expressions work?
Date
Msg-id ZohdzuEQ-oaAuUgs@momjian.us
Whole thread Raw
In response to Re: Should we document how column DEFAULT expressions work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Should we document how column DEFAULT expressions work?
Re: Should we document how column DEFAULT expressions work?
List pgsql-hackers
On Fri, Jul  5, 2024 at 04:50:32PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Also interestingly, "now" without quotes requires parentheses to make it
> > a function call:
> 
> I'm not sure why you find that surprising, or why you think that
> 'now()'::timestamptz is a function call.  (Well, it is a call of
> timestamptz_in, but not of the SQL function now().)  Documentation
> that is equally confused won't help any.

Well, 'now()' certainly _looks_ like a function call, though it isn't. 
The fact that 'now()'::timestamptz and 'now'::timestamptz generate
volatile results via a function call was my point.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: First draft of PG 17 release notes
Next
From: Tom Lane
Date:
Subject: Re: Should we document how column DEFAULT expressions work?