pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Refactor error messages to reduce duplication
2+ messages / 1 participants
[nested] [flat]

* pgsql: Refactor error messages to reduce duplication
@ 2024-08-08 19:18  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-08-08 19:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Refactor error messages to reduce duplication
@ 2024-08-08 19:18  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-08-08 19:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/498ee9ee2f4bc7d79f2d91cdd817b2a8f14a664f

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-08-08 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-08 19:18 pgsql: Refactor error messages to reduce duplication Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-08 19:18 pgsql: Refactor error messages to reduce duplication Alvaro Herrera <alvherre@alvh.no-ip.org>

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