Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRglC-0006jv-Gc for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Jul 2016 14:21:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bRglB-0003mR-Qv for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Jul 2016 14:21:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bRgjp-0002C9-Oz for pgsql-hackers@postgresql.org; Mon, 25 Jul 2016 14:20:09 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRgjm-0005kq-PZ for pgsql-hackers@postgresql.org; Mon, 25 Jul 2016 14:20:08 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 0C60D5F799; Mon, 25 Jul 2016 10:20:05 -0400 (EDT) Date: Mon, 25 Jul 2016 10:20:05 -0400 From: Stephen Frost To: Andrew Gierth Cc: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: No longer possible to query catalogs for index capabilities? Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TmK1vW4AElxJfAXD" Content-Disposition: inline In-Reply-To: <87invtolnc.fsf@news-spur.riddles.org.uk> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 10:17:38 up 16 days, 15:41, 7 users, load average: 0.27, 0.15, 0.25 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --TmK1vW4AElxJfAXD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andrew Gierth (andrew@tao11.riddles.org.uk) wrote: > >>>>> "Tom" =3D=3D Tom Lane writes: >=20 > >> 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). >=20 > >> Am I missing something or is this a significant oversight? >=20 > 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. >=20 > 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. >=20 > 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 --TmK1vW4AElxJfAXD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXliAVAAoJEO1sijiDR2RVr5gQAISsfMviAIoxEZHYy/Kos4aT oNX+qvEpixPc9yaIbNTgS3JSZfO2mLKPW0RUR2H0HPQQOwYPyqZVR9JBO0cYYBPB OktYF9la3sQ0q4kBAYiCAlSY7fc5lhpfhXj8yq0R86ymH8CLUIkeeTSZ4/bKb9+E BflCXectI6tiWjdWEpN90AMJ/QqiP9RcL6Z8RyKxzGPjY3onc5g4OfVFMlYOG2TQ Rc8bHUnWVKiRLkHeesJaSVPZ+3J1C9ydzuNeoLl3oMYKu/xwimyYswJ0WEMqeoKJ 0+wys0e/9wFkI65THbJ7N+rIaiDIrv3ELgZKZfkVvxfuE1P++hDgBcTspHocT9yC zmuIVQlmswyci2iHm10RDxc4/5JvQ0/IMR6/8b5/K1+oYt+ElSjuvHB6Q0BwDZxg DQfCh9FdODphUuQL4RtL5m4C8cKC8wCeo2C6bz5xSlGryVFBTAHM9dNKbHCTFTGN fV43mLJmBtH5EDrGJNrmkJSZki4SBOYZ9dZksfTfqsDA3Z+E0wo3YPYVUrb1b2DK ZinFIQFm3UOqAVA8Ys96MqVdcPzdd7LiawrFHlf0OFCiP1BVbx4hOghLtMR3EJmT KGoj4GRRDRireU85dnWzOubdpl5UuAI0t/aZAyNNgEtwXTs5Sd3Tm2hCV6k/Jxr8 9UnhtImdmR5S7ysODQDD =HOUn -----END PGP SIGNATURE----- --TmK1vW4AElxJfAXD--