Preserve tz when converting to jsonb timestamptz

Andrew Dunstan <andrew@dunslane.net>

Commit: 524d490a9f4ab81d86bbedc6e429fbc27776351c
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2024-07-30T11:57:38Z
Releases: 18.0
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.

Files