SELECT
tablename,
indexname,
indexdef
FROM
pg_indexes;
CREATE INDEX <index_name> ON <table_name> (<column_name>);
SELECT
indexname,
indexdef
FROM
pg_indexes
WHERE
tablename = 'table_name';
Code language: JavaScript (javascript)