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

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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 15:26:37
Message-ID: 87vabm48oq.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-17 15:46:22 Re: [BUGFIX] amcanbackward is not checked before building backward index paths
Previous Message Tom Lane 2018-05-17 15:22:45 Re: NaNs in numeric_power (was Re: Postgres 11 release notes)