From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Shay Rojansky <roji(at)roji(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Missing docs on AT TIME ZONE precedence? |
Date: | 2023-11-28 15:48:00 |
Message-ID: | eadd117b-7dd0-d1bd-bcd2-a5dedc1fbed5@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2023-11-28 Tu 10:27, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> Looks good. Perhaps the comments above the UNBOUNDED precedence setting
>> (esp. the first paragraph) need strengthening, with a stern injunction
>> to avoid different precedence for non-reserved keywords if at all possible.
> OK. How about rewriting that first para like this?
>
> * Sometimes it is necessary to assign precedence to keywords that are not
> * really part of the operator hierarchy, in order to resolve grammar
> * ambiguities. It's best to avoid doing so whenever possible, because such
> * assignments have global effect and may hide ambiguities besides the one
> * you intended to solve. (Attaching a precedence to a single rule with
> * %prec is far safer and should be preferred.) If you must give precedence
> * to a new keyword, try very hard to give it the same precedence as IDENT.
> * If the keyword has IDENT's precedence then it clearly acts the same as
> * non-keywords and other similar keywords, thus reducing the risk of
> * unexpected precedence effects.
> *
> * We used to need to assign IDENT an explicit precedence just less than Op,
> * to support target_el without AS. While that's not really necessary since
> * we removed postfix operators, we continue to do so because it provides a
> * reference point for a precedence level that we can assign to other
> * keywords that lack a natural precedence level.
>
>
LGTM. Thanks.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2023-11-28 15:48:04 | Re: Annoying build warnings from latest Apple toolchain |
Previous Message | Tristan Partin | 2023-11-28 15:44:18 | Re: SSL tests fail on OpenSSL v3.2.0 |