Subject: [pgAdmin4][PATCH] Display Security Labels in SQL (PPAS9.2+)

From: Murtuza Zabuawala <[email-masked]>
Date: Fri, 2 Jun 2017 20:52:45 +0530

Hi,

PFA minor patch to fix the issue where Security Labels were not displaying
in Reversed engineered schema SQL for PPAS9.2+.
RM#1575

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/ppas/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/ppas/9.2_plus/sql/properties.sql
index ac0be6f..d32e8c2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/ppas/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/ppas/9.2_plus/sql/properties.sql
@@ -35,7 +35,8 @@ SELECT
         SELECT array_to_string(defaclacl::text[], ', ')
             FROM pg_default_acl
         WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid
-    ), ', ')) AS typeacl
+    ), ', ')) AS typeacl,
+    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
     pg_namespace nsp
     LEFT OUTER JOIN pg_description des ON

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Tue, 6 Jun 2017 11:47:06 +0100

Thanks, applied.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company