model-writtenrun 5567 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported that CALL output parameters and OPEN could overwrite variables declared CONSTANT, and supplied a patch with regression tests #1.
- The initial patch rejected constant OPEN targets at compile time, although Tom acknowledged that initialized cursor constants could be legal; he proposed changing only HEAD and separately floated moving cursor tests out of the core regression suite #1.
- Pavel Stehule endorsed the proposal and offered to implement equivalent checks in plpgsql_check so users of older PostgreSQL versions could detect problems #2.
- Tom reconsidered rejecting legal cursor usage and committed runtime checks that allow nonnull cursor constants, also covering exec_stmt_forc(); the commit retains the CALL fix, updates cursor tests, leaves test relocation aside, and explicitly avoids back-patching to prevent compatibility breaks #3 ccd10a9bfa.
- With the PostgreSQL fix landed, Pavel closed the thread by reporting that related checks were available in plpgsql_check 2.1.4 #4.