Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )
Дата
Msg-id CAKFQuwav6X0op5notqDDFX0M1oTzR1m3YBCbJNBQC4f7HHLWdQ@mail.gmail.com
обсуждение исходный текст
Ответ на ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )  ("Burke, William J Collins" <William.Burke@collins.com>)
Список pgsql-general
On Thu, Apr 28, 2022 at 8:03 AM Burke, William J Collins <William.Burke@collins.com> wrote:

Hello,

 

I encountered the following error when compiling a pgsql function after an upgrade from PostgresSQL 9.3 on RHEL7 to PostgreSQL 12.9 on RHEL8, and could use some help from the community to figure out why.

 

ERROR: cursor variable must be a simple variable

LINE XX: OPEN vQuery.cursorReturn FOR

              ^

SQL state: 42804

 

After looking through the CURSOR documentation for PG9.3 and PG12, I noticed that the following statement is identical for both versions of PostgreSQL:



Per testing on db-fiddle this started reporting an error in v11.

I took a peek but didn't see anything directly affecting this; but quite a bit of technical debt repayment happened that cycle and since the current behavior matches the documentation, and there were/are no test cases for this situation, the behavior change isn't surprising.

I'd accept a bug and backpatch solution here, though, if someone wished to write one.  We currently support a version (10) that allows this code to execute, seemingly without issue.

David J.

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

Предыдущее
От: Shaozhong SHI
Дата:
Сообщение: Re: parallel-processing multiple similar query tasks - any example?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: parallel-processing multiple similar query tasks - any example?