Re: [HACKERS] \copy problem - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] \copy problem
Date
Msg-id Pine.LNX.4.21.9912162038270.5199-100000@localhost.localdomain
Whole thread Raw
In response to \copy problem  (Jose Soares <jose@sferacarta.com>)
List pgsql-hackers
On 1999-12-16, Jose Soares mentioned:

> I have a problem using \copy to load data into tables.
>
> I have to load data into a table that contains data type fields with
> NULL values.
> I tried using \N but it doesn't work.
> What can I do to insert a null into a data field?

Works for me. I also just messed with that part in the devel sources the
other day and I don't see a reason why it wouldn't. Perhaps you could run
the COPY command instead (and make sure the file is accessible to the
server process) or simply run a COPY FROM STDIN; and enter a few things by
hand and see what you get.

> the \copy error messages..
>
> What about to have the row number and the error type instead of that...
> hygea=> \copy movimentazioni from 4;
> pqReadData() --  read() failed: errno=32
> Broken pipe
> PQendcopy: resetting connection
> Copy failed.

When the backend sends garbage it cannot possibly send the error
message. The error was that the read from the connection failed. Of course
one could argue why that is ... Hmm.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] initdb / pg_version
Next
From: Tom Lane
Date:
Subject: Notation for nextval() (was Re: Several small patches)