diff --git a/docs/en_US/release_notes_4_29.rst b/docs/en_US/release_notes_4_29.rst index c0f11370e..fd525bbca 100644 --- a/docs/en_US/release_notes_4_29.rst +++ b/docs/en_US/release_notes_4_29.rst @@ -29,3 +29,4 @@ Bug fixes | `Issue #5991 `_ - Ensure that dirty indicator (*) should not be visible when renaming the tabs. | `Issue #5992 `_ - Fixed an issue where escape character is shown when the server/database name has some special characters. | `Issue #5998 `_ - Fixed an issue where schema diff doesn't show the result of compare if source schema has tables with RLS. +| `Issue #6003 `_ - Fixed an issue where an illegal argument is showing for trigger SQL when a trigger is created for View. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py index ca1290128..f946e306e 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py @@ -1255,10 +1255,13 @@ class ViewNode(PGChildNodeView, VacuumSettings, SchemaDiffObjectCompare): res_rows['tfunction'] = result['rows'][0]['tfunctions'] # Format arguments - if len(res_rows['custom_tgargs']) > 1: - formatted_args = ["{0}".format(arg) for arg in - res_rows['custom_tgargs']] + if len(res_rows['custom_tgargs']) > 0: + driver = get_driver(PG_DEFAULT_DRIVER) + formatted_args = [driver.qtLiteral(arg) + for arg in res_rows['custom_tgargs']] res_rows['tgargs'] = ', '.join(formatted_args) + else: + res_rows['tgargs'] = None SQL = render_template("/".join( [self.trigger_temp_path,