postgresources – Telegram
Channel photo updated
Detecting which #index types are available for my column type

SELECT DISTINCT
a.amname
FROM
pg_type t
JOIN pg_opclass o ON o.opcintype = t.oid
JOIN pg_am a ON a.oid = o.opcmethod
WHERE
t.typname = 'int4';

amname
--------
btree
hash
brin
(3 rows)