Re: [GENERAL] Problem with \copy

From: Thomas Good <tomg(at)admin(dot)nrnet(dot)org>
To: Marc Eggenberger <me(at)ieo(dot)ch>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Problem with \copy
Date: 1998-12-29 02:40:43
Message-ID: Pine.LNX.3.96.981228212601.25399A-100000@admin.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 28 Dec 1998, Marc Eggenberger wrote:

> Hi there.
>
> I have some problems with importing a large txt db into postgres ... I try to use the \copy db from xyz to import from a tabulator spaced textfile ... it takes 2-3sec then a "broken pipe" comes up and psql is beeing left ....
> anyone knows if there's a possibility to turn on something like "debugging mode" so that I get more infos than just "broken pipe"?

Hallo Marc,

Is it possible you could have any ctrl chars in your data?
Any *apostrophes* that aren't escaped?

This may be completely off track but I've wasted god knows how much time
looking for other problems when I had forgotten to escape single quotes...

I use the following to `fix' user input when I get single quotes in char
strings: $usr_input =~ s/\'/s/\\'/g; If this is the problem you could use
sed to escape any single quotes in your dump file...HTH!

Viel erfolg,
Tom

> --
> mit freundlichen Gruessen
> =====================================
> Inside Electronic Online www.ieo.ch
> Eggenberger Marc me(at)ieo(dot)ch
> Leimbachstr. 56 Tel 01/4802800
> 8041 Zuerich Fax 01/4802801
> =====================================
>

---------- Sisters of Charity Medical Center ----------
Department of Psychiatry
----
Thomas Good <tomg(at)q8(dot)nrnet(dot)org>
Coordinator, North Richmond C.M.H.C. Information Systems
75 Vanderbilt Ave, Quarters 8 Phone: 718-354-5528
Staten Island, NY 10304 Fax: 718-354-5056

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Chalmers 1998-12-29 02:59:56 Is there a script for cleanly shutting down
Previous Message Carl Riches 1998-12-29 01:05:50 Re: [GENERAL] Release of 6.4.1