public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [Patch]: Error while renaming FTS dictionary and FTS template nodes
Date: Fri, 14 Oct 2016 15:49:36 +0530
Message-ID: <CAM5-9D8p-TC3S9cvbtFMtPQ3_opc1Dm8YBLW+M3vxe_6s=X_SA@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi
*Issue fixed:*
While renaming a object, the name must be enclosed within double quotes
using qtIdent.
Please find attached patch and review.
Thanks
Surinder Kumar
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM1857.patch (2.0K, 3-RM1857.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql
index 51ba179..8b17c68 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql
@@ -5,7 +5,7 @@
{% if data.name and data.name != o_data.name %}
{% set name = data.name %}
ALTER TEXT SEARCH DICTIONARY {{conn|qtIdent(o_data.schema)}}.{{conn|qtIdent(o_data.name)}}
- RENAME TO {{data.name}};
+ RENAME TO {{ conn|qtIdent(data.name) }};
{% endif %}
{% if 'options' in data %}
@@ -46,4 +46,4 @@ ALTER TEXT SEARCH DICTIONARY {{conn|qtIdent(o_data.schema)}}.{{conn|qtIdent(name
COMMENT ON TEXT SEARCH DICTIONARY {{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}
IS {{ data.description|qtLiteral }};
{% endif %}
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql
index 4c7362f..d6754f0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql
@@ -2,7 +2,7 @@
{% if data %}
{% if data.name and data.name != o_data.name %}
ALTER TEXT SEARCH TEMPLATE {{conn|qtIdent(o_data.schema)}}.{{conn|qtIdent(o_data.name)}}
- RENAME TO {{data.name}};
+ RENAME TO {{ conn|qtIdent(data.name) }};
{% endif %}
{#in case of rename, use new fts template name #}
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: [Patch]: Error while renaming FTS dictionary and FTS template nodes
In-Reply-To: <CAM5-9D8p-TC3S9cvbtFMtPQ3_opc1Dm8YBLW+M3vxe_6s=X_SA@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