pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedupper() with LATIN1 problem
4+ messages / 2 participants
[nested] [flat]
* upper() with LATIN1 problem
@ 2005-04-12 13:27 "Lic. Guillermo González" <g.gonzalez@cybira.biz>
0 siblings, 1 reply; 4+ messages in thread
From: "Lic. Guillermo González" @ 2005-04-12 13:27 UTC (permalink / raw)
To: pgsql-admin
Hi,
The developers on my company reports me a problem with de upper() function.
The problem is:
- with a text 'magriñá'
- the upper('magriñá') returns MAGRIñà
- NOTE that the characters 'ñ' and 'á' didn't change the case.
- the text are stored in a table in a character varying(50) field
- the database has LATIN1 encoding
- the postgresql version is 7.4.7
- the OS is Debian Linux 2.6.10
Please, can anyone help me to resolve this problem?
Thanks!
--
Guillermo González
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upper() with LATIN1 problem
@ 2005-04-12 14:27 Tom Lane <tgl@sss.pgh.pa.us>
parent: "Lic. Guillermo González" <g.gonzalez@cybira.biz>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2005-04-12 14:27 UTC (permalink / raw)
To: "Lic. Guillermo González" <g.gonzalez@cybira.biz>; +Cc: pgsql-admin
=?ISO-8859-1?Q?=22Lic=2E_Guillermo_Gonz=E1lez=22?= <g.gonzalez@cybira.biz> writes:
> The problem is:
> - with a text 'magriñá'
> - the upper('magriñá') returns MAGRIñà
> - NOTE that the characters 'ñ' and 'á' didn't change the case.
This is determined by your locale (specifically LC_CTYPE) not by what
the database thinks the encoding is. You'll probably want to re-initdb
in the desired locale.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upper() with LATIN1 problem
@ 2005-04-13 15:19 "Lic. Guillermo González" <g.gonzalez@cybira.biz>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: "Lic. Guillermo González" @ 2005-04-13 15:19 UTC (permalink / raw)
To: pgsql-admin
Hi,
I look at the variable/parameter LC_CTYPE and it is set to C (I think
this is the default) for performance reason, the installer says.
If I use LATIN1 (spanish) what value is the best option for this
variable/parameter?
Thanks!
--
Guillermo González
Tom Lane wrote:
> =?ISO-8859-1?Q?=22Lic=2E_Guillermo_Gonz=E1lez=22?= <g.gonzalez@cybira.biz> writes:
>
>>The problem is:
>>- with a text 'magriñá'
>>- the upper('magriñá') returns MAGRIñà
>>- NOTE that the characters 'ñ' and 'á' didn't change the case.
>
>
> This is determined by your locale (specifically LC_CTYPE) not by what
> the database thinks the encoding is. You'll probably want to re-initdb
> in the desired locale.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upper() with LATIN1 problem
@ 2005-04-13 16:01 Tom Lane <tgl@sss.pgh.pa.us>
parent: "Lic. Guillermo González" <g.gonzalez@cybira.biz>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2005-04-13 16:01 UTC (permalink / raw)
To: "Lic. Guillermo González" <g.gonzalez@cybira.biz>; +Cc: pgsql-admin
=?ISO-8859-1?Q?=22Lic=2E_Guillermo_Gonz=E1lez=22?= <g.gonzalez@cybira.biz> writes:
> If I use LATIN1 (spanish) what value is the best option for this
> variable/parameter?
Unfortunately locale names are not all that well standardized.
"locale -a" should show you all the names available on your platform.
You probably want some variant of "es_ES", the tricky part is figuring
out which one uses LATIN1 as opposed to any other encoding.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-04-13 16:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-12 13:27 upper() with LATIN1 problem "Lic. Guillermo González" <g.gonzalez@cybira.biz>
2005-04-12 14:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-13 15:19 ` "Lic. Guillermo González" <g.gonzalez@cybira.biz>
2005-04-13 16:01 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox