Re: underscore pattern in a query doens't work
От | Sergio C. |
---|---|
Тема | Re: underscore pattern in a query doens't work |
Дата | |
Msg-id | 1347548674.20163.YahooMailNeo@web29505.mail.ird.yahoo.com обсуждение исходный текст |
Ответ на | Re: underscore pattern in a query doens't work (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: underscore pattern in a query doens't work
|
Список | pgsql-sql |
Thanks Tom, for your suggestions.
We started the cluster up with this command:
./initdb -D /usr/local/postgre/data -E UTF8 -U sir
The rest of the variables related to encoding (locale) are:
lc_collate=C
lc_ctype=C
lc_messages=C
lc_monetary=C
lc_numeric=C
lc_time=C
Could you tell me which more info could I give you?
De: Tom Lane <tgl@sss.pgh.pa.us>
Para: Sergio Calero. <angusyoung4@yahoo.es>
CC: "pgsql-sql@postgresql.org" <pgsql-sql@postgresql.org>
Enviado: Jueves 13 de septiembre de 2012 16:19
Asunto: Re: [SQL] underscore pattern in a query doens't work
"Sergio Calero." <angusyoung4@yahoo.es> writes:
> I'd like to execute a query using the underscore as a pattern.
> select id,etiqueta from limites_municipales where etiqueta like 'Garaf_a';
> [ but this fails to match 'Garafía' ]
I suspect what you have here is an encoding problem. That is, probably
the "í" is represented as a multi-byte character (most likely UTF8)
but the server thinks it's working with a single-byte encoding so that
any one character should be only one byte.
You didn't say what your encoding setup is, so it's hard to do more
than speculate.
> PostgreSQL 8.4.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10), 64-bit
You do realize this is about 3 years out of date? The 8.4 series is up
to release 8.4.13, and a lot of those updates contained fixes for
serious bugs.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
We started the cluster up with this command:
./initdb -D /usr/local/postgre/data -E UTF8 -U sir
The rest of the variables related to encoding (locale) are:
lc_collate=C
lc_ctype=C
lc_messages=C
lc_monetary=C
lc_numeric=C
lc_time=C
Could you tell me which more info could I give you?
De: Tom Lane <tgl@sss.pgh.pa.us>
Para: Sergio Calero. <angusyoung4@yahoo.es>
CC: "pgsql-sql@postgresql.org" <pgsql-sql@postgresql.org>
Enviado: Jueves 13 de septiembre de 2012 16:19
Asunto: Re: [SQL] underscore pattern in a query doens't work
"Sergio Calero." <angusyoung4@yahoo.es> writes:
> I'd like to execute a query using the underscore as a pattern.
> select id,etiqueta from limites_municipales where etiqueta like 'Garaf_a';
> [ but this fails to match 'Garafía' ]
I suspect what you have here is an encoding problem. That is, probably
the "í" is represented as a multi-byte character (most likely UTF8)
but the server thinks it's working with a single-byte encoding so that
any one character should be only one byte.
You didn't say what your encoding setup is, so it's hard to do more
than speculate.
> PostgreSQL 8.4.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10), 64-bit
You do realize this is about 3 years out of date? The 8.4 series is up
to release 8.4.13, and a lot of those updates contained fixes for
serious bugs.
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
В списке pgsql-sql по дате отправления: