Patch Reviews

From PostgreSQL wiki
Jump to navigationJump to search
Add Optional TZ Parameter to TSTZ Functions
===========================================

Idea
----

Currently, timestamp-with-timezone (tstz) functions use the 'timezone' GUC
variable to guide their decision about which timezone to use for their
calculations.

It would be nice if these functions took a TZ name as an optional parameter, and
used that for the calculations, instead of the value of 'timezone' GUC
parameter.

One use-case for this additional functionality would be multi-timezone
applications. Currently, such applications cannot easily perform timestamp
calculations for different timezones. With this change, it would make it easy
for such applications to perform such calculations.

Discussion(s)
-------------

[Proposal][] seems to have gone well. The responses include a committer's
buy-in.

[Proposal]:
https://www.postgresql.org/message-id/flat/01a84551-48dd-1359-bf7e-f6b0203a6bd0%40sztoch.pl

Committer Buy-in
----------------

This [initial response by Tom Lane][], in the [proposal][] thread sounds like he
has bought into the idea.

[initial response by Tom Lane]:
https://www.postgresql.org/message-id/38924.1655214183%40sss.pgh.pa.us

Design
------

Implementation Details
----------------------

Tests
-----