aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-03-30 08:56:58 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-03-30 09:02:31 +0200
commit072132f04e55c1c3b0f1a582318da78de7334379 (patch)
treed855c0b1716968cd26966e34f41f77de0c0d0af6 /src/backend/utils/adt/json.c
parentedcedcc2c7bb8390858bbccda9637318598f2473 (diff)
downloadpostgresql-072132f04e55c1c3b0f1a582318da78de7334379.tar.gz
postgresql-072132f04e55c1c3b0f1a582318da78de7334379.zip
Add header matching mode to COPY FROM
COPY FROM supports the HEADER option to silently discard the header line from a CSV or text file. It is possible to load by mistake a file that matches the expected format, for example, if two text columns have been swapped, resulting in garbage in the database. This adds a new option value HEADER MATCH that checks the column names in the header line against the actual column names and errors out if they do not match. Author: Rémi Lapeyre <remi.lapeyre@lenstra.fr> Reviewed-by: Daniel Verite <daniel@manitou-mail.org> Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/CAF1-J-0PtCWMeLtswwGV2M70U26n4g33gpe1rcKQqe6wVQDrFA@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions