Re: No longer possible to query catalogs for index capabilities?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers\(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: No longer possible to query catalogs for index capabilities?
Date: 2016-08-09 16:32:51
Message-ID: 87y445ap58.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Alvaro" == Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:

>> One idea is utils/adt/misc.c. Or we could make a new file under
>> utils/adt/ though I'm not very sure what to name it. amaccess.c?
>> catutils.c? If there's only ever likely to be one or two functions
>> of this ilk, maybe a new file is overkill and we should just use
>> misc.c.

Alvaro> I like the idea of a new file; I have a hunch that it will
Alvaro> grow, given that we're expanding in this area, and perhaps we
Alvaro> can find some existing stuff to relocate there in the future.
Alvaro> I don't think a small file is a problem, anyway.

Alvaro> How about amfuncs.c? Maybe it can live in catalog/ instead of
Alvaro> utils/adt?

Well, the existing patch used access/index/amapi.c for the AM capability
functions. There may be some merit in keeping everything together - I
asked because it didn't seem at first glance that the index column
property function belonged there, but on second thought there's some
overlap in that in future, if indoptions ever acquires any AM-specific
flags, it may be necessary for pg_index_column_has_property to call into
an AM-specific function.

So, here are some options:

1. Put everything in access/index/amapi.c

2. Move either all of access/index/amapi.c, or just the SQL-callable
part of it (amvalidate), to utils/adt/amfuncs.c and put new stuff in
there

3. put pg_index[am]_has_capability in access/index/amapi.c and
pg_index_column_has_property in utils/adt/misc.c

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Borodin 2016-08-09 16:45:47 Re: Re: GiST optimizing memmoves in gistplacetopage for fixed-size updates [PoC]
Previous Message Tom Lane 2016-08-09 16:16:31 Re: Set log_line_prefix and application name in test drivers