public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Tom Lane <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Shay Rojansky <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Missing docs on AT TIME ZONE precedence?
Date: Tue, 28 Nov 2023 10:48:00 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>


On 2023-11-28 Tu 10:27, Tom Lane wrote:
> Andrew Dunstan <[email protected]> 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







view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Missing docs on AT TIME ZONE precedence?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox