Re: Strange problem with string and select

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Condor <condor(at)stz-bg(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange problem with string and select
Date: 2012-08-30 08:46:36
Message-ID: CAF-3MvP=UxRH0_g6WY8m23kPJ-zEmem9NrORRXT39np_RDJaRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 30 August 2012 10:12, Condor <condor(at)stz-bg(dot)com> wrote:
> Hello,
> can I ask is exist some kind of automatic escape string in postgresql ?
> I use pgsql 9.1.5 and I have very interest problem, I have field with text
> string that I cant find normally.

> Here is examples (I replace in example Cyrillic encoding because most of the
> ppl don't have cp1251 encoding)
>
> select * from postcodes where namejr LIKE 'LULIN V%';
> id | namejr
> 21 | LULIN VIII
> 22 | LULIN VII
> 23 | LULIN VIII
> 24 | LULIN VI
> 25 | LULIN VII
> 26 | LULIN V
>
> buf if I do:
> select * from postcodes where namejr LIKE 'LULIN VII%';
> result is:
> 22 | LULIN VII
> 25 | LULIN VII
>
>
> as I can see ids 21 and 23 missing that should be: LULIN VIII
> I dump follow records to text file and make hex compare,
> both ids 21 and 23 is the same (equal).
>
> Any one can give me a little help?

Perhaps the records with ids 21 and 23 have a lower-case 'l' ('L')
instead of an upper-case 'I' ('i'), or something similar? Are the
hex-codes for ids 21, 22, 23 and 25 the same for the substring reading
'VII'?

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2012-08-30 08:49:41 Re: [BUGS] PostGreSQL pgdac - C++ Builder 2007
Previous Message Willy-Bas Loos 2012-08-30 08:40:06 Re: [postgis-users] pg_dump -s should use add_geometrycolumn(...)