Patch: FORCE_NULL option for copy COPY in CSV mode - Mailing list pgsql-hackers

From Ian Lawrence Barwick
Subject Patch: FORCE_NULL option for copy COPY in CSV mode
Date
Msg-id CAB8KJ=jS-Um4TGwenS5wLUfJK6K4rNOm_V6GRUj+tcKekL2=GQ@mail.gmail.com
Whole thread Raw
Responses Re: Patch: FORCE_NULL option for copy COPY in CSV mode
List pgsql-hackers
Hi,

This patch implements the following TODO item:

  Allow COPY in CSV mode to control whether a quoted zero-length
  string is treated as NULL

      Currently this is always treated as a zero-length string,
      which generates an error when loading into an integer column

        Re: [PATCHES] allow CSV quote in NULL
        http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php


  http://wiki.postgresql.org/wiki/Todo#COPY


I had a very definite use-case for this functionality recently while importing
CSV files generated by Oracle, and was somewhat frustrated by the existence
of a FORCE_NOT_NULL option for specific columns, but not one for
FORCE_NULL.

I'll add this to the November commitfest.


Regards

Ian Barwick

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Next
From: Gilles Darold
Date:
Subject: Re: review: psql and pset without any arguments