Re: PQgetResultSet Problem - Mailing list pgsql-general

From Deepa K
Subject Re: PQgetResultSet Problem
Date
Msg-id 3F41AD2A.14046EC9@midascomm.com
Whole thread Raw
In response to PQgetResultSet Problem  (Deepa K <kdeepa@midascomm.com>)
Responses Re: PQgetResultSet Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Thanks Tom.

But we run a set of commands in psql command line, if any one of query
fails, other commands gets executed. Why this is possible in psql and
not using application.

TIA
Deepa. K


Tom Lane wrote:

> Deepa K <kdeepa@midascomm.com> writes:
> >     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.
>
> That's what it's supposed to do.
>
> >    Also the queries which were before the failed query, which were
> > successful, were also not commited to the database.
>
> Likewise.
>
> If this is not the behavior you want, then submit the commands
> separately.
>
>                         regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend


pgsql-general by date:

Previous
From: Jamie Lawrence
Date:
Subject: Re: Example Database
Next
From: Tom Lane
Date:
Subject: Re: PQgetResultSet Problem