Skip to content

Empty quoted data consumes next cell #45

@cstiborg

Description

@cstiborg

I have a postgres csv file which contains a number of quoted empty cells like the following:
"cell1","","cell3",NULL,"cell5"

In this case, despite five fields are present in the row, only four will be seen:

  • "cell1"
  • "","cell3"
  • NULL
  • "cell5"

I've made a patch for this copied in below. In the patched line I amend the check for an escape sequence to also validate that last_quote_location wasn't the first character of the cell and the following character isn't a delimiter. I.e. that we don't have a cell like the second cell above.

csv2.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions