Re: SearchSysCache() tutorial?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: SearchSysCache() tutorial?
Дата
Msg-id 20171211204059.gtwpiiwgu6ru4kkm@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: SearchSysCache() tutorial?  (Paul Ramsey <pramsey@cleverelephant.ca>)
Ответы Re: SearchSysCache() tutorial?  (Paul Ramsey <pramsey@cleverelephant.ca>)
Список pgsql-general
On 2017-12-11 11:26:51 -0800, Paul Ramsey wrote:
> On Mon, Dec 11, 2017 at 11:25 AM, Paul Ramsey <pramsey@cleverelephant.ca> wrote:
> > Is there anywhere any documentation on SearchSysCache? I find I end up
> > on these long spelunking expeditions through the code base for a
> > particular problem, find the answer after many hours, then forget
> > everything I learned because I don't exercise my knowledge frequently
> > enough. A decent reference guide would help a lot. What do the various
> > SysCacheIdentifier numbers mean/search, some examples, of usage, etc,
> > etc.
> >
> > I can accept if there are not, but it would be a shame to keep on
> > hunting like this if there were a good reference lying around.
> 
> My particular hunt today is "for a given table relation, find any
> indexes that use the gist access method and are on a single attribute
> of type geometry".

I don't think there's a way to do this with a single syscache, there
won't be an index than can cover all of these. I'd suggest using
RelationGetIndexList(), and then filtering for gist and attribute type
on the returned value.

Greetings,

Andres Freund


В списке pgsql-general по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: SearchSysCache() tutorial?
Следующее
От: Paul Ramsey
Дата:
Сообщение: Re: SearchSysCache() tutorial?