[postgres] add `lc_collate` and `lc_ctype` (closes #5438104)
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Fri, 05 Jun 2015 18:06:03 +0200
changeset 40 54b3058cbca9
parent 39 f4ce04853cb1
child 41 85e8d844ae44
[postgres] add `lc_collate` and `lc_ctype` (closes #5438104)
cubicweb/postgres.sls
pillar.example
--- a/cubicweb/postgres.sls	Fri Jun 05 16:50:49 2015 +0200
+++ b/cubicweb/postgres.sls	Fri Jun 05 18:06:03 2015 +0200
@@ -41,6 +41,12 @@
     - owner: {{ config.database.user }}
     - encoding: 'UTF8'
     - template: template0
+    {% if config.database.get('lc_collate', False) %}
+    - lc_collate: {{ config.database.lc_collate }}
+    {% endif %}
+    {% if config.database.get('lc_ctype', False) %}
+    - lc_ctype: {{ config.database.lc_ctype }}
+    {% endif %}
     - require:
       - postgres_user: pg-{{vhostname}}-{{name}}
       - service: pg-server
--- a/pillar.example	Fri Jun 05 16:50:49 2015 +0200
+++ b/pillar.example	Fri Jun 05 18:06:03 2015 +0200
@@ -38,6 +38,8 @@
         user: logidemo
         password: logidemo
         host: localhost
+        lc_collate: us_US.UTF-8
+        lc_ctype: us_US.UTF-8
         superuser: True # will create postgres user logidemo as superuser
         port: 5432
       cwapp: