Re: Catastrophic changes to PostgreSQL 8.4

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Kern Sibbald <kern(at)sibbald(dot)com>, "bacula-devel" <bacula-devel(at)lists(dot)sourceforge(dot)net>, "bacula-users" <bacula-users(at)lists(dot)sourceforge(dot)net>
Subject: Re: Catastrophic changes to PostgreSQL 8.4
Date: 2009-12-02 22:49:15
Message-ID: 200912021449.15697.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wednesday 02 December 2009 5:18:52 am Kern Sibbald wrote:
> Hello,
>
> I am the project manager of Bacula. One of the database backends that
> Bacula uses is PostgreSQL.
>
> This email is to notify you that a change you made to setting database
> character codes has created havoc with certain unfortunate Bacula users.
>
> Bacula sets the database encoding to SQL_ASCII, because although
> Bacula "supports" UTF-8 character encoding, it cannot enforce it. Certain
> operating systems such as Unix, Linux and MacOS can have filenames that are
> not in UTF-8 format. Since Bacula stores filenames in PostgreSQL tables,
> we use SQL_ASCII.
>
> We set SQL_ASCII by default when creating the database via the command
> recommended in recent versions of PostgreSQL (e.g. 8.1), with:
>
> CREATE DATABASE bacula ENCODING 'SQL_ASCII';
>
> However, with PostgreSQL 8.4, the above command is ignored because the
> default table copied is not template0. This means that some Bacula users
> who have created PostgreSQL databases with version 8.4, typically find them
> created with SQL_UTF8 format, which results in serious errors when doing
> backups for certain machines.

When I tried the above Postgres did not ignore the command, instead it gave me
the following error and did not create the database:
CREATE DATABASE bacula ENCODING 'SQL_ASCII';
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.

>
> Regards,
>
> Kern

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andre Lopes 2009-12-02 22:52:51 How to auto-increment?
Previous Message Daniel Verite 2009-12-02 22:45:12 Re: Cannot login, with C/C++ program

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2009-12-02 23:05:51 Re: SE-PgSQL patch review
Previous Message Tom Lane 2009-12-02 22:37:08 Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a