public inbox for [email protected]
help / color / mirror / Atom feedFrom: Yogesh Mahajan <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][Patch] Bug #6003 - exibição errada de tabela em trigger de view (Wrong table display in view trigger)
Date: Tue, 1 Dec 2020 21:12:22 +0530
Message-ID: <CAMa=N=Mu5Gv+py7c35n=WFS2=hC49Z0076=LA0jbxYwQ_H4Rew@mail.gmail.com> (raw)
Hi,
Please find a patch which fixes incorrect view trigger sql display for
table sql.
Thanks,
Yogesh Mahajan
EnterpriseDB
Attachments:
[application/octet-stream] RM6003_v1.patch (1.2K, 3-RM6003_v1.patch)
download | inline diff:
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,
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][Patch] Bug #6003 - exibição errada de tabela em trigger de view (Wrong table display in view trigger)
In-Reply-To: <CAMa=N=Mu5Gv+py7c35n=WFS2=hC49Z0076=LA0jbxYwQ_H4Rew@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox