Re: Undocumented AT TIME ZONE INTERVAL syntax

2021-11-12 Thread Tom Lane
Corey Huinker writes: > Attached is an attempt at an explanation of the edge cases I was > encountering, as well as some examples. If nothing else, the examples will > draw eyes and searches to the explanations that were already there. I looked this over and have a few thoughts: * I don't think

Re: Undocumented AT TIME ZONE INTERVAL syntax

2021-09-19 Thread Corey Huinker
> > >> Yeah, I really didn't expect to change the behavior, but wanted to make > sure that the existing behavior was understood. I'll whip up a patch. > Attached is an attempt at an explanation of the edge cases I was encountering, as well as some examples. If nothing else, the examples will draw

Re: Undocumented AT TIME ZONE INTERVAL syntax

2021-09-19 Thread Corey Huinker
On Sun, Sep 19, 2021 at 10:56 AM Tom Lane wrote: > Corey Huinker writes: > >> SELECT '2018-03-04' AT TIME ZONE INTERVAL '2' HOUR TO MINUTE; > > > ... But none of this is in our own documentation. > > That's not entirely true. [1] says > > When writing an interval constant with a fields spec

Re: Undocumented AT TIME ZONE INTERVAL syntax

2021-09-19 Thread Tom Lane
Corey Huinker writes: >> SELECT '2018-03-04' AT TIME ZONE INTERVAL '2' HOUR TO MINUTE; > ... But none of this is in our own documentation. That's not entirely true. [1] says When writing an interval constant with a fields specification, or when assigning a string to an interval column

Undocumented AT TIME ZONE INTERVAL syntax

2021-09-18 Thread Corey Huinker
In reviewing Paul's application period patch, I noticed some very curious syntax in the test cases. I learned that Paul is equally confused by it, and has asked about it in his PgCon 2020 presentation > SELECT '2018-03-04' AT TIME ZONE INTERVAL '2' HOUR TO MINUTE; timezone --