Re: using copy to load odd characters - Mailing list pgsql-general

From Johnson, Shaunn
Subject Re: using copy to load odd characters
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB05FED9D8@snt452.corp.bcbsm.com
Whole thread Raw
In response to using copy to load odd characters  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Responses Re: using copy to load odd characters
Re: using copy to load odd characters
Re: using copy to load odd characters
List pgsql-general

--thanks for the reply!

--i've tried your example and it
--doesn't work for me.

--i'm also interested in why it's doing
--that (the problem).  it seems that if the
--field is a null and the column size is
--char(1) or so, the load will fail.  in my
--case, the field is a char(2) - would that have
--an impact on the load?

--maybe this is a red herring ...

-X

-----Original Message-----
From: Peter Eisentraut
To: Johnson, Shaunn
Cc: 'pgsql-general@postgresql.org '
Sent: 10/7/03 6:17 AM
Subject: Re: [GENERAL] using copy to load odd characters

Johnson, Shaunn writes:

> I'm trying to load data from a text file that
> has an odd character in it (^@).  From what I
> could tell, it's a NULL character.  How can I
> load that into the database via the command line?

Depends on what data type the column is supposed to have.  Character
data
types cannot contain null bytes.  The type bytea can store arbitrary
binary data.  It requires you to escape null bytes so '\\000'.

--
Peter Eisentraut   peter_e@gmx.net

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Problems defining a primary key !!
Next
From: Richard Huxton
Date:
Subject: Re: Problems defining a primary key !!