From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | GreyGeek <jkreps(at)neb(dot)rr(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: export-import problem |
Date: | 2004-11-01 06:43:42 |
Message-ID: | 1099291422.28319.12.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2004-10-28 at 19:39 -0500, GreyGeek wrote:
> I export data from a table that contains a varchar field that stores whole
> names in it. Some of the names include the apostrophe character....
> O'Neal, etc... When I attempt to import the data (using the copy command
> the apostrophe kills the import. If I export the data with quotes around
> the varchar field the quotes get stored inside the varchar field.
> What the magic incantation to get apostrophes in textual data without
> surrounding the data with quotes?
Quotes have no special effect in COPY input:
junk=# create table jj (id INTEGER, jname text);
CREATE TABLE
junk=# copy jj from stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
>> 1 O'Neil
>> 2 O'Grady
>> \.
junk=#
What precisely are you doing?
--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"But they that wait upon the LORD shall renew their
strength; they shall mount up with wings as eagles;
they shall run, and not be weary; and they shall walk,
and not faint." Isaiah 40:31
From | Date | Subject | |
---|---|---|---|
Next Message | stig erikson | 2004-11-01 07:11:56 | dumping on 7.4.6 importing on 7.4.1 |
Previous Message | Ben-Nes Michael | 2004-11-01 05:48:40 | Re: Resource temporarily unavailable |