pg_index表提供索引信息,它似乎没有描述索引类型的列(btree hash,gin等...)
了解现有索引类型的正确方法是什么?
答案 0 :(得分:1)
索引的访问方法在目录pg_am
中定义,由目录pg_class
的列relam
指向,例如:
select c.relname, a.amname
from pg_index i
join pg_class c on c.oid = i.indexrelid
join pg_am a on a.oid = c.relam
where relnamespace = 2200
relname | amname
----------------------+--------
array_test_arr_idx | gin
students_topics_pkey | btree
images_pkey | btree