pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-col
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-col
@ 2024-10-16 23:47 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2024-10-16 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-column cases

This commit adds missing checks for COPY FORCE_NOT_NULL and FORCE_NULL
when applied to all columns via "*".  These options now correctly
require CSV mode and are disallowed in COPY TO, making their behavior
consistent with FORCE_QUOTE.

Some regression tests are added to verify the correct behavior for the
all-columns case, including FORCE_QUOTE, which was not tested.

Backpatch down to 17, where support for the all-column grammar with
FORCE_NOT_NULL and FORCE_NULL has been added.

Author: Joel Jacobson
Reviewed-by: Zhang Mingli
Discussion: https://postgr.es/m/65030d1d-5f90-4fa4-92eb-f5f50389858e@app.fastmail.com
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/089aac631b5ba53be0ecf8ea2e8d81388d69629c

Modified Files
--------------
src/backend/commands/copy.c         | 12 ++++++++----
src/test/regress/expected/copy2.out | 12 ++++++++++++
src/test/regress/sql/copy2.sql      |  6 ++++++
3 files changed, 26 insertions(+), 4 deletions(-)



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

* pgsql: Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-col
@ 2024-10-16 23:47 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2024-10-16 23:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-column cases

This commit adds missing checks for COPY FORCE_NOT_NULL and FORCE_NULL
when applied to all columns via "*".  These options now correctly
require CSV mode and are disallowed in COPY TO, making their behavior
consistent with FORCE_QUOTE.

Some regression tests are added to verify the correct behavior for the
all-columns case, including FORCE_QUOTE, which was not tested.

Backpatch down to 17, where support for the all-column grammar with
FORCE_NOT_NULL and FORCE_NULL has been added.

Author: Joel Jacobson
Reviewed-by: Zhang Mingli
Discussion: https://postgr.es/m/65030d1d-5f90-4fa4-92eb-f5f50389858e@app.fastmail.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c06a4746b1be841dee998a75f9a52b2d06348ca7

Modified Files
--------------
src/backend/commands/copy.c         | 12 ++++++++----
src/test/regress/expected/copy2.out | 12 ++++++++++++
src/test/regress/sql/copy2.sql      |  6 ++++++
3 files changed, 26 insertions(+), 4 deletions(-)



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


end of thread, other threads:[~2024-10-16 23:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 23:47 pgsql: Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-col Michael Paquier <michael@paquier.xyz>
2024-10-16 23:47 pgsql: Fix validation of COPY FORCE_NOT_NULL/FORCE_NULL for the all-col Michael Paquier <michael@paquier.xyz>

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