Properly quote names when renaming FTS dictionaries and templates. Fixes #1857

pull/3/head
Surinder Kumar 2016-10-14 12:23:10 -07:00 committed by Dave Page
parent 7f507f294e
commit 17bd379cb6
2 changed files with 3 additions and 3 deletions

View File

@ -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 %}
{% endif %}

View File

@ -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 #}