Re: COPY with null

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Karen Smallwood <Karen(dot)Smallwood(at)mightyautoparts(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: COPY with null
Date: 2003-11-10 03:47:45
Message-ID: 20031110034745.45543.qmail@web20806.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

--- Karen Smallwood
<Karen(dot)Smallwood(at)mightyautoparts(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Luca Ferrari 2003-11-10 08:20:35 postgresSQL & perl
Previous Message Bruce Momjian 2003-11-10 02:02:46 Re: How to change PQexec timeout?