Re: Index Administration: pg_index vs. pg_get_indexdef()

Поиск
Список
Период
Сортировка
От Thomas F. O'Connell
Тема Re: Index Administration: pg_index vs. pg_get_indexdef()
Дата
Msg-id 545521C7-C1E0-4565-A077-E8BC1E3C6FB9@sitening.com
обсуждение исходный текст
Ответ на Re: Index Administration: pg_index vs. pg_get_indexdef()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Nov 22, 2005, at 10:56 PM, Tom Lane wrote:

> "Thomas F. O'Connell" <tfo@sitening.com> writes:
>> In an old thread <http://archives.postgresql.org/pgsql-admin/2004-01/
>> msg00271.php>, Tom Lane suggested that it would be "unreasonable" to
>> use pg_index to reconstruct (expressional) indexes (in 7.4). The
>> suggested alternative was to use pg_get_indexdef().
>
> IIRC, the point I was trying to make was that making client code
> try to
> interpret the contents of pg_index.indexprs or pg_index.indpred is a
> losing proposition.  If you feel that you'd rather read the other
> fields
> of pg_index for yourself, I won't argue with you.

Yeah, I took a look at pg_index.indexprs and have already Perled up a
parser for the pg_get_indexdef() output... :)

Out of curiosity (without much knowledge of how pg_get_indexdef()
generates its output), would it be difficult to allow the view to
have a more useful format? What is the intention of providing an
expression tree? How could that be used?

--
Thomas F. O'Connell
Database Architecture and Programming
Co-Founder
Sitening, LLC

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index Administration: pg_index vs. pg_get_indexdef()
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: tsearch2: more than one index per table?