Fix 'Could not find the object on the server.' error while refreshing the check constraint. Fixes #4966.

This commit is contained in:
Akshay Joshi 2019-12-03 14:18:45 +05:30
parent 0a67b2ecb9
commit 9110703aaa
4 changed files with 6 additions and 2 deletions

View File

@ -45,4 +45,5 @@ Bug fixes
| `Issue #4953 <https://redmine.postgresql.org/issues/4953>`_ - Fix an issue where pgAdmin4 unable to retrieve table node if the trigger is already disabled and the user clicks on Enable All.
| `Issue #4964 <https://redmine.postgresql.org/issues/4964>`_ - Fix an issue where length and precision are not removed from table/column dialog.
| `Issue #4965 <https://redmine.postgresql.org/issues/4965>`_ - Fix an issue where the Interval data type is not displayed in the properties dialog of table/column.
| `Issue #4966 <https://redmine.postgresql.org/issues/4966>`_ - Fix 'Could not find the object on the server.' error while refreshing the check constraint.
| `Issue #4978 <https://redmine.postgresql.org/issues/4978>`_ - Fix pgAdmin4 failed to start issue after upgrading to version 4.15.

View File

@ -289,6 +289,7 @@ class CheckConstraintView(PGChildNodeView):
"""
SQL = render_template("/".join([self.template_path,
'nodes.sql']),
tid=tid,
cid=cid)
status, rset = self.conn.execute_2darray(SQL)

View File

@ -2,6 +2,7 @@ SELECT c.oid, conname as name,
NOT convalidated as convalidated
FROM pg_constraint c
WHERE contype = 'c'
{% if tid %}
AND conrelid = {{ tid }}::oid
{% if cid %}
AND c.oid = {{ cid }}::oid
{% endif %}

View File

@ -1,6 +1,7 @@
SELECT c.oid, conname as name
FROM pg_constraint c
WHERE contype = 'c'
{% if tid %}
AND conrelid = {{ tid }}::oid
{% if cid %}
AND c.oid = {{ cid }}::oid
{% endif %}