pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ilmir Mulyukov <ilmir.mulyukov@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Lc_collate & lc_type? whitespace and nbsp unique index...
Date: Mon, 12 Jul 2021 13:26:04 +0200
Message-ID: <e7f565da09b0697ff370f04cb63bac1a270934f8.camel@cybertec.at> (raw)
In-Reply-To: <1897c8dce7fd6974116c935a50270b33fac09461.camel@cybertec.at>
References: <CAGiHuoXa+vvSf4Zy7uUd+eh3pFkh4OVxPBB=MRvGqOtuiu=sRQ@mail.gmail.com>
	<1897c8dce7fd6974116c935a50270b33fac09461.camel@cybertec.at>

Please include the list in your replies.

On Mon, 2021-07-12 at 13:07 +0600, Ilmir Mulyukov wrote:
> Laurenz, thank you for you help.
> 
> ka_im_pg=# select * from _inforg31440 where _Fld31441='W1903BP WINKOD Колодки дисковые, передние';
> _fld31441 | _fld31442 | _fld31443rref | _fld2102
> -------------------------------------------+-----------+------------------------------------+----------
> W1903BP WINKOD Колодки дисковые, передние | | \x80e9a4bf010099b511ebd3d00c89f5f2 | 0
> W1903BP WINKOD Колодки дисковые, передние | 796 | \x80e9a4bf010099b511ebc98cf68225d2 | 0
> W1903BP WINKOD Колодки дисковые, передние | | \x80e9a4bf010099b511ebc5056610dedf | 0
> W1903BP WINKOD Колодки дисковые, передние | 796 | \x80e8a4bf010099b511ebae02a81729c0 | 0
> (4 rows)
> 
>  Utf encode for 1 and 3 row:
>  
> \x57\x31\x39\x30\x33\x42\x50\x20\x57\x49\x4e\x4b\x4f\x44\x20\xd0\x9a\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb4\xd0\xba\xd0\xb8\x20\xd0\xb4\xd0\xb8\xd1\x81\xd0\xba\xd0\xbe\xd0\xb2\xd1\x8b\xd0\xb5\x2c\x20\xd0\x
> bf\xd0\xb5\xd1\x80\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb8\xd0\xb5
> 
> \x57\x31\x39\x30\x33\x42\x50\x20\x57\x49\x4e\x4b\x4f\x44\xc2\xa0\xd0\x9a\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb4\xd0\xba\xd0\xb8\xc2\xa0\xd0\xb4\xd0\xb8\xd1\x81\xd0\xba\xd0\xbe\xd0\xb2\xd1\x8b\xd0\xb5\x2c\x
> 20\xd0\xbf\xd0\xb5\xd1\x80\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb8\xd0\xb5

I doubt that:

CREATE TABLE cyrillic(id integer PRIMARY KEY, t text);

INSERT INTO cyrillic VALUES (1, convert_from('\x573139303342502057494e4b4f4420d09ad0bed0bbd0bed0b4d0bad0b820d0b4d0b8d181d0bad0bed0b2d18bd0b52c20d0bfd0b5d180d0b5d0b4d0bdd0b8d0b5', 'UTF8'));
INSERT INTO cyrillic VALUES (2, convert_from('\x573139303342502057494e4b4f44c2a0d09ad0bed0bbd0bed0b4d0bad0b8c2a0d0b4d0b8d181d0bad0bed0b2d18bd0b52c20d0bfd0b5d180d0b5d0b4d0bdd0b8d0b5', 'UTF8'));

SELECT * FROM cyrillic WHERE t = E'W1903BP WINKOD\u00A0Колодки\u00A0дисковые, передние';

 id │                     t                     
════╪═══════════════════════════════════════════
  2 │ W1903BP WINKOD Колодки дисковые, передние
(1 row)

SELECT * FROM cyrillic WHERE t = E'W1903BP WINKOD Колодки дисковые, передние';

 id │                     t                     
════╪═══════════════════════════════════════════
  1 │ W1903BP WINKOD Колодки дисковые, передние
(1 row)

Perhaps you got a corrupted index on the "_fld31441" column.
Does reindexing that index change things?

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


view thread (6+ messages)  latest in thread

Message-ID: <e7f565da09b0697ff370f04cb63bac1a270934f8.camel@cybertec.at>
Permalink:  ../e7f565da09b0697ff370f04cb63bac1a270934f8.camel@cybertec.at/
Also on:    postgresql.org/message-id/e7f565da09b0697ff370f04cb63bac1a270934f8.camel@cybertec.at

 · 

reply

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-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, ilmir.mulyukov@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Lc_collate & lc_type? whitespace and nbsp unique index...
  In-Reply-To: <e7f565da09b0697ff370f04cb63bac1a270934f8.camel@cybertec.at>

* 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