From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | James Coleman <jtc331(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Should we document how column DEFAULT expressions work? |
Date: | 2024-06-26 23:14:57 |
Message-ID: | CAKFQuwZ33QTgBw9P1MbZyn7gim_MopJFg0qJSpnvSsVcMXte+Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tuesday, June 25, 2024, James Coleman <jtc331(at)gmail(dot)com> wrote:
> Hello,
>
> It's possible I'm the only one who's been in this situation, but I've
> multiple times found myself explaining to a user how column DEFAULT
> expressions work: namely how the quoting on an expression following
> the keyword DEFAULT controls whether or not the expression is
> evaluated at the time of the DDL statement or at the time of an
> insertion.
>
I don’t know if it’s worth documenting but the following sentence is
implied by the syntax:
“Do not single quote the expression as a whole. Write the expression as
you would in a select query.”
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2024-06-26 23:19:38 | Re: Should we document how column DEFAULT expressions work? |
Previous Message | David Rowley | 2024-06-26 22:58:35 | Re: Should we document how column DEFAULT expressions work? |