pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.55k stars 658 forks source link

Import CSV file, empty string are managed as empty string in column instead of NULL after upgrade 8.13 #8155

Open pentolone opened 2 days ago

pentolone commented 2 days ago

Importing csv file with empty string risult in empty string in table too.

To Reproduce

  1. Create table with 1 TEXT column,
  2. Create csv file (comma separated) with empty string like ,,
  3. Click on import
  4. Verify that the column in table has empty string insetad of NULL.

Expected behavior

Empty string stored as NULL value in table columns

pentolone commented 2 days ago

database server version 15

adityatoshniwal commented 6 hours ago

@pentolone Below is what we've tried and the output from the table. If you're using quotes then it will be considered as empty string. Blank is take as NULL.

image image
pentolone commented 3 hours ago

Thank for the answer, but we have null values NOT at the end of line, but in the middle. Something like

adi,,last

Result in table should be adi|null|last but we have adi||last