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

From Andrew Gierth
Subject Re: [BUGFIX] amcanbackward is not checked before building backward index paths
Date
Msg-id 87vabm48oq.fsf@news-spur.riddles.org.uk
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  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> What amcanbackward is about is whether the index can support
 Tom> reversing direction mid-scan, as would be required to support
 Tom> FETCH FORWARD followed by FETCH BACKWARD in a cursor. That's
 Tom> actually independent of whether the index can implement a defined
 Tom> ordering; see for example the hash AM, which sets amcanbackward
 Tom> but not amcanorder.

Ugh, so the docs for amutils get this wrong, and if I'd looked at this
more carefully when doing them to begin with I'd have given the
'backwards_scan' property a better name or omitted it entirely.

I'll fix the docs accordingly. I'm referring specifically to this bit:

https://www.postgresql.org/docs/current/static/functions-info.html#FUNCTIONS-INFO-INDEX-PROPS

which I think should say "Can the scan direction be changed in
mid-scan?" in place of the current text (unless anyone has better
wording?)

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NaNs in numeric_power (was Re: Postgres 11 release notes)
Next
From: Tom Lane
Date:
Subject: Re: [BUGFIX] amcanbackward is not checked before building backward index paths