On Sun, Jun 30, 2024 at 7:52 PM David Rowley <dgrowle...@gmail.com> wrote:

> On Mon, 1 Jul 2024 at 13:41, David G. Johnston
> <david.g.johns...@gmail.com> 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.

Reply via email to