Re: problem with cursur within a scriptfile

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problem with cursur within a scriptfile
Дата
Msg-id 18863.1077486867@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: problem with cursur within a scriptfile  (Bill Moran <wmoran@potentialtech.com>)
Список 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 по дате отправления:

Предыдущее
От: "Gyorgy Molnar"
Дата:
Сообщение: System tuning
Следующее
От: "Cornelia Boenigk"
Дата:
Сообщение: Re: problem with cursur within a scriptfile