mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Fixed an issue where an illegal argument is showing for trigger SQL when a trigger is created for View. Fixes #6003
This commit is contained in:
parent
64e6570f00
commit
26b3bc3f74
@ -29,3 +29,4 @@ Bug fixes
|
||||
| `Issue #5991 <https://redmine.postgresql.org/issues/5991>`_ - Ensure that dirty indicator (*) should not be visible when renaming the tabs.
|
||||
| `Issue #5992 <https://redmine.postgresql.org/issues/5992>`_ - Fixed an issue where escape character is shown when the server/database name has some special characters.
|
||||
| `Issue #5998 <https://redmine.postgresql.org/issues/5998>`_ - Fixed an issue where schema diff doesn't show the result of compare if source schema has tables with RLS.
|
||||
| `Issue #6003 <https://redmine.postgresql.org/issues/6003>`_ - Fixed an issue where an illegal argument is showing for trigger SQL when a trigger is created for View.
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user