Re: BUG #16553: now() function marked PARALLEL RESTRICTED whereas transaction_timestamp() is PARALLEL SAFE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gsaviane(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16553: now() function marked PARALLEL RESTRICTED whereas transaction_timestamp() is PARALLEL SAFE
Date: 2020-07-23 14:59:19
Message-ID: 196706.1595516359@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> now() and transaction_timestamp() are described as being equivalent in the
> guide
> https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT.
> However, using now() in a query can screw up a possible parallel plan since
> it's labeled PARALLEL RESTRICTED.

This is fixed in v12 and later, cf

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=07ee62ce9

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2020-07-23 15:26:41 Re: BUG #16550: Problem with pg_service.conf
Previous Message Michał Lis 2020-07-23 14:26:33 Re: BUG #16550: Problem with pg_service.conf