From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bill Moran <wmoran@potentialtech.com>
Cc: Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
Cc: pgsql-general@postgresql.org
Subject: Re: problem with cursur within a scriptfile
Date: Sun, 22 Feb 2004 16:54:27 -0500
Message-ID: <18863.1077486867@sss.pgh.pa.us> (raw)
In-Reply-To: <4038E2C6.6020108@potentialtech.com>
References: <296d84e62fc40fc6e1938b7086259dac@biglumber.com>
<00f201c3f964$2d68baf0$0201a8c0@zwerg2000>
<4038E2C6.6020108@potentialtech.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, wmoran@potentialtech.com, poppcorn@cornelia-boenigk.de, pgsql-general@postgresql.org
Subject: Re: problem with cursur within a scriptfile
In-Reply-To: <18863.1077486867@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox