Reject opclass options in ON CONFLICT clause master github/master
authorÁlvaro Herrera <[email protected]>
Fri, 12 Dec 2025 13:26:42 +0000 (14:26 +0100)
committerÁlvaro Herrera <[email protected]>
Fri, 12 Dec 2025 13:26:42 +0000 (14:26 +0100)
commit630a93799d538c35c94187e07ef64d566a573a4e
tree8298a47d0b69730a566316667e385a47bee45a13
parent493eb0da31be4520252e1af723342dc7ead0c3e5
Reject opclass options in ON CONFLICT clause

It's as pointless as ASC/DESC and NULLS FIRST/LAST are, so reject all of
them in the same way.  While at it, normalize the others' error messages
to have less translatable strings.  Add tests for these errors.

Noticed while reviewing recent INSERT ON CONFLICT patches.

Author: Álvaro Herrera <[email protected]>
Reviewed-by: Peter Geoghegan <[email protected]>
Discussion: https://postgr.es/m/202511271516[email protected]
src/backend/parser/parse_clause.c
src/test/regress/expected/insert_conflict.out
src/test/regress/sql/insert_conflict.sql