public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nikhil Mohite <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][PM-4438]: Adding new entries fails when primary key is on any data type and name contains special characters.
Date: Mon, 8 Mar 2021 14:08:59 +0530
Message-ID: <CAOBg0AOPctXQiwRZ3O0rAKgymh-Kn50+RccYSucPxANBiAu_YA@mail.gmail.com> (raw)
Hi Hackers,
Please find the attached patch for RM-4438
<https://redmine.postgresql.org/issues/4438;: Adding new entries fails when
primary key is on any data type and name contains special characters.
--
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*
Attachments:
[application/octet-stream] RM-4438.patch (670B, 3-RM-4438.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/utils/save_changed_data.py b/web/pgadmin/tools/sqleditor/utils/save_changed_data.py
index 27d927a6..3997d93b 100644
--- a/web/pgadmin/tools/sqleditor/utils/save_changed_data.py
+++ b/web/pgadmin/tools/sqleditor/utils/save_changed_data.py
@@ -36,6 +36,8 @@ def save_changed_data(changed_data, columns_info, conn, command_obj,
operations = ('added', 'updated', 'deleted')
list_of_sql = {}
_rowid = None
+ # Replace '%' with '%%' as python use '%' as string formatting.
+ command_obj.object_name = command_obj.object_name.replace('%', '%%')
pgadmin_alias = {
col_name: col_info['pgadmin_alias']
view thread (4+ 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][PM-4438]: Adding new entries fails when primary key is on any data type and name contains special characters.
In-Reply-To: <CAOBg0AOPctXQiwRZ3O0rAKgymh-Kn50+RccYSucPxANBiAu_YA@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