Default tablespace should not be visible for the multi-level partitioned table on PG 12

This commit is contained in:
Akshay Joshi 2020-01-24 11:36:00 +05:30
parent 198063f046
commit 4faf14b45f
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
(CASE WHEN length(spc.spcname) > 0 THEN spc.spcname ELSE
(CASE WHEN length(spc.spcname) > 0 OR rel.relkind = 'p' THEN spc.spcname ELSE
(SELECT sp.spcname FROM pg_database dtb
JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
WHERE dtb.oid = {{ did }}::oid)

View File

@ -1,5 +1,5 @@
SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
(CASE WHEN length(spc.spcname) > 0 THEN spc.spcname ELSE
(CASE WHEN length(spc.spcname) > 0 OR rel.relkind = 'p' THEN spc.spcname ELSE
(SELECT sp.spcname FROM pg_database dtb
JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
WHERE dtb.oid = {{ did }}::oid)