Quoted NULLs with COPY FROM - Mailing list pgsql-general

From George Pavlov
Subject Quoted NULLs with COPY FROM
Date
Msg-id CCB89282FCE1024EA3DCE687A96A51640471F34F@ehost010-6.exch010.intermedia.net
Whole thread Raw
Responses Re: Quoted NULLs with COPY FROM  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
I need to load CSV files that have quotes in data fields that I want to
map to NULLs in the destination table. So if I see ...,"",... that needs
to be mapped to a NULL (in an INTEGER field in this particular case).
Are there any COPY command options that can do that? It seems that PgSQL
COPY expects the NULL to be always unquoted. There is an option (FORCE
NOT NULL) for doing the opposite. How do I specify that the NULLs are
quoted? I am on 8.0.5.

George



pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: mac os x compile failure
Next
From: Tony Caduto
Date:
Subject: Does this look ethical to you?