mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Provide a FORCE NULL option to COPY in CSV mode.
This forces an input field containing the quoted null string to be returned as a NULL. Without this option, only unquoted null strings behave this way. This helps where some CSV producers insist on quoting every field, whether or not it is needed. The option takes a list of fields, and only applies to those columns. There is an equivalent column-level option added to file_fdw. Ian Barwick, with some tweaking by Andrew Dunstan, reviewed by Payal Singh.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
AAA,aaa
|
||||
XYZ,xyz
|
||||
NULL,NULL
|
||||
ABC,abc
|
||||
AAA,aaa,123,""
|
||||
XYZ,xyz,"",321
|
||||
NULL,NULL,NULL,NULL
|
||||
NULL,NULL,"NULL",NULL
|
||||
ABC,abc,"",""
|
||||
|
|
Reference in New Issue
Block a user