Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-04 Thread Tom Lane
Kern Sibbald k...@sibbald.com writes: Concerning the future: I am still a bit concerning about the mention in the document of possible future changes concerning SQL_ASCII and LC_CTYPE not C or POSIX (Using this combination of settings is deprecated and may someday be forbidden altogether.

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-04 Thread Kern Sibbald
On Thursday 03 December 2009 16:42:58 Adrian Klaver wrote: On Wednesday 02 December 2009 11:33:38 pm Kern Sibbald wrote: ( BTW, one way to handle incorrectly encoded filenames and paths might be to have a `bytea' field that's generally null to store such mangled file names. Personally

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-04 Thread Kern Sibbald
Hello, Thanks for your response. On Thursday 03 December 2009 16:46:54 Tom Lane wrote: Sam Mason s...@samason.me.uk writes: As others have said; BYTEA is probably the best datatype for you to use. The encoding of BYTEA literals is a bit of a fiddle and may need some changes, but it's

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Kern Sibbald
Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client machine (FD -- or File daemon). On say a Unix/Linux system, the

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Pavel Stehule
2009/12/3 Kern Sibbald k...@sibbald.com: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client machine (FD -- or File

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Craig Ringer
Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client machine (FD -- or File daemon). On say

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Avi Rozen
Craig Ringer wrote: Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client machine (FD -- or

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Daniel Verite
Craig Ringer wrote: While true in theory, in practice it's pretty unusual to have filenames encoded with an encoding other than the system LC_CTYPE on a modern UNIX/Linux/BSD machine. It depends. In western Europe, where iso-8859-1[5] and utf8 are evenly used, it's not unusual at all.

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Kern Sibbald
Craig Ringer wrote: Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client machine (FD -- or

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Sam Mason
On Thu, Dec 03, 2009 at 08:33:38AM +0100, Kern Sibbald wrote: Bacula gets the raw filename from the OS and stores it on the Volume then puts it in the database. We treat the filename as if it is UTF-8 for display purposes, but in all other cases, what we want is for the filename to go into

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Bruce Momjian
Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. We aim to please, and overwhelm. :-) -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Greg Stark
On Thu, Dec 3, 2009 at 8:33 AM, Craig Ringer cr...@postnewspapers.com.au wrote: While true in theory, in practice it's pretty unusual to have filenames encoded with an encoding other than the system LC_CTYPE on a modern UNIX/Linux/BSD machine. I'd _very_ much prefer to have Bacula back my

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Adrian Klaver
On Wednesday 02 December 2009 11:33:38 pm Kern Sibbald wrote: ( BTW, one way to handle incorrectly encoded filenames and paths might be to have a `bytea' field that's generally null to store such mangled file names. Personally though I'd favour just rejecting them. ) We set SQL_ASCII

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Tom Lane
Sam Mason s...@samason.me.uk writes: As others have said; BYTEA is probably the best datatype for you to use. The encoding of BYTEA literals is a bit of a fiddle and may need some changes, but it's going to be much more faithful to your needs of treating the filename as an opaque blob of

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Craig Ringer
Frank Sweetser wrote: Unless, of course, you're at a good sized school with lots of international students, and have fileservers holding filenames created on desktops running in Chinese, Turkish, Russian, and other locales. What I struggle with here is why they're not using ru_RU.UTF-8,

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Ivan Sergio Borgonovo
On Thu, 3 Dec 2009 12:22:50 +0100 (CET) Kern Sibbald k...@sibbald.com wrote: Yes, that is my experience too. I understand Craig's comments, but I would much prefer that Bacula just backup and restore and leave the checking of filename consistencies to other programs. At least for the moment,

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Sam Mason
On Thu, Dec 03, 2009 at 10:46:54AM -0500, Tom Lane wrote: Sam Mason s...@samason.me.uk writes: As others have said; BYTEA is probably the best datatype for you to use. The encoding of BYTEA literals is a bit of a fiddle and may need some changes, but it's going to be much more faithful to

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Frank Sweetser
On 12/03/2009 10:54 AM, Craig Ringer wrote: Frank Sweetser wrote: Unless, of course, you're at a good sized school with lots of international students, and have fileservers holding filenames created on desktops running in Chinese, Turkish, Russian, and other locales. What I struggle with

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Eitan Talmi
Hi Avi Please have a look at this link, this is how to install Bacula with MYSQL database with Hebrew support Eitan On Thu, Dec 3, 2009 at 12:35 PM, Avi Rozen avi.ro...@gmail.com wrote: Craig Ringer wrote: Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Frank Sweetser
On 12/3/2009 3:33 AM, Craig Ringer wrote: Kern Sibbald wrote: Hello, Thanks for all the answers; I am a bit overwhelmed by the number, so I am going to try to answer everyone in one email. The first thing to understand is that it is *impossible* to know what the encoding is on the client

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Alvaro Herrera
Craig Ringer wrote: Frank Sweetser wrote: Unless, of course, you're at a good sized school with lots of international students, and have fileservers holding filenames created on desktops running in Chinese, Turkish, Russian, and other locales. What I struggle with here is why they're

[GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Kern Sibbald
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

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Tom Lane
Kern Sibbald k...@sibbald.com writes: Bacula sets the database encoding to SQL_ASCII, because although Bacula supports UTF-8 character encoding, it cannot enforce it. Okay ... CREATE DATABASE bacula ENCODING 'SQL_ASCII'; However, with PostgreSQL 8.4, the above command is ignored because

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Adrian Klaver
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

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 2/12/2009 9:18 PM, Kern Sibbald wrote: Hello, I am the project manager of Bacula. One of the database backends that Bacula uses is PostgreSQL. As a Bacula user (though I'm not on the Bacula lists), first - thanks for all your work. It's practically eliminated all human intervention from

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Tom Lane
Craig Ringer cr...@postnewspapers.com.au writes: It's a pity that attempting to specify an encoding other than the safe one when using a non-template0 database doesn't cause the CREATE DATABASE command to fail with an error. Huh? regression=# create database foo lc_ctype = 'en_US.utf8'

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 3/12/2009 11:03 AM, Tom Lane wrote: Craig Ringercr...@postnewspapers.com.au writes: It's a pity that attempting to specify an encoding other than the safe one when using a non-template0 database doesn't cause the CREATE DATABASE command to fail with an error. Huh? regression=# create

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 3/12/2009 11:09 AM, Jerome Alet wrote: On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: Anyway, it'd be nice if Bacula would convert file names to utf-8 at the file daemon, using the encoding of the client, for storage in a utf-8 database. +1 for me. this is the way to go.

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: ... so it's defaulting to SQL_ASCII, but actually supports utf-8 if your systems are all in a utf-8 locale. Assuming there's some way for the filed to find out the encoding of the director's database, it probably wouldn't be too tricky

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Jerome Alet
On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: Anyway, it'd be nice if Bacula would convert file names to utf-8 at the file daemon, using the encoding of the client, for storage in a utf-8 database. +1 for me. this is the way to go. I understand people with an existing backup

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Jose Ildefonso Camargo Tolosa
Hi! On Thu, Dec 3, 2009 at 10:39 PM, Jerome Alet jerome.a...@univ-nc.nc wrote: On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: Anyway, it'd be nice if Bacula would convert file names to utf-8 at the file daemon, using the encoding of the client, for storage in a utf-8 database.

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
Stephen Frost wrote: * Craig Ringer (cr...@postnewspapers.com.au) wrote: ... so it's defaulting to SQL_ASCII, but actually supports utf-8 if your systems are all in a utf-8 locale. Assuming there's some way for the filed to find out the encoding of the director's database, it probably