May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,20 @@
SELECT n.nspname as schema,
c.relname as table,
c.reltablespace,
CASE WHEN c.reltablespace > 0 THEN (SELECT t.spcname
FROM pg_tablespace
WHERE oid = c.reltablespace)
ELSE '' END
FROM pg_class c
JOIN pg_authid a ON ( a.OID = c.relowner )
JOIN pg_namespace n ON (n.oid = c.relnamespace)
JOIN pg_tablespace t ON ( CASE WHEN c.reltablespace > 0 THEN t.oid = c.reltablespace
ELSE NULL END)
WHERE c.relname NOT LIKE 'pg_%'
AND n.nspname NOT LIKE 'information%'
AND n.nspname NOT LIKE 'sql_%'
AND c.relkind = 'i'
-- AND n.nspname = '<target_schema>'
-- AND c.relname = '<table_name>'
ORDER BY n.nspname, c.relname;