Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRn9J-0005JX-Gq for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Jul 2016 21:10:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bRn9I-0000fq-Jz for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Jul 2016 21:10:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bRn7w-0007Uv-UT for pgsql-hackers@postgresql.org; Mon, 25 Jul 2016 21:09:28 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRn7s-00073u-VQ for pgsql-hackers@postgresql.org; Mon, 25 Jul 2016 21:09:28 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8EE405F799; Mon, 25 Jul 2016 17:09:23 -0400 (EDT) Date: Mon, 25 Jul 2016 17:09:23 -0400 From: Stephen Frost To: Tom Lane Cc: "Joshua D. Drake" , Robert Haas , Andrew Gierth , "pgsql-hackers@postgresql.org" Subject: Re: No longer possible to query catalogs for index capabilities? Message-ID: <20160725210923.GC4028@tamriel.snowman.net> References: <87mvl5on7n.fsf@news-spur.riddles.org.uk> <23668.1469454897@sss.pgh.pa.us> <87invtolnc.fsf@news-spur.riddles.org.uk> <25197.1469457317@sss.pgh.pa.us> <8957.1469474359@sss.pgh.pa.us> <57966867.4080801@commandprompt.com> <9606.1469475284@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3L1hu/R33NquA63z" Content-Disposition: inline In-Reply-To: <9606.1469475284@sss.pgh.pa.us> 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: 17:01:13 up 16 days, 22:25, 7 users, load average: 0.11, 0.07, 0.07 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 --3L1hu/R33NquA63z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > "Joshua D. Drake" writes: > > On 07/25/2016 12:19 PM, Tom Lane wrote: > >> Andrew still hasn't shown a concrete > >> example of what he needs to do and why. >=20 > > I think that Andrew and other people who have commented on this thread= =20 > > made it pretty obvious why it is useful. >=20 > Both Andrew and Robert have asserted without proof that it'd be useful > to be able to get at some of that data. Given the lack of any supporting > evidence, it's impossible to know which data needs to be exposed, and > that's why I find their statements insufficient. "Emulate 9.5's pg_am > exactly" is not in the cards, and short of that I'd like to see some > concrete reasons why we do or do not need to expose particular bits of > data. I believe the response to "what" is the patch which Andrew provided, and the use-case is illustrated by the query which he wrote that used those columns in much the same way that the JDBC driver used them (and which was also broken by their removal). This isn't just academic "gee, I wish we hadn't removed those columns", there are clearly cases where they were useful and were used. I do not believe hard-coding the name of index types as a definitive list of which indexes support what capabilities is an appropriate approach (as was suggested, and evidently done, for the JDBC driver). Additional use-cases include query analysis, by which one might want to see what capabilities an index has to understand why it may or may not be useful for a given query. I would also suggest that relying on pg_get_indexdef() is a poor solution and we should be considering how to expose the necessary information for pg_dump through the catalog instead of asking users who are interested to use a function that returns the result as an SQL DDL statement. We don't do that for table definitions and have argued time and time again why we shouldn't. Thanks! Stephen --3L1hu/R33NquA63z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXloADAAoJEO1sijiDR2RV1L8P/2x9syauXQ3FZM8nWLwPT1PH anc8tkLsdw5rz0V0YpfEitccffygOzVawKPVfTFlvsUUfNwENrOmVLn2lRCkVQCQ 1A63dZhlZY6gJIs9iA9jR6JbcCv1zz0dLLcV94EHWt6Z0gGr347ZfrHQNshJSIKh gWF8+WdLUfdBIbY6ue9GCKOHliiOVNXUJq+1Cn5oYleVw1qv+1IknEzwoq/HdRXP 3DEX81rKhr5mOlX2wsVihrVjqnF29WLtTF6aMDOQ5fj0IPqs+M1IZnIl0n0gdSTi J103FwYLCYZTiwH5jDDtelUp/SHLLGtz4O9M69I+7AvnlF9Hmf8WBZ91Sl5cx4w2 7naEUC+HM6EGVgTZ2fNW6Bq1lRjj/93KnkQYCmt7M9Sm7AJ5EN4TvSAR6YcERcYC iYbasurmGtB7i+5lCAZiu+XObav3AJI8vFZAdaU/yta87BA/B4WbXQcMv5h8zKbt +jShdNsnUXBw4Rwmb9KcsHEong83Seg4QSFqbTcH4EtI9Ta6+fquAYIqUdzCX0C2 NoAEh+/PU4TuV4heavTQM50MzSpHHgpbZ4FVmTHlJPUWOktNvkCJpysLxmnGQZfh gmgrgMIL4Q7ZwqxMPccAe+O+dOX/3zLtR/PAa979ke19rg2KWoA8X8Tbx88t8h9c aBSHRRaTkislQgR7aSqO =3HZV -----END PGP SIGNATURE----- --3L1hu/R33NquA63z--