Use PUBLIC (in caps) whenever used as a keyword. Fixes #1138

This commit is contained in:
Ashesh Vashi
2016-06-23 09:15:04 +05:30
parent 0ee096dbf6
commit b78b3904cd
66 changed files with 83 additions and 86 deletions

View File

@@ -1,4 +1,4 @@
SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,

View File

@@ -2,11 +2,11 @@
{% if fsid %}
WITH umapData AS
(
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'public'::name ELSE a.rolname END AS name,
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'PUBLIC'::name ELSE a.rolname END AS name,
array_to_string(u.umoptions, ',') AS umoptions FROM pg_user_mapping u
LEFT JOIN pg_authid a ON a.oid = u.umuser WHERE u.umserver = {{ fsid }}::OID
)
SELECT um.um_oid, name, dep.deptype FROM umapData um
LEFT JOIN pg_depend dep ON dep.objid=um.um_oid
{% endif %}
{% endif %}

View File

@@ -1,4 +1,4 @@
SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,

View File

@@ -2,11 +2,11 @@
{% if fsid %}
WITH umapData AS
(
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'public'::name ELSE a.rolname END AS name,
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'PUBLIC'::name ELSE a.rolname END AS name,
array_to_string(u.umoptions, ',') AS umoptions FROM pg_user_mapping u
LEFT JOIN pg_authid a ON a.oid = u.umuser WHERE u.umserver = {{ fsid }}::OID
)
SELECT um.um_oid, name, dep.deptype FROM umapData um
LEFT JOIN pg_depend dep ON dep.objid=um.um_oid
{% endif %}
{% endif %}

View File

@@ -336,9 +336,6 @@ class UserMappingView(PGChildNodeView):
if not status:
return internal_server_error(errormsg=res)
if res['rows'][0]['name'] == 'public':
res['rows'][0]['name'] = 'PUBLIC'
if res['rows'][0]['umoptions'] is not None:
res['rows'][0]['umoptions'] = self.tokenizeOptions(res['rows'][0]['umoptions'])

View File

@@ -8,7 +8,7 @@ WHERE srv.oid = {{fserid}}::int
{% if fsid or umid or fdwdata or data %}
WITH umapData AS
(
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'public'::name ELSE a.rolname END AS name,
SELECT u.oid AS um_oid, CASE WHEN u.umuser = 0::oid THEN 'PUBLIC'::name ELSE a.rolname END AS name,
array_to_string(u.umoptions, ',') AS umoptions FROM pg_user_mapping u
LEFT JOIN pg_authid a ON a.oid = u.umuser {% if fsid %} WHERE u.umserver = {{fsid}}::int {% endif %} {% if umid %} WHERE u.oid= {{umid}}::int {% endif %}
)
@@ -20,4 +20,4 @@ WITH umapData AS
WHERE fdw.fdwname = {{fdwdata.name|qtLiteral}}::text
{% endif %}
ORDER BY 2;
{% endif %}
{% endif %}

View File

@@ -1,4 +1,4 @@
SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,

View File

@@ -1,4 +1,4 @@
SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,
@@ -18,4 +18,4 @@ 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

View File

@@ -314,7 +314,7 @@ class LanguageView(PGChildNodeView):
# if no acl found then by default add public
if res['rows'][0]['acl'] is None:
res['rows'][0]['lanacl'] = dict()
res['rows'][0]['lanacl']['grantee'] = 'public'
res['rows'][0]['lanacl']['grantee'] = 'PUBLIC'
res['rows'][0]['lanacl']['grantor'] = res['rows'][0]['lanowner']
res['rows'][0]['lanacl']['privileges'] = [{'privilege_type': 'U', 'privilege': True, 'with_grant': False}]
else:

View File

@@ -1,4 +1,4 @@
SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor,
SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT

View File

@@ -1,4 +1,4 @@
SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor,
SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,5 +1,5 @@
SELECT
COALESCE(gt.rolname, 'public') AS grantee,
COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -1,4 +1,4 @@
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,
@@ -27,4 +27,4 @@ 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

View File

@@ -1,4 +1,4 @@
SELECT 'attacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'attacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,
@@ -31,4 +31,4 @@ 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

View File

@@ -1,4 +1,4 @@
SELECT 'attacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'attacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,
@@ -31,4 +31,4 @@ 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

View File

@@ -1,5 +1,5 @@
{### SQL to fetch privileges for tablespace ###}
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor,
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
@@ -43,4 +43,4 @@ 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

View File

@@ -1,5 +1,5 @@
{### SQL to fetch privileges for tablespace ###}
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor,
SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
@@ -43,4 +43,4 @@ 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

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -5,7 +5,7 @@ SELECT
WHEN 'f' THEN 'deffuncacl'
ELSE 'UNKNOWN - ' || a.deftype
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -6,7 +6,7 @@ SELECT
WHEN 'T' THEN 'deftypeacl'
ELSE 'UNKNOWN - ' || a.deftype
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -5,7 +5,7 @@ SELECT
WHEN 'f' THEN 'deffuncacl'
ELSE 'UNKNOWN - ' || a.deftype
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,6 +1,6 @@
{# Fetch privileges for schema #}
SELECT
'nspacl' as deftype, COALESCE(gt.rolname, 'public') AS grantee,
'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
array_agg(b.is_grantable) AS grantable
FROM

View File

@@ -6,7 +6,7 @@ SELECT
WHEN 'T' THEN 'deftypeacl'
ELSE 'UNKNOWN - ' || a.deftype
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,4 +1,4 @@
SELECT 'typacl' as deftype, COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
SELECT 'typacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
FROM
(SELECT
d.grantee, d.grantor, d.is_grantable,
@@ -23,4 +23,4 @@ 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

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -2,7 +2,7 @@
{% if vid %}
SELECT
'datacl' as deftype,
COALESCE(gt.rolname, 'public') grantee,
COALESCE(gt.rolname, 'PUBLIC') grantee,
g.rolname grantor,
array_agg(privilege_type) as privileges,
array_agg(is_grantable) as grantable

View File

@@ -1,5 +1,5 @@
SELECT
'datacl' AS deftype, COALESCE(gt.rolname, 'public') AS grantee,
'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -5,7 +5,7 @@ SELECT
WHEN 'f' THEN 'deffuncacl'
WHEN 'T' THEN 'deftypeacl'
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,5 +1,5 @@
SELECT
'datacl' AS deftype, COALESCE(gt.rolname, 'public') AS grantee,
'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -5,7 +5,7 @@ SELECT
WHEN 'f' THEN 'deffuncacl'
WHEN 'T' THEN 'deftypeacl'
END AS deftype,
COALESCE(gt.rolname, 'public') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,

View File

@@ -1,5 +1,5 @@
SELECT
'datacl' AS deftype, COALESCE(gt.rolname, 'public') AS grantee,
'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
g.rolname AS grantor, array_agg(privilege_type) AS privileges,
array_agg(is_grantable) AS grantable
FROM

View File

@@ -5,7 +5,7 @@ SELECT
WHEN 'f' THEN 'deffuncacl'
WHEN 'T' THEN 'deftypeacl'
END AS deftype,
COALESCE(gt.rolname, 'public') AS grantee, g.rolname AS grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
COALESCE(gt.rolname, 'PUBLIC') AS grantee, g.rolname AS grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
FROM
(SELECT
(acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,