On Thu, Apr 28, 2022 at 8:03 AM Burke, William J Collins < william.bu...@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.