fix missing indexes by quoting schema/table name to ::regclass (#711)
The same approach is used in pkg/statements/sql/table_schema.sql and a sample reproduction for the bug is: CREATE SCHEMA test; CREATE TABLE test.data (id INTEGER PRIMARY KEY, name TEXT); CREATE UNIQUE INDEX "test.data_uniq" ON test.data (name); Only the primary key is shown, and not the index created above.
This commit is contained in:
parent
7ee3c61e38
commit
8a8b9f07fb
@ -1,6 +1,6 @@
|
|||||||
SELECT
|
SELECT
|
||||||
indexname AS index_name,
|
indexname AS index_name,
|
||||||
pg_size_pretty(pg_table_size((schemaname || '.' || indexname)::regclass)) AS index_size,
|
pg_size_pretty(pg_table_size(('"' || schemaname || '"."' || indexname || '"')::regclass)) AS index_size,
|
||||||
indexdef AS index_definition
|
indexdef AS index_definition
|
||||||
FROM
|
FROM
|
||||||
pg_indexes
|
pg_indexes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user