Re: [BUGS] BUG #3378: UTF-8 upper() and lower() don't work

2007-06-11 Thread Thomas H.

hi kenneth

these special characters work fine here:

select lower('ÆØÅ'), upper('æøå'), lower('Æble, tørret'), upper('Æble, 
tørret');


result: æøå ÆØÅ æble, tørretÆBLE, TØRRET

as pavel hinted, you probably aren't using the proper locale settings

cheers,
thomas

 Original Message 
Subject: Re:[BUGS] BUG #3378: UTF-8 upper() and lower() don't work
From: Pavel Stehule [EMAIL PROTECTED]
To: Kenneth Christensen [EMAIL PROTECTED]
Date: 10.06.2007 15:36


Hello,

You have to well initialized database cluster with correct locales.

I don't know good danish locales, but I expect so it will be similar 
with czech.


my database cluster was initialised with cs_CZ.UTF-8 and default
encoding is UTF8.


postgres=# select lower('ŽLUTÝ KŮŇ'), upper('žlutý kůň');
  lower   |   upper
---+---
žlutý kůň | ŽLUTÝ KŮŇ


Check your locales, if is UTF8.

postgres=# SHOW lc_collate ;
lc_collate
-
cs_CZ.UTF-8
(1 row)

Regars
Pavel Stehule


2007/6/10, Kenneth Christensen [EMAIL PROTECTED]:


The following bug has been logged online:

Bug reference:  3378
Logged by:  Kenneth Christensen
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.2
Operating system:   Mac OS 10.4.9
Description:UTF-8 upper() and lower() don't work
Details:

I have a DB where encoding is set to UTF-8.

The DB have some tables where some of the columns (varchar) contains 
danish

chars.

It looks like lower() and upper() ignores the danish chars when I try to
convert to lowercase or uppercase.

E.g.

Case 1:
---

Column 'name' contains 'Æble, tørret':

select upper(food_name.name) from food_name

Result: ÆBLE, TøRRET
Expected result: ÆBLE, TØRRET

or

select lower(food_name.name) from food_name

Result: Æble, tørret
Expected result: æble, tørret

Case 2:
---

Column 'name' contains 'æøå':

select upper(food_name.name) from food_name

Result: æøå
Expected result: ÆØÅ

Case 3:
---

Column 'name' contains 'ÆØÅ':

select lower(food_name.name) from food_name

Result: ÆØÅ
Expected result: æøå

---

I can see I'm not alone with this kind of bug. This bug is really a big
problem for me.

I really don't want to replace PostgreSQL with MySQL !
Will this bug be fixed very soon?

Best regards

Kenneth Christensen

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings




---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[BUGS] BUG #3381: Bad sort order for UTF-8 texts on sk_SK.UTF-8 locale on 8.2.4

2007-06-11 Thread Ujo Jozef

The following bug has been logged online:

Bug reference:  3381
Logged by:  Ujo Jozef
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.2.4
Operating system:   free bsd 6.2
Description:Bad sort order for UTF-8 texts on sk_SK.UTF-8 locale on
8.2.4
Details: 

-- SAMPLE DB, TABLE:
create database test with encoding 'UNICODE';
\c test
create table test (name varchar(8));

-- ENVIROMENT:
test=# SELECT version();
 version

-
 PostgreSQL 8.2.4 on amd64-portbld-freebsd6.2, compiled by GCC cc (GCC)
3.4.6 [FreeBSD] 20060305
(1 row)

-- LOCALE SETTINGS:
test=# SHOW LC_COLLATE;
 lc_collate
-
 sk_SK.UTF-8
(1 row)

test=# SHOW LC_CTYPE;
  lc_ctype
-
 sk_SK.UTF-8
(1 row)

-- SAMPLE DATA:
insert into test values ('a');
insert into test values ('á'); -- lower-case a with acute accent
insert into test values ('z');

-- BAD SELECT RESULT:
test=# select name from test order by name;
 name
--
 a
 z
 á
(3 rows)

Correct order should be: a, á, z. I get correct results on 8.0.8 with
exactly same data as above. Thank you.

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [BUGS] BUG #3381: Bad sort order for UTF-8 texts on sk_SK.UTF-8 locale on 8.2.4

2007-06-11 Thread Tom Lane
Ujo Jozef [EMAIL PROTECTED] writes:
 Description:Bad sort order for UTF-8 texts on sk_SK.UTF-8 locale on
 8.2.4

Your test case works as expected for me.  Maybe there's something hosed
about the locale files on your machine?  Does plain old sort(1) sort the
way you're expecting?  Does locale -a agree that you've spelled the
locale name correctly?

Postgres just sorts the way strcoll() tells it to, so unless you've
messed up the database-encoding-vs-locale dependency (which you seem to
have gotten right), wrong sort order really boils down to being a locale
definition issue.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[BUGS] BUG #3382: Service fails to start with option -w

2007-06-11 Thread Christian Andritzky

The following bug has been logged online:

Bug reference:  3382
Logged by:  Christian Andritzky
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.0.13
Operating system:   Windows XP SP2
Description:Service fails to start with option -w
Details: 

The pgsql-8.0 Win32 service fails to start when option -w is added to the
ImagePath registry entry.

This was observed with versions 8.0.10 and 8.0.13.

It happens no matter if I use pg_ctl register to install the service or if I
add the option manually through regedit.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[BUGS] --enable-thread-safety fails on snapshot version

2007-06-11 Thread George Sakkis

I tried to configure with --enable-thread-safety the snapshot
version and it fails with:

This platform is not thread-safe.  Check the file 'config.log'for the
exact reason.

After digging in config.log, the error turns out to be the lack of the
a test file:

conftest.c:144:43: ./src/test/thread/thread_test.c: No such file or directory

Actually the whole src/test directory is missing from the snapshot
versions. After copying it over from my stable version (8.2.3), it
configures fine. Is this is an accidental omission or deliberate ?

Thanks,

George


--
If I have been able to see further, it was only because I stood on
the shoulders of million monkeys.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [BUGS] --enable-thread-safety fails on snapshot version

2007-06-11 Thread Tom Lane
George Sakkis [EMAIL PROTECTED] writes:
 After digging in config.log, the error turns out to be the lack of the
 a test file:

 conftest.c:144:43: ./src/test/thread/thread_test.c: No such file or directory

 Actually the whole src/test directory is missing from the snapshot
 versions.

It's there AFAICS:

$ tar tfz postgresql-snapshot.tar.gz | grep src/test/thread
postgresql-snapshot/src/test/thread
postgresql-snapshot/src/test/thread/Makefile
postgresql-snapshot/src/test/thread/README
postgresql-snapshot/src/test/thread/thread_test.c
$

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [BUGS] --enable-thread-safety fails on snapshot version

2007-06-11 Thread George Sakkis

On 6/11/07, Tom Lane [EMAIL PROTECTED] wrote:


George Sakkis [EMAIL PROTECTED] writes:
 After digging in config.log, the error turns out to be the lack of the
 a test file:

 conftest.c:144:43: ./src/test/thread/thread_test.c: No such file or directory

 Actually the whole src/test directory is missing from the snapshot
 versions.

It's there AFAICS:

$ tar tfz postgresql-snapshot.tar.gz | grep src/test/thread
postgresql-snapshot/src/test/thread
postgresql-snapshot/src/test/thread/Makefile
postgresql-snapshot/src/test/thread/README
postgresql-snapshot/src/test/thread/thread_test.c
$

regards, tom lane



Ok, got it; I was downloading the base-snapshot.tar.gz. I was misled
by the note, The -base package is the only one that is required for
successful installation; I didn't guess this implies at least with
the defaut configure settings.

Thanks,
George

--
If I have been able to see further, it was only because I stood on
the shoulders of million monkeys.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings