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.96) (envelope-from ) id 1wl8Rt-0013gp-1W for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Jul 2026 17:03:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wl8Rs-003SCu-1F for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Jul 2026 17:03:36 +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.96) (envelope-from ) id 1wl8Rs-003SCm-00 for pgsql-bugs@lists.postgresql.org; Sat, 18 Jul 2026 17:03:36 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wl8Rp-00000000qso-1Dqh for pgsql-bugs@lists.postgresql.org; Sat, 18 Jul 2026 17:03:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 66IH3VMZ125922; Sat, 18 Jul 2026 13:03:31 -0400 From: Tom Lane To: Pierre Forstmann cc: pierre@senellart.com, pgsql-bugs@lists.postgresql.org Subject: Re: [patch] BUG #19558: User-defined prefix operators "|" and "->" no longer parse in 19beta2 (SQL/PGQ grammar change) In-reply-to: <1b69cad1-19b4-4334-bb6e-a343151e8b78@gmail.com> References: <19558-ad1fca59a3a471a0@postgresql.org> <02aea982-c656-462d-a412-1fb2e388f754@gmail.com> <11151.1784389359@sss.pgh.pa.us> <1b69cad1-19b4-4334-bb6e-a343151e8b78@gmail.com> Comments: In-reply-to Pierre Forstmann message dated "Sat, 18 Jul 2026 18:01:48 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <125920.1784394211.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 18 Jul 2026 13:03:31 -0400 Message-ID: <125921.1784394211@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pierre Forstmann writes: > Le 18/07/2026 =C3=A0 17:42, Tom Lane a =C3=A9crit=C2=A0: >> Why are you promoting these to UMINUS binding precedence? >> AFAICS they would have had Op precedence before v19 >> (and still do, as binary operators). > No good reason: I have fixed my mistake in patch v002. OK. You don't need the explicit %prec specs, because these operators already have the same precedence as Op: %left Op OPERATOR RIGHT_ARROW '|' /* multi-character ops and user-defined= operators */ and a bison rule takes the precedence of its rightmost terminal symbol by default. More importantly, you missed adding the same productions to b_expr, so that there would have been contexts where these symbols still didn't work like they used to. I fixed both those things and pushed it. Thanks for the report and the patch! regards, tom lane