Re: getIndexInfo() not returning operator classes

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: getIndexInfo() not returning operator classes
Дата
Msg-id Pine.BSO.4.61.0511101320340.18952@leary.csoft.net
обсуждение исходный текст
Ответ на Re: getIndexInfo() not returning operator classes  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: getIndexInfo() not returning operator classes  (Thomas Kellerer <spam_eater@gmx.net>)
Re: getIndexInfo() not returning operator classes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc

On Thu, 10 Nov 2005, Thomas Kellerer wrote:

> Sorry, I meant COLUMN_NAME (internally I'm collecting all values from
> COLUMN_NAME into a field definition, that's where the error comes from).
>

Are you sure you want to be using getIndexInfo for this instead of
something more pg specific like the pg_get_indexdef function?

Aside from this very specific problem (overlapping indexes with different
opclasses), I don't think I'd ever want to see the opclass in the column
name.  Certainly not if I was using the default opclass, and probably not
if I was using a non-default opclass, but that was the only index on that
column.

> That column will e.g. contain something like "lower(name)" for a
> function based index, so I don't see a reason why it couldn't contain
> "bar varchar_pattern_ops" In both cases it's not the column's name any
> longer
>

In the function case the indexed data is not the column data, so putting
the column's name is misleading.  In the opclass case the indexed data is
really the column's data so the column name is accurate.  The fact that
it is indexed differently for different operations upon it is not terribly
relevent to the column name at least.

I personally don't think adding opclass to the column_name is a good idea,
but you're welcome to try and sway me with a convincing argument or
popular support.

Kris Jurka

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: getIndexInfo() not returning operator classes
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: getIndexInfo() not returning operator classes