Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r80Jk-007mf5-Jh for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Nov 2023 15:48:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r80Ji-0060wR-OM for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Nov 2023 15:48:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r80Ji-0060wJ-9A for pgsql-hackers@lists.postgresql.org; Tue, 28 Nov 2023 15:48:06 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r80Je-007n8C-Vj for pgsql-hackers@postgresql.org; Tue, 28 Nov 2023 15:48:04 +0000 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-423871dc183so31474561cf.2 for ; Tue, 28 Nov 2023 07:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1701186481; x=1701791281; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bUjAOSoYViDtHB0ySL/ST2emWI0PkrYsg7MB6uCa7dE=; b=zgMP6tRW5dV2fe+wME8R6viWGJOKIQwMueagT0egDbOjXooFoDOLZRQZoHBOq+SR0C 49xzH03n2rIV09GwgjLrBdmO3ZwuUiylkE/sjEP1BpVGh6K+0NkgGuisjM3XS9ARzU+o iQF+5LvjeZ9zEbTW3IU1wjGiREkj3fq38fk6SCJKW1KMOCZijOyGqHWRRm5vpzQ0+yO6 HDxBuM+EyjxUlA7/nRU8kus0OIBUWfNfLMp3XrlN4RRAtOqmjTr6h/vaQWRc4P8NbOiX XfQ058ZuEo+Bnsu3PpStA2UJkgSKtCLRNJ3uh7dQAeoGkRbrCa8fWcPipeKBWdX++44k t1Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701186481; x=1701791281; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bUjAOSoYViDtHB0ySL/ST2emWI0PkrYsg7MB6uCa7dE=; b=mS73xQ4a3eiqrZgBvQgtricdGHtdIXQsBasq7FxnE/5Gf+3/j2XfbROszafHdACDMm NGkhu2TX+3P2vHa+dXuP9v8mMMWaz8xSExZyrxQHzSaeiuXB++JXJmrLG8pdO4yMf/mF 2dgXdzsAs8Y5w4o/Uu1vUAp9fNl7CzPiaMsupBDcHOImWqduS773jk1FeWlSV1hScrVL zz8sI/m2Jy6d7uNxeqqVMNV04CRWpIZ5NLBB1b5lg4SZzUpk4k166wdOf/NXMlU6o6JY XZwSch2g+Ik128cM5qDbmijBp4APHHSkNLnqjJHy0JC2MzEpemMhBP99MEYHRHREkO6n sYDQ== X-Gm-Message-State: AOJu0Yw4Kos46oi28MkwEPT8gD29W/RXFB5WfhTCn5he0BDwQLW3j9An G2ypqNY/fQpnp4BYLVHlIVogFg== X-Google-Smtp-Source: AGHT+IHghyn07rSsAehOYqBYgKkpM4ikLF4m47qfiP6OFGIybdPSXJhh4RlIkMjoK8zGBi7XmzoOIA== X-Received: by 2002:a05:622a:1052:b0:41e:a6c8:b27e with SMTP id f18-20020a05622a105200b0041ea6c8b27emr21295642qte.40.1701186481316; Tue, 28 Nov 2023 07:48:01 -0800 (PST) Received: from ?IPV6:2605:a601:9122:d800::2bb? ([2605:a601:9122:d800::2bb]) by smtp.googlemail.com with ESMTPSA id l5-20020ac848c5000000b004033c3948f9sm4667379qtr.42.2023.11.28.07.48.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 07:48:00 -0800 (PST) Message-ID: Date: Tue, 28 Nov 2023 10:48:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Missing docs on AT TIME ZONE precedence? Content-Language: en-US To: Tom Lane Cc: Alvaro Herrera , Bruce Momjian , Shay Rojansky , pgsql-hackers References: <202311271732.hn567fcmvy37@alvherre.pgsql> <4006949.1701117264@sss.pgh.pa.us> <9df52975-686d-c945-36bd-559c930f2dc7@dunslane.net> <4146714.1701185246@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <4146714.1701185246@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-11-28 Tu 10:27, Tom Lane wrote: > Andrew Dunstan 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