agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Restore the ability to use | and -> as prefix operators.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Restore the ability to use | and -> as prefix operators.
@ 2026-07-18 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2026-07-18 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Restore the ability to use | and -> as prefix operators.

Commit 2f094e7ac changed the parser to treat these as built-in
operator names, where before they were just generic Op.  While
it correctly gave them the same precedence as Op and added new
productions to allow them to still be used as infix operators,
it missed allowing them to still be used as prefix operators.
At least one extension expects to be able to do that, so add
the necessary productions.

Bug: #19558
Reported-by: Pierre Senellart <pierre@senellart.com>
Author: Pierre Forstmann <pierre.forstmann@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19558-ad1fca59a3a471a0@postgresql.org
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0316593146d573eea9a2232e220347727b952c13

Modified Files
--------------
src/backend/parser/gram.y | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Restore the ability to use | and -> as prefix operators.
@ 2026-07-18 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2026-07-18 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Restore the ability to use | and -> as prefix operators.

Commit 2f094e7ac changed the parser to treat these as built-in
operator names, where before they were just generic Op.  While
it correctly gave them the same precedence as Op and added new
productions to allow them to still be used as infix operators,
it missed allowing them to still be used as prefix operators.
At least one extension expects to be able to do that, so add
the necessary productions.

Bug: #19558
Reported-by: Pierre Senellart <pierre@senellart.com>
Author: Pierre Forstmann <pierre.forstmann@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19558-ad1fca59a3a471a0@postgresql.org
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8d2beee027af41a6b66c670b6a595895f24a1bb0

Modified Files
--------------
src/backend/parser/gram.y | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-18 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-18 16:57 pgsql: Restore the ability to use | and -> as prefix operators. Tom Lane <tgl@sss.pgh.pa.us>
2026-07-18 16:57 pgsql: Restore the ability to use | and -> as prefix operators. Tom Lane <tgl@sss.pgh.pa.us>

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