Detailed index predicate with \d on indexes in psql
От | Greg Sabino Mullane |
---|---|
Тема | Detailed index predicate with \d on indexes in psql |
Дата | |
Msg-id | 200111131645.LAA16516@hall.mail.mindspring.net обсуждение исходный текст |
Ответы |
Re: Detailed index predicate with \d on indexes in psql
|
Список | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 (This is using 7.2b1) Anyone know why I am getting the "internal form" of the partial-index predicate? In other words, instead of getting something like this (thanks Tom): regression=# \d apple Index "apple"Column | Type - ---------+---------topping | integer hash Index predicate: (topping > 99) I get something like this: Index "apple"Column | Type - ---------+---------topping | integer hash for table "pizza" WHERE (topping > 2000) Index predicate: ({ EXPR :typeOid 16 :opType op :oper { OPER :opno 521 :opid 14 7 :opresulttype 16 } :args ({ VAR :varno 1 :varattno 3 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 3}{ CONST :consttype 23 :constlen 4 :co nstbyval true :constisnull false :constvalue 4 [ 99 0 0 0 ] })}) Doing a: SELECT c.relname, i.indpred FROM pg_index i, pg_class c WHERE c.oid = i.indexrelid and i.indpred like '(%' reveals that this is happening to every partial index I create. I'm also wondering if we even need the "Index predicate:" section at all? When it works properly, will it ever give more information than what the tail end of pg_get_indexdef returns? If it gives the same, is one preferred over the other? Thanks, Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200111131146 -----BEGIN PGP SIGNATURE----- Comment: http://www.turnstep.com/pgp.html iQA/AwUBO/FOorybkGcUlkrIEQL9KACgyJu7YFWCjJQPwEL32yjhmegocRYAn1iC 4djb4ZoOkrSDePXJ6rsQcSCW =M66f -----END PGP SIGNATURE-----
В списке pgsql-hackers по дате отправления: