Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC7WJ-0005UY-MJ for pgsql-sql@postgresql.org; Thu, 13 Sep 2012 11:23:43 +0000 Received: from nm23-vm5.bullet.mail.ird.yahoo.com ([212.82.109.234]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TC7WI-0007hF-1d for pgsql-sql@postgresql.org; Thu, 13 Sep 2012 11:23:43 +0000 Received: from [77.238.189.233] by nm23.bullet.mail.ird.yahoo.com with NNFMP; 13 Sep 2012 11:23:40 -0000 Received: from [212.82.108.122] by tm14.bullet.mail.ird.yahoo.com with NNFMP; 13 Sep 2012 11:23:40 -0000 Received: from [127.0.0.1] by omp1031.mail.ird.yahoo.com with NNFMP; 13 Sep 2012 11:23:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 290214.92586.bm@omp1031.mail.ird.yahoo.com Received: (qmail 30791 invoked by uid 60001); 13 Sep 2012 11:23:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024; t=1347535420; bh=CeZnZ4y5XIpm9Kt6O9XmkrQ4QTs26Tpc0kYVzavUstU=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=zweCev1E/pVUnjVCiEIf+y4Bv3ur+FeWjXnmpXfuG3AnK5z09u8OY9k4H9FTyD+zaFBiNebqd5vdaFekZy07VmAZVsi9WrDXOOpC7A2D62nKIGsSOb0/tuvSYGs7Fqn1YKpE5NSinNrsm0qoXcXKogoF3y/uI3/SpSYj31yONQI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=o8JTTRhRJO2mtAh0b/9/k3XCDapybLlOPmTZeqT6M6imgjQrNc2aB7JLbpCh+UVTwDixRTkIWJbeEkAR0k8ZzVE49dq3ZbpoNWpKlKuG3eI+Fh7UBkNzuwC85eIGpJNggLMbDvMfRYBkS++fuJ80RQu/zMj+A/CxCINJmCT1rzM=; X-YMail-OSG: TqZBGSMVM1kafjT83ERC55Qqq4qyvCQPVPm7tzZU5J0ckqJ xgujquG.SaQwVpHDMS2bBEOJdSjC32CrVzTz0AqNLEfOUutyM6cJZxL4sOUw p4Bjx6_nIUUL_y7j1IOMWmYqHtZmL2cbl8sVDFEohcW8j7a4l9DeaO1z2g8F lJM3qN9VPzihND2tMrdXQ_1oSlxXHHjwTZkMvgXuCB8y206.ii_CMudGNbro nKBpQdpZEv.VbB1P4_NygyczmHxOkPAQUffD0m14UwFNPSoiNTM1cs1KDtlB YdzrYNe8N_Z8i374XF1ewOfV6tXsQ1bLt5UVURE90roXD67usjsh9H43dK7n JakjxIsmcDlwmvlJabtj6xIb8Fe.cEOXXVNgJRkXkfRjKFfgQlpob6YoC5vJ ThakkBKO_qLnbObrKc.e2s09da7Mp9e9.ByFqEXzmnXuoBpchlZdWqbYkCEc 0t4HOXlo93O7pOeldfiYki5uy5.e2gWPK5fyZ.1frCCECzhwNRW.uGkNH Received: from [81.60.153.125] by web29502.mail.ird.yahoo.com via HTTP; Thu, 13 Sep 2012 12:23:40 BST X-Mailer: YahooMailWebService/0.8.121.416 Message-ID: <1347535420.27469.YahooMailNeo@web29502.mail.ird.yahoo.com> Date: Thu, 13 Sep 2012 12:23:40 +0100 (BST) From: "Sergio Calero." Reply-To: "Sergio Calero." Subject: underscore pattern in a query doens't work To: "pgsql-sql@postgresql.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="671563967-730603043-1347535420=:27469" X-Pg-Spam-Score: 1.2 (+) X-Archive-Number: 201209/31 X-Sequence-Number: 36833 --671563967-730603043-1347535420=:27469 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello everyone!=0A=0ABelow you can find the problem I'm dealing with.=0AI'd= appreciate your help.=0A=0AThank you!!=0A=0A=0A- A description of what you= are trying to achieve and what results you expect.:=0AI'd like to execute = a query using the underscore as a pattern.=0Aselect id,etiqueta from limite= s_municipales where etiqueta like 'Garaf_a';=0AIt should return some rows b= ut it is not: =0A=A0id | etiqueta=0A----+----------=0A(0 rows)=0A=0AThis is= the content in the table:=0Apalma=3D> select id,etiqueta from limites_muni= cipales;=0A=A0 id=A0=A0 |=A0=A0=A0=A0=A0=A0=A0=A0 etiqueta=0A-------+------= --------------------=0A=A0=A0=A0=A0 0 | El Paso=0A=A012743 | Tazacorte=0A= =A012744 | Los Llanos de Aridane=0A=A012745 | Villa de Mazo=0A=A012746 | Br= e=F1a Baja=0A=A012747 | Santa Cruz de la Palma=0A=A012748 | Garaf=EDa=0A=A0= 12749 | San Andr=E9s y Sauces=0A=A012751 | Puntallana=0A=A012741 | Puntagor= da=0A=A012742 | Tijarafe=0A=A012975 | Bre=F1a Alta=0A=A012976 | Fuencalient= e de la Palma=0A=A012837 |=0A=A012846 |=0A=A0.....=0A=A012910 |=0A=A012750 = | Barlovento=0A(38 rows)=0A=0A- PostgreSQL version number you are running:= =0APostgreSQL 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=0A- How you installed PostgreSQL:= =0ADownloaded from postgresql.org and installed.=0A- Changes made to the se= ttings in the postgresql.conf file:=0Ano changes.=0A- Operating system and = version:=0ALinux centos=0A- What program you're using to connect to Postgre= SQL:=0Apsql=0A- Is there anything relevant or unusual in the PostgreSQL ser= ver logs?:=0ANo=0A- For questions about any kind of error:=0ADoes the behav= iour has to do with the client_encoding or server_encoding of the cluster?= =0ABoth are set to SQL_ASCII.=0AThe locale list in the server is:=0ALANG=3D= es_ES.ISO-8859-15=0ALC_CTYPE=3D"es_ES"=0ALC_NUMERIC=3D"es_ES"=0ALC_TIME=3D"= es_ES"=0ALC_COLLATE=3D"es_ES"=0ALC_MONETARY=3D"es_ES"=0ALC_MESSAGES=3D"es_E= S"=0ALC_PAPER=3D"es_ES"=0ALC_NAME=3D"es_ES"=0ALC_ADDRESS=3D"es_ES"=0ALC_TEL= EPHONE=3D"es_ES"=0ALC_MEASUREMENT=3D"es_ES"=0ALC_IDENTIFICATION=3D"es_ES"= =0ALC_ALL=3Des_ES --671563967-730603043-1347535420=:27469 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello everyone!
=
Belo= w you can find the problem I'm dealing with.
I'd appreciate your help.
Thank you!!

- A descript= ion of what you are trying to achieve and what results you expect.:<= br>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=3D>= select id,etiqueta from limites_municipales;
  id   |&nb= sp;        etiqueta
-------+---------= -----------------
     0 | El Paso
 12743 | = Tazacorte
 12744 | Los Llanos de Aridane
 12745 | Villa de = Mazo
 12746 | Bre=F1a Baja
 12747 | Santa Cruz de la Palma
 12748 | Garaf=EDa
 12749 | San Andr=E9s y Sauces 12751 | Puntallana
 12741 | Puntagorda
 12742 | Tija= rafe
 12975 | Bre=F1a Alta
 12976 | Fuencaliente de la Palm= a
 12837 |
 12846 |
 .....
 12910 |
&nbs= p;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 Ha= t 3.4.6-10), 64-bit
- How you install= ed PostgreSQL:
Downloaded from postgresql.org and installed.
<= span style=3D"font-weight: bold;">- Changes made to the settings in the pos= tgresql.conf file:
no changes.
- Operating system and version:
Linux centos
- What program you're using to connect to PostgreSQL:
psql
- Is ther= e anything relevant or unusual in the PostgreSQL server logs?:
No=
- For questions about any kind of er= ror:
Does the behaviour has to do with the client_encoding or ser= ver_encoding of the cluster?
Both are set to SQL_ASCII.
The locale li= st in the server is:
LANG=3Des_ES.ISO-8859-15
LC_CTYPE=3D"es_ES"
L= C_NUMERIC=3D"es_ES"
LC_TIME=3D"es_ES"
LC_COLLATE=3D"es_ES"
LC_MONE= TARY=3D"es_ES"
LC_MESSAGES=3D"es_ES"
LC_PAPER=3D"es_ES"
LC_NAME=3D= "es_ES"
LC_ADDRESS=3D"es_ES"
LC_TELEPHONE=3D"es_ES"
LC_MEASUREMENT= =3D"es_ES"
LC_IDENTIFICATION=3D"es_ES"
LC_ALL=3Des_ES
--671563967-730603043-1347535420=:27469--