pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Only evaluate default values as required when doing COPY FROM 2+ messages / 1 participants [nested] [flat]
* pgsql: Only evaluate default values as required when doing COPY FROM @ 2023-10-01 14:25 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2023-10-01 14:25 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Only evaluate default values as required when doing COPY FROM Commit 9f8377f7a2 was a little too eager in fetching default values. Normally this would not matter, but if the default value is not valid for the type (e.g. a varchar that's too long) it caused an unnecessary error. Complaint and fix from Laurenz Albe Backpatch to release 16. Discussion: https://postgr.es/m/75a7b7483aeb331aa017328d606d568fc715b90d.camel@cybertec.at Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/276393f53efbf08f72190221e9c1ef2a28e7fc66 Modified Files -------------- src/backend/commands/copyfrom.c | 9 ++++++++- src/test/regress/expected/copy.out | 17 +++++++++++++++++ src/test/regress/sql/copy.sql | 15 +++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Only evaluate default values as required when doing COPY FROM @ 2023-10-01 14:25 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2023-10-01 14:25 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Only evaluate default values as required when doing COPY FROM Commit 9f8377f7a2 was a little too eager in fetching default values. Normally this would not matter, but if the default value is not valid for the type (e.g. a varchar that's too long) it caused an unnecessary error. Complaint and fix from Laurenz Albe Backpatch to release 16. Discussion: https://postgr.es/m/75a7b7483aeb331aa017328d606d568fc715b90d.camel@cybertec.at Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/910eb61b2bbdb729c242ed20d5f6e0a392eb62da Modified Files -------------- src/backend/commands/copyfrom.c | 9 ++++++++- src/test/regress/expected/copy.out | 17 +++++++++++++++++ src/test/regress/sql/copy.sql | 15 +++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-10-01 14:25 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-10-01 14:25 pgsql: Only evaluate default values as required when doing COPY FROM Andrew Dunstan <andrew@dunslane.net> 2023-10-01 14:25 pgsql: Only evaluate default values as required when doing COPY FROM Andrew Dunstan <andrew@dunslane.net>
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