pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lincoln Swaine-Moore <lswainemoore@gmail.com>
Cc: Marian Wendt <marian.wendt@yahoo.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
Date: Wed, 04 Oct 2023 13:40:16 -0400
Message-ID: <2608036.1696441216@sss.pgh.pa.us> (raw)
In-Reply-To: <CABcidk+FSeyoPd4Km0xBPsvDqcXnXGit_mS7UAL9Ujp9k9bKmw@mail.gmail.com>
References: <CABcidkJzoCFTX1Bkn8aCSPgH-3BwR8MO8=uHY2r48s1ynNbbJQ@mail.gmail.com>
	<CAEfWYywLggL0UJbnQxsafqmkkHYzrU494iEDgHxC=JMdCUj5rQ@mail.gmail.com>
	<2582288.1696428710@sss.pgh.pa.us>
	<13eb1e62-9c00-4878-bb82-ef003eca884c@yahoo.com>
	<CABcidkLmpJ6GrW9ma6mQq1vVEjdoLxtxndfr9E-zJNCKa9bPVw@mail.gmail.com>
	<2602231.1696438458@sss.pgh.pa.us>
	<CABcidkLob7qqO1LJVb0iGwTp7knRwjoedff=N3eQ+HyNHYq2UQ@mail.gmail.com>
	<2605699.1696440169@sss.pgh.pa.us>
	<CABcidk+FSeyoPd4Km0xBPsvDqcXnXGit_mS7UAL9Ujp9k9bKmw@mail.gmail.com>

Lincoln Swaine-Moore <lswainemoore@gmail.com> writes:
>> Yeah.  One thing to keep in mind is that that might have different
>> behavior in terms of the evaluation of the arguments to the function,
>> ie which timezone setting is your input parsed according to.

> I see. You mean, in the event that it doesn't conform to an entry in
> `pg_timezone_names`? I do have control over the possible options the user
> can provide, so it should be straightforward to make sure those all have
> entries.

If you mean that your input will always include an explicit zone
specification, then this doesn't affect you.  What I was thinking
about was that

	select generate_series('2023-10-04 13:30', ...)

is going to mean different things depending on the zone setting
that prevails when that constant is parsed.

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <2608036.1696441216@sss.pgh.pa.us>
Permalink:  ../2608036.1696441216@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2608036.1696441216@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, lswainemoore@gmail.com, marian.wendt@yahoo.com
  Subject: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones
  In-Reply-To: <2608036.1696441216@sss.pgh.pa.us>
  References: <CABcidkJzoCFTX1Bkn8aCSPgH-3BwR8MO8=uHY2r48s1ynNbbJQ@mail.gmail.com> <CAEfWYywLggL0UJbnQxsafqmkkHYzrU494iEDgHxC=JMdCUj5rQ@mail.gmail.com> <2582288.1696428710@sss.pgh.pa.us> <13eb1e62-9c00-4878-bb82-ef003eca884c@yahoo.com> <CABcidkLmpJ6GrW9ma6mQq1vVEjdoLxtxndfr9E-zJNCKa9bPVw@mail.gmail.com> <2602231.1696438458@sss.pgh.pa.us> <CABcidkLob7qqO1LJVb0iGwTp7knRwjoedff=N3eQ+HyNHYq2UQ@mail.gmail.com> <2605699.1696440169@sss.pgh.pa.us> <CABcidk+FSeyoPd4Km0xBPsvDqcXnXGit_mS7UAL9Ujp9k9bKmw@mail.gmail.com> <2608036.1696441216@sss.pgh.pa.us>

* 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