Unable to execute \copy from Client Application

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

Hello All,

My application is a C++ APP.

I'm executing \copy command from the CPP and its as follows

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

Second \ is to keep the compiler happy. When this command
executes on PostGreSql,
gives a syntax error as

ERROR: syntax error at or near "\" at character 1
STATEMENT: \copy hnb_registration FROM '/root/Sujay/hnbfile.txt'
USING DELIMITERS ','

Can some please help!

Thanks in advance.

Regards,
Sujay

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2012-02-16 08:11:21 Re: Unable to execute \copy from Client Application
Previous Message Kiriakos Georgiou 2012-02-16 07:50:34 Re: order of evaluation of search arguments