libpq can't do "insert" - Mailing list pgsql-interfaces

From Christopher Luk
Subject libpq can't do "insert"
Date
Msg-id 352AFF2C.AE00EDB4@hkcccc.org
Whole thread Raw
In response to Re: ecpg - `exec sql delete' failing (fwd)  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List pgsql-interfaces
I have a question on the libpq( c language) libraries.
The included testlibpq.c can extract data from the postgres95 database.
Modifing the testlibpq.c enable me to extract data from any database in the
postgres95. Hovever, when I changed the "select" query to "insert" query, the
code seems doesn't work. Could somebody tell me is it another way to do
"insert" or something I have missed?

eg.
res=PQexec(conn, "DECLARE myportal CURSOR FOR select * .......");
was changed to
res=PQexec(conn, "DECLARE myportal CURSOR FOR insert into .......");
But can't do insert.

--
Regards, Christopher Luk
   System Analyst - The Hong Kong Council of the Church of Christ in China
              Phone : (852) 2397-1022 Fax : (852) 2397-7405
     mailto:wluk@hkcccc.org URL : http://www.hkcccc.org (Chinese based)



pgsql-interfaces by date:

Previous
From: Tom Good
Date:
Subject: Re: [INTERFACES] Re: ecpg - `exec sql delete' failing (fwd)
Next
From: Peter T Mount
Date:
Subject: Re: [QUESTIONS] JDBC driver complications