postgresql/contrib/file_fdw
Peter Eisentraut 072132f04e 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
2022-03-30 09:02:31 +02:00
..
data pg_prewarm: Add automatic prewarm feature. 2017-08-21 14:17:39 -04:00
expected Add header matching mode to COPY FROM 2022-03-30 09:02:31 +02:00
sql Add header matching mode to COPY FROM 2022-03-30 09:02:31 +02:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
Makefile Remove dynamic translation of regression test scripts, step 2. 2021-12-20 14:15:52 -05:00
file_fdw--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
file_fdw.c Use has_privs_for_roles for predefined role checks 2022-03-28 15:10:04 -04:00
file_fdw.control Add contrib/file_fdw foreign-data wrapper for reading files via COPY. 2011-02-20 14:06:59 -05:00