Re: We don't enforce NO SCROLL cursor restrictions

Vik Fearing <vik@postgresfriends.org>

From: Vik Fearing <vik@postgresfriends.org>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2021-09-09T17:47:41Z
Lists: pgsql-hackers
On 9/9/21 7:10 PM, Tom Lane wrote:
> We don't actually prevent you from scrolling a NO SCROLL cursor:
> 
> There are probably specific cases where you do get an error,
> but we don't have a blanket you-can't-do-that check.  Should we?


I would say yes.  NO SCROLL means no scrolling; or at least should.

On the other hand, if there is no optimization or other meaningful
difference between SCROLL and NO SCROLL, then we can just document it as
a no-op that is only provided for standard syntax compliance.
-- 
Vik Fearing



Commits

  1. Fix some anomalies with NO SCROLL cursors.

  2. Avoid misbehavior when persisting a non-stable cursor.