Only evaluate default values as required when doing COPY FROM
Andrew Dunstan <andrew@dunslane.net>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copyfrom.c | modified | +8 −1 |
| src/test/regress/expected/copy.out | modified | +17 −0 |
| src/test/regress/sql/copy.sql | modified | +15 −0 |
Discussion
- Regression in COPY FROM caused by 9f8377f7a2 9 messages · 2023-09-25 → 2023-10-02