Re: Add support for AT LOCAL

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>, Thomas Munro <thomas.munro@gmail.com>, Vik Fearing <vik@postgresfriends.org>, cary huang <hcary328@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-10-17T06:25:14Z
Lists: pgsql-hackers
On Tue, Oct 17, 2023 at 01:40:18AM -0400, Tom Lane wrote:
> makes the failure go away.  Unfortunately, I've not yet found another
> way to make it go away :-(.  My upthread idea of using a local variable
> instead of result->time is no help, and some other random code
> alterations didn't change the results either.

That may be a long shot, but even a modulo?  Say in these two code
paths:
-   while (result->time >= USECS_PER_DAY)
-       result->time -= USECS_PER_DAY;
+   if (result->time >= USECS_PER_DAY)
+       result->time %= USECS_PER_DAY;

> Not sure where we go from here.  While I don't have much hesitation
> about blowing off xlc_r 12.1, it would be sad if their latest
> toolchain doesn't work either.  (I didn't try permuting the code
> while using the newer compiler, though.)

We've spent a lot of time on that.  I'm OK to just give up, trim the
values of the view with a qual, and call it a day.
--
Michael

Commits

  1. Dodge a compiler bug affecting timetz_zone/timetz_izone.

  2. Back-patch test cases for timetz_zone/timetz_izone.

  3. Add regression test coverage for timetz_izone().

  4. Add support for AT LOCAL

  5. doc: Mention timezone(zone, time) in section for AT TIME ZONE

  6. Use HASH_BLOBS for xidhash.