Re: COPY with null - Mailing list pgsql-novice

From Jeff Eckermann
Subject Re: COPY with null
Date
Msg-id 20031110034745.45543.qmail@web20806.mail.yahoo.com
Whole thread Raw
In response to COPY with null  ("Karen Smallwood" <Karen.Smallwood@mightyautoparts.com>)
List pgsql-novice
--- Karen Smallwood
<Karen.Smallwood@mightyautoparts.com> wrote:
> I have seen this question asked, but the answer
> doesn't seem to have worked for the other person or
> myself.  I have several files I need to copy into
> postgres and if I try
> COPY compmstr from '/user/local/testfile' using
> delimiters '\t' with null as '' (or '\N' or '\t\t'>
or anything else);
> I get ERROR:  copy: line 1, Bad numeric input format
> '' (or whatever I used).  I am using files that can
> have numeric nulls and/or character nulls
>
> Anyone figure this one out?  I'm on 7.3.2

Your first version will definitely handle empty
strings as nulls.
Are you quite sure that what you are seeing as an
empty string really is empty?  i.e. it could be some
other kind of non printing character.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

pgsql-novice by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How to change PQexec timeout?
Next
From: Luca Ferrari
Date:
Subject: postgresSQL & perl