Re: Add support for AT LOCAL

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, Vik Fearing <vik@postgresfriends.org>, cary huang <hcary328@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-10-15T22:24:13Z
Lists: pgsql-hackers
On Mon, Oct 16, 2023 at 10:57 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm tempted to wonder if this helps:
>
> -       result->time = t->time + (t->zone - tz) * USECS_PER_SEC;
> +       result->time = t->time + (int64) (t->zone - tz) * USECS_PER_SEC;

I wanted to be able to try this and any other theories and managed to
build the tip of master on cfarm111 with the same CC and CFLAGS as
Noah used, but the problem didn't reproduce!  Hmm, I didn't enable any
extra options, so now I'm wondering if something in some random header
somewhere is involved here...  trying again with more stuff turned
on...



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.