From: Tom Lane <tgl@sss.pgh.pa.us>
To: mjfshark@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
Date: Thu, 11 Mar 2021 09:52:02 -0500
Message-ID: <2290615.1615474322@sss.pgh.pa.us> (raw)
In-Reply-To: <16923-02bede34869fc819@postgresql.org>
References: <16923-02bede34869fc819@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Using libpq.dll and requesting a result set in binary format. Timestamptz
> results are returned in UTC timezone instead of the current session's
> timezone setting. Note that in text format the timestamptz is returned
> properly converted. Also note that Timetz results are converted correctly
> regardless of the result set format (binary or text.)
A quick look at timestamptz_send and timetz_send shows that they both just
send the internal representation; there isn't any intent to do any sort
of timezone adjustment. Even if there were some reason to argue that this
is wrong, the behavior is of sufficiently long standing that I doubt we
could change it.
> The documentation seems to state that Timestamptz fields will be returned
> converted to the currently set timezone session property and doesn't mention
> the above behavior.
Since, in general, we don't document binary representations in any detail,
I doubt that there is any such statement made intentionally. Text output
behaves that way, for sure, but if you see something claiming that it also
happens for binary output then we need to tweak the docs.
regards, tom lane
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: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mjfshark@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
In-Reply-To: <2290615.1615474322@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox