Subject: PATCH: Resolving issue regarding FTS Parser name

From: Sanket Mehta <[email-masked]>
Date: Thu, 14 Apr 2016 20:18:31 +0530

Hi,

PFA the patch for resolving an issue related to FTS Parser name.

Steps to reproduce the issue:

 - create fts parser with name "user name"
- Expand fts parser
- Right Click and select properties
- Change name to "user name car"

it's give ERROR: syntax error at or near "name"
LINE 2: RENAME TO user name car;

Please do review the patch and send review comments if any.

Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql
index ac29d99..2024410 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql
@@ -2,7 +2,7 @@
 {% if data %}
 {% if data.name and data.name != o_data.name %}
 ALTER TEXT SEARCH PARSER {{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 #}

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Thu, 14 Apr 2016 20:14:42 +0100

Thanks - applied.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company