Skip site navigation (1) Skip section navigation (2)

underscore pattern in a query doens't work

From: "Sergio Calero(dot)" <angusyoung4(at)yahoo(dot)es>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: underscore pattern in a query doens't work
Date: 2012-09-13 11:23:40
Message-ID: 1347535420.27469.YahooMailNeo@web29502.mail.ird.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hello everyone!

Below you can find the problem I'm dealing with.
I'd appreciate your help.

Thank you!!


- A description of what you are trying to achieve and what results you expect.:
I'd like to execute a query using the underscore as a pattern.
select id,etiqueta from limites_municipales where etiqueta like 'Garaf_a';
It should return some rows but it is not: 
 id | etiqueta
----+----------
(0 rows)

This is the content in the table:
palma=> select id,etiqueta from limites_municipales;
  id   |         etiqueta
-------+--------------------------
     0 | El Paso
 12743 | Tazacorte
 12744 | Los Llanos de Aridane
 12745 | Villa de Mazo
 12746 | Breña Baja
 12747 | Santa Cruz de la Palma
 12748 | Garafía
 12749 | San Andrés y Sauces
 12751 | Puntallana
 12741 | Puntagorda
 12742 | Tijarafe
 12975 | Breña Alta
 12976 | Fuencaliente de la Palma
 12837 |
 12846 |
 .....
 12910 |
 12750 | Barlovento
(38 rows)

- PostgreSQL version number you are running:
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
- How you installed PostgreSQL:
Downloaded from postgresql.org and installed.
- Changes made to the settings in the postgresql.conf file:
no changes.
- Operating system and version:
Linux centos
- What program you're using to connect to PostgreSQL:
psql
- Is there anything relevant or unusual in the PostgreSQL server logs?:
No
- For questions about any kind of error:
Does the behaviour has to do with the client_encoding or server_encoding of the cluster?
Both are set to SQL_ASCII.
The locale list in the server is:
LANG=es_ES.ISO-8859-15
LC_CTYPE="es_ES"
LC_NUMERIC="es_ES"
LC_TIME="es_ES"
LC_COLLATE="es_ES"
LC_MONETARY="es_ES"
LC_MESSAGES="es_ES"
LC_PAPER="es_ES"
LC_NAME="es_ES"
LC_ADDRESS="es_ES"
LC_TELEPHONE="es_ES"
LC_MEASUREMENT="es_ES"
LC_IDENTIFICATION="es_ES"
LC_ALL=es_ES

Responses

pgsql-sql by date

Next:From: Adrian KlaverDate: 2012-09-13 13:46:03
Subject: Re: pg_restore problem
Previous:From: BeeBeeDate: 2012-09-13 06:49:49
Subject: Problem with committing the update

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group