From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: No longer possible to query catalogs for index capabilities?
Date: Tue, 26 Jul 2016 22:03:07 -0400
Message-ID: <5265.1469584987@sss.pgh.pa.us> (raw)
In-Reply-To: <4dea49ae-3110-5e97-1548-24ddf8f07c34@2ndquadrant.com>
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>
<CA+TgmoaKit0pnaAdAQJmbXH2VnXpT72=tU9u_6rvkxNPf6Rf2w@mail.gmail.com>
<8957.1469474359@sss.pgh.pa.us>
<8737mxo747.fsf@news-spur.riddles.org.uk>
<4dea49ae-3110-5e97-1548-24ddf8f07c34@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 7/25/16 3:26 PM, Andrew Gierth wrote:
>> The issue I ran into was the exact same one as in the JDBC thread I
>> linked to earlier: correctly interpreting pg_index.indoption (to get the
>> ASC / DESC and NULLS FIRST/LAST settings), which requires knowing
>> whether amcanorder is true to determine whether to look at the bits at
>> all.
> Maybe we should provide a facility to decode those bits then?
Yeah. I'm not very impressed by the underlying assumption that it's
okay for client-side code to hard-wire knowledge about what indoption
bits mean, but not okay for it to hard-wire knowledge about which index
AMs use which indoption bits. There's something fundamentally wrong
in that. We don't let psql or pg_dump look directly at indoption, so
why would we think that third-party client-side code should do so?
Andrew complained upthread that pg_get_indexdef() was too heavyweight
for his purposes, but it's not clear to me what he wants instead.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, andrew@tao11.riddles.org.uk, robertmhaas@gmail.com
Subject: Re: No longer possible to query catalogs for index capabilities?
In-Reply-To: <5265.1469584987@sss.pgh.pa.us>
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> <CA+TgmoaKit0pnaAdAQJmbXH2VnXpT72=tU9u_6rvkxNPf6Rf2w@mail.gmail.com> <8957.1469474359@sss.pgh.pa.us> <8737mxo747.fsf@news-spur.riddles.org.uk> <4dea49ae-3110-5e97-1548-24ddf8f07c34@2ndquadrant.com> <5265.1469584987@sss.pgh.pa.us>
* 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