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

From Peter Eisentraut
Subject Re: using copy to load odd characters
Date
Msg-id Pine.LNX.4.44.0310071215350.20152-100000@peter.localdomain
Whole thread Raw
In response to using copy to load odd characters  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
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: Kaare Rasmussen
Date:
Subject: Re: PostgreSQL Beta4 Tag'd and Bundle'd ...
Next
From: Tom Lane
Date:
Subject: Re: concenation of strings and null values