Fix reverse engineering SQL issue for triggers when passed a single argument to trigger function. Fixes #4958.

This commit is contained in:
Akshay Joshi
2019-12-05 11:45:47 +05:30
parent f901eeeb4a
commit 6c7fe644e5
2 changed files with 2 additions and 1 deletions

View File

@@ -120,7 +120,7 @@ def get_trigger_function_and_columns(conn, data, tid,
'tfunctions' in result['rows'][0]:
data['tfunction'] = result['rows'][0]['tfunctions']
if len(data['custom_tgargs']) > 1:
if len(data['custom_tgargs']) > 0:
# We know that trigger has more than 1 argument, let's join them
# and convert it to string
formatted_args = ["'{0}'".format(arg)