agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pierre Forstmann <pierre.forstmann@gmail.com>
Cc: pierre@senellart.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: [patch] BUG #19558: User-defined prefix operators "|" and "->" no longer parse in 19beta2 (SQL/PGQ grammar change)
Date: Sat, 18 Jul 2026 13:03:31 -0400
Message-ID: <125921.1784394211@sss.pgh.pa.us> (raw)
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>

Pierre Forstmann <pierre.forstmann@gmail.com> writes:
> Le 18/07/2026 à 17:42, Tom Lane a écrit :
>> 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






view thread (5+ messages)

Message-ID: <125921.1784394211@sss.pgh.pa.us>
Permalink:  ../125921.1784394211@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/125921.1784394211@sss.pgh.pa.us

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pierre.forstmann@gmail.com, 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: <125921.1784394211@sss.pgh.pa.us>

* 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