mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-23 15:40:45 -06:00
Ensure sql for Role should be visible in SQL panel for GPDB. Fixes #3578
This commit is contained in:
parent
d68c967423
commit
46d4bf027d
@ -18,3 +18,4 @@ Bug fixes
|
|||||||
| `Bug #3407 <https://redmine.postgresql.org/issues/3407>`_ - Fix keyboard shortcuts layout in the preferences panel.
|
| `Bug #3407 <https://redmine.postgresql.org/issues/3407>`_ - Fix keyboard shortcuts layout in the preferences panel.
|
||||||
| `Bug #3461 <https://redmine.postgresql.org/issues/3461>`_ - Ensure that refreshing a node also updates the Property list.
|
| `Bug #3461 <https://redmine.postgresql.org/issues/3461>`_ - Ensure that refreshing a node also updates the Property list.
|
||||||
| `Bug #3528 <https://redmine.postgresql.org/issues/3528>`_ - Handle connection errors properly in the query tool.
|
| `Bug #3528 <https://redmine.postgresql.org/issues/3528>`_ - Handle connection errors properly in the query tool.
|
||||||
|
| `Bug #3578 <https://redmine.postgresql.org/issues/3578>`_ - Ensure sql for Role should be visible in SQL panel for GPDB.
|
||||||
|
@ -59,35 +59,6 @@ FROM
|
|||||||
oid=%(rid)s::OID
|
oid=%(rid)s::OID
|
||||||
) r
|
) r
|
||||||
) a) b)
|
) a) b)
|
||||||
-- PostgreSQL >= 9.0
|
|
||||||
UNION ALL
|
|
||||||
(SELECT
|
|
||||||
array_to_string(array_agg(sql), E'\n') AS sql
|
|
||||||
FROM
|
|
||||||
(SELECT
|
|
||||||
'ALTER ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
|
|
||||||
' SET ' || param|| ' TO ' ||
|
|
||||||
CASE
|
|
||||||
WHEN param IN ('search_path', 'temp_tablespaces') THEN value
|
|
||||||
ELSE quote_literal(value)
|
|
||||||
END || ';' AS sql
|
|
||||||
FROM
|
|
||||||
(SELECT
|
|
||||||
datname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
|
|
||||||
FROM
|
|
||||||
(SELECT
|
|
||||||
d.datname, unnest(c.setconfig) AS rolconfig
|
|
||||||
FROM
|
|
||||||
(SELECT *
|
|
||||||
FROM
|
|
||||||
pg_catalog.pg_db_role_setting dr
|
|
||||||
WHERE
|
|
||||||
dr.setrole=%(rid)s::OID AND dr.setdatabase!=0) c
|
|
||||||
LEFT JOIN pg_catalog.pg_database d ON (d.oid = c.setdatabase)
|
|
||||||
) a
|
|
||||||
) b
|
|
||||||
) d
|
|
||||||
)
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
(SELECT
|
(SELECT
|
||||||
'COMMENT ON ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) || ' IS ' || pg_catalog.quote_literal(description) || ';' AS sql
|
'COMMENT ON ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) || ' IS ' || pg_catalog.quote_literal(description) || ';' AS sql
|
||||||
|
Loading…
Reference in New Issue
Block a user