Description
Hi @JerrySievert ,
In PLv8, the SCROLL option is not explicitly passed during cursor creation. Internally, PostgreSQL determines whether a cursor should support scrolling based on the execution plan ([1]). However, certain plan nodes (e.g., ForeignScan) do not support backward scanning unless the SCROLL option is explicitly enabled in the statement.
Would it be possible to introduce a configurable option from CX to explicitly enable or disable SCROLL ([2])? When set to true, the cursor would always allow backward scanning. When set to false, the system would fall back to the current behavior, evaluating scroll support based on the execution context.
[1] https://github.com/postgres/postgres/blob/master/src/backend/executor/spi.c#L1702
[2] https://github.com/plv8/plv8/blob/r3.2/plv8_func.cc#L678