Reject opclass options in ON CONFLICT clause
Álvaro Herrera <alvherre@kurilemu.de>
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 <alvherre@kurilemu.de> Reviewed-by: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/202511271516.oiefpvn3z27m@alvherre.pgsql
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_clause.c | modified | +15 −7 |
| src/test/regress/expected/insert_conflict.out | modified | +13 −0 |
| src/test/regress/sql/insert_conflict.sql | modified | +5 −0 |
Discussion
- weird ON CONFLICT clauses 3 messages · 2025-11-27 → 2025-12-12