Strange problem with string and select

From: Condor <condor(at)stz-bg(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Strange problem with string and select
Date: 2012-08-30 08:12:48
Message-ID: 8926f17c04017695004509030f5dec5c@stz-bg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.
Variable encoding from variables:

server_encoding | WIN1251
lc_collate | bg_BG.CP1251
lc_ctype | bg_BG.CP1251
lc_messages | bg_BG.CP1251
lc_monetary | bg_BG.CP1251
lc_numeric | bg_BG.CP1251
lc_time | bg_BG.CP1251
client_encoding | WIN1251

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?

Hristo C.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nicola Cisternino 2012-08-30 08:36:40 Re: String comparision in PostgreSQL
Previous Message Achilleas Mantzios 2012-08-30 06:42:34 Re: psql & unix env variables