Re: Regarding PQputline and PQendcopy - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: Regarding PQputline and PQendcopy
Date
Msg-id 456D8DB3.2040003@archonet.com
Whole thread Raw
In response to Re: Regarding PQputline and PQendcopy  ("soni de" <soni.de@gmail.com>)
List pgsql-hackers
soni de wrote:
> Any response?

You're going to have to be a little patient I suspect...

>> We are using PQputline function for copying data to database
>>
>> Postgres version 7.2.4

Because you're running quite an old version. If nothing else, you should 
upgrade to the last in the 7.2 series.

>>   status = PQputline(conn,strArr[i]); //contains one row of data
...
>> status = PQputline(conn, "\\.\n"); // terminator line
...
>> status = PQendcopy(conn);

>> Sometime above code works fine but at sometime PQputline returns EOF and
>> code goes in hang state for PQendcopy function.
>>
>> How to recognize, why PQputline sends EOF?

Check the connection status and error-message when EOF is returned?

>> Please provide me some help regarding what action must be taken when
>> PQputline returns EOF or PQputline unable to send the line to server.

If EOF is returned, does it make sense to send the terminator etc?

--   Richard Huxton  Archonet Ltd


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Integrating Replication into Core
Next
From: Andrew Dunstan
Date:
Subject: Re: Regarding PQputline and PQendcopy