Re: Wrong provolatile value for to_timestamp (1 argument)

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Wrong provolatile value for to_timestamp (1 argument)
Date: 2022-07-05 08:44:44
Message-ID: a8257d0918c69de24f4c87a1e9637c32c8cc602e.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2022-07-05 at 17:29 +0900, Tatsuo Ishii wrote:
> I found that provolatile attribute of to_timestamp in pg_proc is
> wrong:
>
> test=# select provolatile, proargtypes from pg_proc where proname = 'to_timestamp' and proargtypes[0] = 701;
>  provolatile | proargtypes
> -------------+-------------
>  i           | 701
> (1 row)
>
> 'i' (immutable) is clearly wrong s

Are you sure? I'd say that "to_timestamp(double precision)" always
produces the same timestamp for the same argument. What changes with
the setting of "timezone" is how that timestamp is converted to a
string, but that's a different affair.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2022-07-05 08:49:14 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Peter Smith 2022-07-05 08:41:51 Re: logical replication restrictions