Fixed an issue where the dependencies tab showing multiple owners for the objects having shared dependencies. Fixes #6087

This commit is contained in:
Akshay Joshi 2021-01-29 12:10:21 +05:30
parent 48e257e5af
commit 358af42c50
5 changed files with 17 additions and 4 deletions

View File

@ -19,6 +19,7 @@ Bug fixes
| `Issue #5871 <https://redmine.postgresql.org/issues/5871>`_ - Ensure that username should be visible in the 'Connect to Server' popup when service and user name both specified.
| `Issue #6045 <https://redmine.postgresql.org/issues/6045>`_ - Fixed autocomplete issue where it is not showing any suggestions if the schema name contains escape characters.
| `Issue #6087 <https://redmine.postgresql.org/issues/6087>`_ - Fixed an issue where the dependencies tab showing multiple owners for the objects having shared dependencies.
| `Issue #6163 <https://redmine.postgresql.org/issues/6163>`_ - Fixed an issue where Zoom to fit button only works if the diagram is larger than the canvas.
| `Issue #6164 <https://redmine.postgresql.org/issues/6164>`_ - Ensure that the diagram should not vanish entirely if zooming out too far in ERD.
| `Issue #6179 <https://redmine.postgresql.org/issues/6179>`_ - Fixed an issue where Generate SQL displayed twice in the ERD tool.

View File

@ -1,4 +1,8 @@
SELECT rolname AS refname, refclassid, deptype
FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}} ORDER BY 1
{{where_clause}}
{% if db_name %}
AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
{% endif %}
ORDER BY 1

View File

@ -1,4 +1,8 @@
SELECT rolname AS refname, refclassid, deptype
FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}} ORDER BY 1
{{where_clause}}
{% if db_name %}
AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
{% endif %}
ORDER BY 1

View File

@ -1,4 +1,8 @@
SELECT rolname AS refname, refclassid, deptype
FROM pg_shdepend dep
LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
{{where_clause}} ORDER BY 1
{{where_clause}}
{% if db_name %}
AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = '{{db_name}}')
{% endif %}
ORDER BY 1

View File

@ -490,7 +490,7 @@ class PGChildNodeView(NodeView):
if where_clause.find('subid') < 0:
sql = render_template(
"/".join([sql_path, 'role_dependencies.sql']),
where_clause=where_clause)
where_clause=where_clause, db_name=conn.db)
status, result = conn.execute_dict(sql)
if not status: