Re: jsonpath: Inconsistency of timestamp_tz() Output

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonpath: Inconsistency of timestamp_tz() Output
Date: 2024-07-22 17:29:02
Message-ID: 2494D2C0-D9F3-403C-8E1E-51D182C8FDFD@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 22, 2024, at 03:12, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> wrote:

> I agree with David that we need to set the tz explicitly as the JsonbValue struct maintains that separately.
>
> However, in the attached version, I have added some comments and also, fixed some indentation.

Thank you for the review. I changed a single word in your comments (which are welcome). Thank you!

Just to reiterate, this is not an ideal fix, as the `date_timestamptz` and `timestamp_timestamptz` perform the same calculations. It would be nice to do it only once.

Best,

David

Attachment Content-Type Size
v5-0001-Preserve-tz-when-converting-to-jsonb-timestamptz.patch application/octet-stream 4.4 KB
unknown_filename text/plain 2 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-07-22 17:37:17 Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin
Previous Message Robert Haas 2024-07-22 17:20:38 Re: Lock-free compaction. Why not?