pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix wrong assertion and poor error messages in "COPY (query) TO"
Date: Mon, 21 Oct 2024 19:08:42 +0000
Message-ID: <E1t2xli-001nJG-NX@gemulon.postgresql.org> (raw)

Fix wrong assertion and poor error messages in "COPY (query) TO".

If the query is rewritten into a NOTIFY command by a DO INSTEAD
rule, we'd get an assertion failure, or in non-assert builds
issue a rather confusing error message.  Improve that.

Also fix a longstanding grammar mistake in a nearby error message.

Per bug #18664 from Alexander Lakhin.  Back-patch to all supported
branches.

Tender Wang and Tom Lane

Discussion: https://postgr.es/m/18664-ffd0ebc2386598df@postgresql.org

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3685ad6188c1697c8a685f8fabe79e508b0dcc6e

Modified Files
--------------
src/backend/commands/copyto.c         |  8 ++++++--
src/test/regress/expected/copydml.out | 10 +++++++---
src/test/regress/sql/copydml.sql      |  4 ++++
3 files changed, 17 insertions(+), 5 deletions(-)



view thread (7+ messages)

Message-ID: <E1t2xli-001nJG-NX@gemulon.postgresql.org>
Permalink:  ../E1t2xli-001nJG-NX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1t2xli-001nJG-NX@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix wrong assertion and poor error messages in "COPY (query) TO"
  In-Reply-To: <E1t2xli-001nJG-NX@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