Re: problem with cursur within a scriptfile - Mailing list pgsql-general

From Tom Lane
Subject Re: problem with cursur within a scriptfile
Date
Msg-id 18863.1077486867@sss.pgh.pa.us
Whole thread Raw
In response to Re: problem with cursur within a scriptfile  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
Bill Moran <wmoran@potentialtech.com> writes:
> Cornelia Boenigk wrote:
>> BEGIN;
>> SELECT cursorname(`test`,`username`,`searchphrase`);
>> MOVE 10 in test;
>> FETCH 25 from test;
>> COMMIT;
>>
>> inside psql everything works well. If I put this code into a
>> scriptfile and call it, I get the following errormessage:
>>
>> cannot handle multiple result groups

> Sure seems like whatever database client you're using doesn't really
> support transactions.

I'm guessing that the client-side library thinks the above is a single
SQL statement, and so it's surprised when two result sets (the SELECT
and then the FETCH) come back.  This is probably due to misuse of the
library API, but without any details it's hard to offer advice.

            regards, tom lane

pgsql-general by date:

Previous
From: "Gyorgy Molnar"
Date:
Subject: System tuning
Next
From: "Cornelia Boenigk"
Date:
Subject: Re: problem with cursur within a scriptfile