Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group