pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Preserve tz when converting to jsonb timestamptz
Date: Tue, 30 Jul 2024 11:58:13 +0000
Message-ID: <E1sYlUb-001t2x-3f@gemulon.postgresql.org> (raw)

Preserve tz when converting to jsonb timestamptz

This removes an inconsistency in the treatment of different datatypes by
the jsonpath timestamp_tz() function. Conversions from data types that
are not timestamp-aware, such as date and timestamp, are now treated
consistently with conversion from those that are such as timestamptz.

Author: David Wheeler
Reviewed-by: Junwang Zhao and Jeevan Chalke

Discussion: https://postgr.es/m/7DE080CE-6D8C-4794-9BD1-7D9699172FAB%40justatheory.com

Backpatch to release 17.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/524d490a9f4ab81d86bbedc6e429fbc27776351c

Modified Files
--------------
src/backend/utils/adt/jsonpath_exec.c        | 25 +++++++++++++++++++++++++
src/test/regress/expected/jsonb_jsonpath.out |  4 ++--
2 files changed, 27 insertions(+), 2 deletions(-)



view thread (2+ messages)

Message-ID: <E1sYlUb-001t2x-3f@gemulon.postgresql.org>
Permalink:  ../E1sYlUb-001t2x-3f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sYlUb-001t2x-3f@gemulon.postgresql.org

 · 

reply

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-committers@postgresql.org
  Cc: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Preserve tz when converting to jsonb timestamptz
  In-Reply-To: <E1sYlUb-001t2x-3f@gemulon.postgresql.org>

* 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