Bug#546246: bacula-director-pgsql: missing -T template0 in creation of database

2009-12-02 Thread Lucas B. Cohen
retitle 546246 bacula-director-pgsql: missing -T template0 in creation
of database with PostgreSQL 8.4
tag 546246 upstream, confirmed
thanks

Michael, thank you for reporting.

I am not comfortable with patching things this way, as I am afraid it
could break things for users of previous versions. Upstream seems to
believe it is the case too.

A discussion has been initiated with the PostgreSQL developers on
http://marc.info/?l=bacula-devel&m=125975994721892&w=2

I'll try to see if some kind of version detection is possible for a more
general solution. Until then this will at least be documented.

Best Regards,




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#546246: bacula-director-pgsql: missing -T template0 in creation of database

2009-09-11 Thread Michael Stapelberg
Package: bacula-director-pgsql
Version: 3.0.2-3
Severity: normal

My postgresql 8.4 database was created with all tables having UTF8 as
encoding, probably because I use an UTF8-locale. Now bacula needs to use
SQL_ASCII instead of UTF8 and this is correctly specified in the postinst
script.

The problem is that postgresql cannot create the database with a different
encoding (SQL_ASCII vs. UTF8) as long as you do not specify -T template0:



postgres $ createdb -O bacula -E SQL_ASCII bacula
createdb: database creation failed: ERROR:  new encoding (SQL_ASCII) is 
incompatible with the encoding of the template database (UTF8)
HINT:  Use the same encoding as in the template database, or use template0 as 
template.

postgres $ createdb -O bacula -E SQL_ASCII -T template0 bacula

postgres $ psql

postgres=# \l
  List of databases
   Name|  Owner   | Encoding  |  Collation  |Ctype|   Access 
privileges
---+--+---+-+-+---
 bacula| bacula   | SQL_ASCII | de_DE.UTF-8 | de_DE.UTF-8 |
 postgres  | postgres | UTF8  | de_DE.UTF-8 | de_DE.UTF-8 |
 template0 | postgres | UTF8  | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres
  : 
postgres=CTc/postgres
 template1 | postgres | UTF8  | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres
  : 
postgres=CTc/postgres
(4 rows)



So, please add this flag to the creation.

Thanks and best regards,
Michael



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org