pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
3+ messages / 3 participants
[nested] [flat]

* BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
@ 2021-03-11 12:54  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 3+ messages in thread

From: PG Bug reporting form @ 2021-03-11 12:54 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: mjfshark@gmail.com

The following bug has been logged on the website:

Bug reference:      16923
Logged by:          Mark Ford
Email address:      mjfshark@gmail.com
PostgreSQL version: 12.3
Operating system:   Windows 10
Description:        

Tested server version 12.3, client versions 10.13 (32bit and 64bit) and
13.2.(64bit)
Issue:
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.)

Expected results:
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.  This combined with timetz fields being converted
regardless of output format seems inconsistent.

Thank you.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
@ 2021-03-11 14:18  Bruce Momjian <bruce@momjian.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2021-03-11 14:18 UTC (permalink / raw)
  To: mjfshark@gmail.com; pgsql-bugs@lists.postgresql.org

On Thu, Mar 11, 2021 at 12:54:11PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      16923
> Logged by:          Mark Ford
> Email address:      mjfshark@gmail.com
> PostgreSQL version: 12.3
> Operating system:   Windows 10
> Description:        
> 
> Tested server version 12.3, client versions 10.13 (32bit and 64bit) and
> 13.2.(64bit)
> Issue:
> 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.)
> 
> Expected results:
> 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.  This combined with timetz fields being converted
> regardless of output format seems inconsistent.

I think you need to show us the commands you ran, and their output.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16923: Timestamptz always returns utc time when resultformat is in binary format.
@ 2021-03-11 14:52  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2021-03-11 14:52 UTC (permalink / raw)
  To: mjfshark@gmail.com; +Cc: pgsql-bugs@lists.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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-03-11 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 12:54 BUG #16923: Timestamptz always returns utc time when resultformat is in binary format. PG Bug reporting form <noreply@postgresql.org>
2021-03-11 14:18 ` Bruce Momjian <bruce@momjian.us>
2021-03-11 14:52 ` Tom Lane <tgl@sss.pgh.pa.us>

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