pqgetresultset problem

From: "P(dot)Harikrishnan" <harikrishnan(at)midascomm(dot)com>
To: Postgresql Novice List <pgsql-novice(at)postgresql(dot)org>
Subject: pqgetresultset problem
Date: 2003-08-13 13:55:20
Message-ID: 3F3A4348.6680A0DA@midascomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,
I am using postgresql 7.1.3 and a client using libpq.
I am executing a statement with muliple SQL commands semicolon
seperated.
If any one of the query in between fails, pqGetResultset returns
NULL on the failed query. So i am unable to process the rest of the
queries.
Also the queries which were before the failed query, which were
successful, were also not commited to the database.

(eg) query1;query2;query3;query4

If query1 is successful and query2 fails, the pqGetResultset returns
NULL on query2. So my client comes out of while (pqGetResultSet). The
query1 which was successful was also not commited to the database.

If i run the same from psql client, the query2 alone fails, the rest
other are inserted to the database.
I am expecting the same behaviour as that of psql.

Plz somebody help me in this regard.

TIA.

Regards,
Hari

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2003-08-13 15:13:47 Re: pqgetresultset problem
Previous Message Rory Campbell-Lange 2003-08-13 09:45:44 Re: VI key strokes