diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql index 91a24cd3f..3ee423710 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql @@ -32,4 +32,5 @@ FROM ) d LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql index 91a24cd3f..3ee423710 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql @@ -32,4 +32,5 @@ FROM ) d LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql index 91a24cd3f..3ee423710 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql @@ -32,4 +32,5 @@ FROM ) d LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql index 91a24cd3f..3ee423710 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql @@ -32,4 +32,5 @@ FROM ) d LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql index 7c2e6d9d3..a9f2bfa49 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql @@ -44,3 +44,4 @@ FROM LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) GROUP BY g.rolname, gt.rolname +ORDER BY grantee diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/default/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/default/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/default/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/default/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/default/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/default/sql/acl.sql index 04b20a271..58d0aff55 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/default/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/default/sql/acl.sql @@ -20,4 +20,5 @@ FROM ) b LEFT JOIN pg_catalog.pg_roles g ON (b.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (b.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/default/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/default/sql/acl.sql index c48706cc1..a658b1764 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/default/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/default/sql/acl.sql @@ -38,4 +38,5 @@ LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) GROUP BY g.rolname, gt.rolname +ORDER BY grantee {% endif %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/default/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/default/sql/acl.sql index 45bc121ce..c999dabae 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/default/sql/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/default/sql/acl.sql @@ -36,4 +36,5 @@ LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) GROUP BY g.rolname, gt.rolname +ORDER BY grantee {% endif %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql index 8fe549790..323c7a228 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql @@ -32,4 +32,5 @@ FROM ) d LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) -GROUP BY g.rolname, gt.rolname; +GROUP BY g.rolname, gt.rolname +ORDER BY grantee; diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql index e38fd3025..c5815c16f 100644 --- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql +++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql @@ -26,3 +26,4 @@ FROM LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid) LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid) GROUP BY g.rolname, gt.rolname +ORDER BY grantee