From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sergio Calero. <angusyoung4@yahoo.es>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: underscore pattern in a query doens't work
Date: Thu, 13 Sep 2012 10:19:41 -0400
Message-ID: <26099.1347545981@sss.pgh.pa.us> (raw)
In-Reply-To: <1347535420.27469.YahooMailNeo@web29502.mail.ird.yahoo.com>
References: <1347535420.27469.YahooMailNeo@web29502.mail.ird.yahoo.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, angusyoung4@yahoo.es
Subject: Re: underscore pattern in a query doens't work
In-Reply-To: <26099.1347545981@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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