Re: Add support for AT LOCAL

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Vik Fearing <vik(at)postgresfriends(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add support for AT LOCAL
Date: 2023-06-06 07:56:42
Message-ID: 9ff5cddd07372817ec7894202214804d46cd6176.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2023-06-05 at 23:13 -0400, Vik Fearing wrote:
> The Standard defines time zone conversion as follows:
>
> <datetime factor> ::=
>    <datetime primary> [ <time zone> ]
>
> <time zone> ::=
>    AT <time zone specifier>
>
> <time zone specifier> ::=
>      LOCAL
>    | TIME ZONE <interval primary>
>
>
> While looking at something else, I noticed we do not support AT LOCAL.
> The local time zone is defined as that of *the session*, not the server,
> which can make this quite interesting in views where the view will
> automatically adjust to the session's time zone.
>
> Patch against 3f1aaaa180 attached.

+1 on the idea; it should be faily trivial, if not very useful.

At a quick glance, it looks like you resolve "timezone" at the time
the query is parsed. Shouldn't the resolution happen at query
execution time?

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 謝東霖 2023-06-06 08:18:30 Re: Improve join_search_one_level readibilty (one line change)
Previous Message Kyotaro Horiguchi 2023-06-06 06:13:14 Re: 回复:Fix missing initialization of delayChkptEnd