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

@@ -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'