public inbox for [email protected]
help / color / mirror / Atom feed[Patch]: Error while renaming FTS dictionary and FTS template nodes
2+ messages / 2 participants
[nested] [flat]
* [Patch]: Error while renaming FTS dictionary and FTS template nodes
@ 2016-10-14 10:19 Surinder Kumar <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Surinder Kumar @ 2016-10-14 10:19 UTC (permalink / raw)
To: pgadmin-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 #}
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [Patch]: Error while renaming FTS dictionary and FTS template nodes
@ 2016-10-14 19:23 Dave Page <[email protected]>
parent: Surinder Kumar <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2016-10-14 19:23 UTC (permalink / raw)
To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers
Thanks, applied.
On Friday, October 14, 2016, Surinder Kumar <[email protected]>
wrote:
> 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
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-10-14 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 10:19 [Patch]: Error while renaming FTS dictionary and FTS template nodes Surinder Kumar <[email protected]>
2016-10-14 19:23 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox