Fixed invalid literal issue when fetching dependencies for Materialized View. Fixed #5882

This commit is contained in:
Akshay Joshi 2020-10-05 17:53:47 +05:30
parent e4029cca04
commit 9466278be2
2 changed files with 4 additions and 1 deletions

View File

@ -38,4 +38,5 @@ Bug fixes
| `Issue #5855 <https://redmine.postgresql.org/issues/5855>`_ - Ensure that the user should be able to change the start value of the existing sequence.
| `Issue #5861 <https://redmine.postgresql.org/issues/5861>`_ - Ensure that the 'Remove Server' option should be visible in the context menu.
| `Issue #5867 <https://redmine.postgresql.org/issues/5867>`_ - Fixed an issue where some properties are not being updated correctly for the shared server.
| `Issue #5882 <https://redmine.postgresql.org/issues/5882>`_ - Fixed invalid literal issue when fetching dependencies for Materialized View.
| `Issue #5885 <https://redmine.postgresql.org/issues/5885>`_ - Fixed an issue where the user is unable to change the macro name.

View File

@ -638,7 +638,9 @@ class PGChildNodeView(NodeView):
# if type is present in the types dictionary, but it's
# value is None then it requires special handling.
if type_str[0] == 'r':
if int(type_str[1]) > 0:
if (type_str[1].isdigit() and int(type_str[1]) > 0) or \
(len(type_str) > 2 and type_str[2].isdigit() and
int(type_str[2]) > 0):
type_name = 'column'
else:
type_name = 'table'