Re: [BUGFIX] amcanbackward is not checked before building backwardindex paths - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [BUGFIX] amcanbackward is not checked before building backwardindex paths
Date
Msg-id 20180517165845.tojaoqp23bbvhsl6@alvherre.pgsql
Whole thread Raw
In response to Re: [BUGFIX] amcanbackward is not checked before building backward index paths  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGFIX] amcanbackward is not checked before building backward index paths  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Re: [BUGFIX] amcanbackward is not checked before building backward index paths  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2018-May-17, Tom Lane wrote:

> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > On Thu, May 17, 2018 at 8:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Maybe "Can the scan direction be reversed in mid-scan?".  I'm not
> >> absolutely sure that that's better ...
> 
> > ​A cursory read might conclude that "reversing" can only happen once while
> > they will likely understand that "changing" can happen multiple times.
> > This is minor point - the two are effectively the same.
> > Maybe: "Supports both FETCH FORWARD and FETCH BACKWARD during the same scan"
> 
> Oh, yeah, mentioning what it's *for* would help clarify things, no?
> So perhaps
> 
> "Can the scan direction be changed in mid-scan (to support FETCH FORWARD
> and FETCH BACKWARD on a cursor)?"

To me that sounds like the flag is a prerequisite of using the cursor in
either direction.  But maybe "to support both FETCH FORWARD and FETCH
BACKWARD on the same cursor" is sufficient.  Or maybe "to support
changing scan direction on a cursor".


To make matters worse, IIUC it's actually fine to read the cursor in one
direction to completion, then in the other direction to completion,
without this flag, right?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Postgres, fsync, and OSs (specifically linux)
Next
From: Robert Haas
Date:
Subject: Re: [PROPOSAL] Shared Ispell dictionaries