From 4faf14b45ff4878b7fcb1c98235f22c7756a14a7 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Fri, 24 Jan 2020 11:36:00 +0530 Subject: [PATCH] Default tablespace should not be visible for the multi-level partitioned table on PG 12 --- .../tables/templates/partitions/sql/pg/12_plus/properties.sql | 2 +- .../tables/templates/partitions/sql/ppas/12_plus/properties.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql index 09812a3b5..56a06c8a9 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql @@ -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) diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql index 09812a3b5..56a06c8a9 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql @@ -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)