From: Stephen Frost <sfrost@snowman.net>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: No longer possible to query catalogs for index capabilities?
Date: Mon, 25 Jul 2016 10:20:05 -0400
Message-ID: <20160725142005.GX4028@tamriel.snowman.net> (raw)
In-Reply-To: <87invtolnc.fsf@news-spur.riddles.org.uk>
References: <87mvl5on7n.fsf@news-spur.riddles.org.uk>
<23668.1469454897@sss.pgh.pa.us>
<87invtolnc.fsf@news-spur.riddles.org.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
* Andrew Gierth (andrew@tao11.riddles.org.uk) wrote:
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> >> With the gutting of pg_am in 9.6, there seems to be no longer any
> >> way for a query of the system catalogs to discover any of the index
> >> capabilities that were formerly columns in pg_am (notably
> >> amcanorder, amcanorderbyop, amclusterable, amsearcharray,
> >> amsearchnulls).
>
> >> Am I missing something or is this a significant oversight?
>
> Tom> It's absolutely not an oversight. We asked when 65c5fcd35 went in
> Tom> whether there was still any need for that information to be
> Tom> available at the SQL level, and nobody appeared to care.
>
> Perhaps you were asking the wrong people?
The capabilities strike me as useful to expose, they're pretty useful to
know. I believe we were right to hide the APIs/functions and don't see
any need to expose those to the SQL level.
> Tom> We could in theory expose a view to show the data --- but since a
> Tom> large part of the point of that change was to not need initdb for
> Tom> AM API changes, and to not be constrained to exactly
> Tom> SQL-compatible representations within that API, I'm disinclined to
> Tom> do so without a fairly compelling argument why it's needed.
>
> It could easily be exposed as a function interface of the form
> index_has_capability(oid,name) or indexam_has_capability(oid,name)
> without any initdb worries.
Hmm, that seems pretty reasonable.
> That would surely be better than the present condition of being
> completely unable to get this information from SQL.
Agreed.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: sfrost@snowman.net, andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us
Subject: Re: No longer possible to query catalogs for index capabilities?
In-Reply-To: <20160725142005.GX4028@tamriel.snowman.net>
References: <87mvl5on7n.fsf@news-spur.riddles.org.uk> <23668.1469454897@sss.pgh.pa.us> <87invtolnc.fsf@news-spur.riddles.org.uk> <20160725142005.GX4028@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox