Re: Unable to execute \copy from Client Application

From: sujayr06 <sujayr06(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Unable to execute \copy from Client Application
Date: 2012-02-16 09:02:59
Message-ID: 1329382979228-5488935.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Guillaume,

Please find the usage of \copy and the corresponding API.

strPgSqlQuerybuf<<"'\'copy hnb_registration FROM
'/root/Sujay/hnbfile.txt' USING DELIMITERS ','";

pPostGresQueryResult = PQexecParams(pPgConnection,
strPgSqlQuerybuf.str().c_str(),
0, // one param
NULL, // let the
backend deduce param type
NULL,
NULL, // don't need
param lengths since text
NULL, // default to
all text params
0);
ePostGresCmdExecStatus =
PQresultStatus(pPostGresQueryResult) ;

Let me know if the usage has to be corrected.
Regards,
Sujay

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Unable-to-execute-copy-from-Client-Application-tp5488816p5488935.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message sujayr06 2012-02-16 09:05:56 Re: Unable to execute \copy from Client Application
Previous Message Marti Raudsepp 2012-02-16 08:53:59 Re: Drop big index