Re: [HACKERS] \copy problem

From: Jose Soares <jose(at)sferacarta(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: general <pgsql-general(at)postgresql(dot)org>, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] \copy problem
Date: 1999-12-17 09:39:49
Message-ID: 385A04E5.C6169AC5@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Sorry Peter, I don't say you any thing, I'm using psql on win95.

1. I see psql for Linux requires \N only for data fields with null
values other fields (char,int,etc)
doesn't need \N. Why ?
2. psql for M$Windows95 has a different behavior. For example I can't
insert date fields even using \N

I tried to load a file by changing every NULL value of date fields with
\N and it works
on Linux psql, but Win95 psql shows me the following message:
pqReadData() -- read() failed: errno=0
No error
PQendcopy: resetting connection
Copy failed.

Any ideas ?

Peter Eisentraut wrote:
>
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Jesse Lee 1999-12-17 09:52:01 Create language PL/pgSQL failed
Previous Message jesselee 1999-12-17 08:35:19 How to create a new PL language in postgres

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-12-17 10:39:38 Re: [HACKERS] Postmaster options, process spawning, logging, etc.
Previous Message Zeugswetter Andreas SB 1999-12-17 09:29:40 AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING