cursor already in use error

Поиск
Список
Период
Сортировка
От Sim Zacks
Тема cursor already in use error
Дата
Msg-id d03pll$1nme$1@news.hub.org
обсуждение исходный текст
Ответы Re: cursor already in use error  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
PostGreSQL 8.0beta1
I have a function that uses a cursor and it is giving me the error: cursor
"crsr" already in use when the parameters I pass in come from another table.

The function works fine when I call it by itself, such as select
PartNeedsReschedule(100,1) or select * from PartNeedsReschedule(100,1)
but when I try select PartNeedsReschedule(PartID,1) from Parts then I get
the error.

It seems that when I qualify the query such as PartNeedsReschedule(PartID,1)
from Parts where partid=100
then it works because it is only returning one row.

Is this a known problem with cursor based functions that they can not be
called by set based queries?
Is there a workaround?

Thank You
Sim



В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Performance of Views
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: cursor already in use error