Import text values as null instead of blank
When importing data to a Postgres database use the copy command default behavior which is null values instead of blank ones.
For an experienced DBA, it is expected that the default value of a blank text field to be null because if you insert data on a table and do not specify any value as a default for that field the database is going to insert it as a null value.
quoting Postgres doc: "If no default value is declared explicitly, the default value is the null value. This usually makes sense because a null value can be considered to represent unknown data." - https://www.postgresql.org/docs/current/ddl-default.html
Given the following example:
foo,"",bar
foo,,bar
Would you consider the first record to have an empty string and the second to have null?
yes!
furthermore, we could have a parameter in cases like the first one where we would like it to be null. Something like --nullIf = "value" :smile: