mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 01:26:01 +00:00
index column analysingh works for both postgres and cockroach
This commit is contained in:
@@ -5,12 +5,8 @@ module.exports = `
|
||||
i.relname as "index_name",
|
||||
ix.indisprimary as "is_primary",
|
||||
ix.indisunique as "is_unique",
|
||||
(
|
||||
select
|
||||
array_to_string(array_agg((select a.attname from pg_attribute a where ord = a.attnum and a.attrelid = t.oid)), '|')
|
||||
from
|
||||
unnest(ix.indkey) ord
|
||||
) as "column_names"
|
||||
ix.indkey as "indkey",
|
||||
t.oid as "oid"
|
||||
from
|
||||
pg_class t,
|
||||
pg_class i,
|
||||
|
||||
Reference in New Issue
Block a user