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

Started by Tom Lane4 months ago1 messagescommitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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: /messages/by-id/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(+)