error in upper()

Lists: pgsql-bugs
From: Klaus Ita <klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at>
To: pgsql-bugs(at)postgresql(dot)org
Subject: error in upper()
Date: 2006-08-18 07:44:27
Message-ID: 20060818074427.GE32240@aipc54.ai.wu-wien.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

I know that tom is going to say this is not a bug in pg and he is probably
right. but still i want to state, that in pg 8.1 the

select lower(upper('ß'))

does not return 'ss'. because the upper('ß') does not return 'SS' in the
first place. I know, german is a terrible language, but still - we are using
it :-)

thx,
klaus

and tom. there is no offence at all! I love Pg and the work you are doing.
thank you!


From: Richard Troy <rtroy(at)ScienceTools(dot)com>
To: Klaus Ita <klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: error in upper()
Date: 2006-08-19 16:49:41
Message-ID: Pine.LNX.4.33.0608190942360.32544-100000@denzel.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi Klaus,

I must have missed the bug submitted about this, but as a student of
German I took particular interest in your post.

I'm unaware of any upper case or lower case for 'ß', just as there is no
upper or lower case for '@'. So, I'd expect the function to pass it
through. It's not - or shouldn't be - the business of upper() or lower()
to translate your characters for you which haven't got an appropriate
upper or lower case version...

Rgds,
Richard

On Fri, 18 Aug 2006, Klaus Ita wrote:

> Date: Fri, 18 Aug 2006 09:44:27 +0200
> From: Klaus Ita <klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at>
> To: pgsql-bugs(at)postgresql(dot)org
> Subject: [BUGS] error in upper()
>
> I know that tom is going to say this is not a bug in pg and he is probably
> right. but still i want to state, that in pg 8.1 the
>
> select lower(upper('ß'))
>
> does not return 'ss'. because the upper('ß') does not return 'SS' in the
> first place. I know, german is a terrible language, but still - we are using
> it :-)
>
> thx,
> klaus
>
> and tom. there is no offence at all! I love Pg and the work you are doing.
> thank you!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy(at)ScienceTools(dot)com, http://ScienceTools.com/


From: Klaus Ita <klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: error in upper()
Date: 2006-08-26 22:40:42
Message-ID: 20060826224042.GW32240@aipc54.ai.wu-wien.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi Richard,

On Sat, Aug 19, 2006 at 09:49:41AM -0700, Richard Troy wrote:
> Hi Klaus,
>
> I must have missed the bug submitted about this, but as a student of
> German I took particular interest in your post.
>

I am sorry, I posted it with a bad sender address. I can't remember which one
i used for my pg-subscription :-)

> I'm unaware of any upper case or lower case for 'ß', just as there is no
> upper or lower case for '@'. So, I'd expect the function to pass it
> through. It's not - or shouldn't be - the business of upper() or lower()
> to translate your characters for you which haven't got an appropriate
> upper or lower case version...
>

Well, with the @ i agree. but when you have any word containing ß and you
want to upper it, it is possible. It is a german grammar rule. I've come
across this as the perl people actually do consider it in perl6. (maybe it
was parrot, but i will find out)

the difficulty about this very specific character is, that the upper case
represantation is "SS". In old german, it used to be "SZ", which makes it
even more difficult :-( .

anyway, there cannot be any lower for SS that maps it to ß, that would
require knowledge of the word at least.

and .... I just tried in the different programming languages i know (which is
by far not enough) but in java, eg when you use the javac from sun, it
actually works the way i say.

i will add the .java I used and I am sure you can try yourself.

thanks for your interest!

regs,
klaus

--
Klaus Ita
Institut fuer Informationswirtschaft
http://www.ai.wu-wien.ac.at/
mailto:klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at
tel: +43 (1) 31336 5202

Attachment Content-Type Size
Hello.java text/x-java 150 bytes

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Richard Troy <rtroy(at)sciencetools(dot)com>, Klaus Ita <klaus(dot)ita(at)ai(dot)wu-wien(dot)ac(dot)at>
Subject: Re: error in upper()
Date: 2006-08-27 05:17:11
Message-ID: 200608270717.12238.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Richard Troy wrote:
> I'm unaware of any upper case or lower case for 'ß'

It's a matter of taste whether you leave 'ß' as is or replace it by 'SS'
when upper casing. PostgreSQL does upper-casing character by
character, so there is no support for one-to-many conversions.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/