Re: [BUGFIX] amcanbackward is not checked before building backward index paths

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGFIX] amcanbackward is not checked before building backward index paths
Date: 2018-05-17 16:58:45
Message-ID: 20180517165845.tojaoqp23bbvhsl6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-May-17, Tom Lane wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Thu, May 17, 2018 at 8:46 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-05-17 17:07:29 Re: [PROPOSAL] Shared Ispell dictionaries
Previous Message Andres Freund 2018-05-17 16:44:41 Re: Postgres, fsync, and OSs (specifically linux)