public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: David Rowley <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: James Coleman <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Should we document how column DEFAULT expressions work?
Date: Sun, 30 Jun 2024 20:08:33 -0700
Message-ID: <CAKFQuwY1XLR4Xfd6TLE4p1Ks=PNKvncTc19i5FfgngG+Pg5-Eg@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvrQ--Mzp00Yn=3SVB=YS_ZB15aeLywaK0n05-adk8WWmw@mail.gmail.com>
References: <CAAaqYe-wQPbchCUE7pocPNEQ3PMY8a98Txmxc7q0+FvXtk1vvg@mail.gmail.com>
<[email protected]>
<CAAaqYe9_RE2WximHuYRpyfU-H2G+W--49e_8GDqS-vHLOzPvmg@mail.gmail.com>
<[email protected]>
<CAKFQuwZkgm0yqHhf05thqu1gzUK__gXBL5tyBuFvKoOe7Dd6=A@mail.gmail.com>
<CAApHDvoiHYxM2VQYZeiF7JAdP7Y0JxEr86NZpUjoZ9AA4cpzYw@mail.gmail.com>
<CAKFQuwbyjn0p5aKz1sKfJHQCTbGy1xhWaNR2xdnXv-X4oPdOGA@mail.gmail.com>
<CAApHDvqShXhOat03iEV1VqXM68DBJ+zM95Ghbu0rcqs8KnhQQQ@mail.gmail.com>
<[email protected]>
<CAApHDvouPRyga3-5ZYLt_RUhU942bk0WPVgro+U=R3cvBRXbeQ@mail.gmail.com>
<[email protected]>
<CAApHDvrURTcDn3GTsmXzm9VqT3acLh=T=aUYMuKrtozw0nq8Tg@mail.gmail.com>
<CAKFQuwbOOQ20=Pb5j-k+Sws22H5W9tnj-vve4MC-GQ9RmmtTxA@mail.gmail.com>
<CAApHDvogKE8RrHx=qmYfvpD_AiVLX14nLvvSrPbFCXWgiYrKxg@mail.gmail.com>
<CAKFQuwZjuQX4H48MbaHZAX3s__LoHgkXsf2Eg--E=qtWFss0bg@mail.gmail.com>
<CAApHDvrQ--Mzp00Yn=3SVB=YS_ZB15aeLywaK0n05-adk8WWmw@mail.gmail.com>
On Sun, Jun 30, 2024 at 7:52 PM David Rowley <[email protected]> wrote:
> On Mon, 1 Jul 2024 at 13:41, David G. Johnston
> <[email protected]> wrote:
> > I presume the relatively new atomic SQL functions pose a similar hazard.
>
> Do you have an example of this?
>
>
create function testnow() returns timestamptz language sql
return 'now'::timestamptz;
select testnow();
select pg_sleep(5);
select testnow(); -- same time as the first call
Which conforms with the documentation and expression parsing rules for
literals:
"This form is parsed at function definition time, the string constant form
is parsed at execution time;..."
David J.
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Should we document how column DEFAULT expressions work?
In-Reply-To: <CAKFQuwY1XLR4Xfd6TLE4p1Ks=PNKvncTc19i5FfgngG+Pg5-Eg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox