Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str() - Mailing list pgsql-bugs

From Keith Fiske
Subject Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str()
Date
Msg-id CAG1_KcA-RuEWO6BmmfXVGLj66ig437Cj2c8nc0UpwrhEL5PxHQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str()  (Marko Tiikkaja <marko@joh.to>)
List pgsql-bugs
On Tue, Sep 13, 2016 at 4:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Keith Fiske <keith@omniti.com> writes:
> > Ok, this may be more of an actual issue than I thought. It seems that,
> even
> > if all variables to the timestamptz_to_str() function have a valid value
> > set, if it is called multiple times in the same statement, it keeps the
> > first value for all following occurrences.
>
> What is current_partition_timestamp?  Is it coming from the transaction
> timestamp?  That doesn't change intra-statement ...
>
>                         regards, tom lane
>

No, it's obtained elsewhere by querying the current max timestamp value
from the partition set.
Shouldn't matter if it was, though. You can see that all it takes to change
the string output of the timestamp is swapping the values around. The
values of the variables are the same in either case.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str()
Next
From: Marko Tiikkaja
Date:
Subject: Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str()