Re: Regarding PQputline and PQendcopy

From: Richard Huxton <dev(at)archonet(dot)com>
To: soni de <soni(dot)de(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Regarding PQputline and PQendcopy
Date: 2006-11-29 13:40:03
Message-ID: 456D8DB3.2040003@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-11-29 14:16:48 Re: Regarding PQputline and PQendcopy
Previous Message Zdenek Kotala 2006-11-29 13:39:31 Re: small patch with czech translations for names of months