Re: generate_series for timestamptz and time zone problem

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Przemysław Sztoch <przemyslaw@sztoch.pl>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-31T20:54:32Z
Lists: pgsql-hackers
=?UTF-8?Q?Przemys=c5=82aw_Sztoch?= <przemyslaw@sztoch.pl> writes:
> |generate_series| ( /|start|/ |timestamp with time zone|, /|stop|/ 
> |timestamp with time zone|, /|step|/ |interval| )
> produces results depending on the timezone value set:

That's intentional.  If you don't want it, maybe you should be using
generate_series on timestamp without time zone?

			regards, tom lane



Commits

  1. Add functions to do timestamptz arithmetic in a non-default timezone.

  2. Refactor datetime functions' timezone lookup code to reduce duplication.

  3. Fix volatility marking of timestamptz_trunc_zone.