Re: [HACKERS] \copy problem

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jose Soares <jose(at)sferacarta(dot)com>
Cc: general <pgsql-general(at)postgresql(dot)org>, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] \copy problem
Date: 1999-12-17 00:32:19
Message-ID: Pine.LNX.4.21.9912162038270.5199-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Freeman 1999-12-17 01:15:52
Previous Message Peter Eisentraut 1999-12-17 00:31:07 Re: [GENERAL] Czech2ASCII with --mb=Latin2

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-12-17 01:06:01 Re: [HACKERS] ordering RH6.1
Previous Message Peter Eisentraut 1999-12-17 00:32:13 Re: [HACKERS] initdb / pg_version