pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reject opclass options in ON CONFLICT clause
Date: Fri, 12 Dec 2025 13:27:06 +0000
Message-ID: <E1vU3An-000Lhj-24@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/630a93799d538c35c94187e07ef64d566a573a4e

Modified Files
--------------
src/backend/parser/parse_clause.c             | 22 +++++++++++++++-------
src/test/regress/expected/insert_conflict.out | 13 +++++++++++++
src/test/regress/sql/insert_conflict.sql      |  5 +++++
3 files changed, 33 insertions(+), 7 deletions(-)



Message-ID: <E1vU3An-000Lhj-24@gemulon.postgresql.org>
Permalink:  ../E1vU3An-000Lhj-24@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vU3An-000Lhj-24@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Reject opclass options in ON CONFLICT clause
  In-Reply-To: <E1vU3An-000Lhj-24@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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