pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor error messages to reduce duplication
Date: Thu, 08 Aug 2024 19:18:52 +0000
Message-ID: <E1sc8ey-003J3n-0n@gemulon.postgresql.org> (raw)

Refactor error messages to reduce duplication

I also took the liberty of changing

        errmsg("COPY DEFAULT only available using COPY FROM")
to
        errmsg("COPY %s cannot be used with %s", "DEFAULT", "COPY TO")

because the original wording is unlike all other messages that indicate
option incompatibility.  This message was added by commit 9f8377f7a279
(16-era), in whose development thread there was no discussion on this
point.

Backpatch to 17.

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/28b953f26343105ebf3a1a212092e2c3c0bb0914

Modified Files
--------------
src/backend/commands/copy.c         | 76 +++++++++++++++++++++++++++----------
src/backend/commands/copyfrom.c     | 10 +++--
src/backend/commands/copyto.c       |  5 ++-
src/test/regress/expected/copy2.out |  4 +-
4 files changed, 66 insertions(+), 29 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1sc8ey-003J3n-0n@gemulon.postgresql.org>
Permalink:  ../E1sc8ey-003J3n-0n@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sc8ey-003J3n-0n@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@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor error messages to reduce duplication
  In-Reply-To: <E1sc8ey-003J3n-0n@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