Re: Unable to match same value in field. - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Unable to match same value in field.
Date
Msg-id 20160312221114.GC20873@rorschach.hjp.at
Whole thread Raw
In response to Unable to match same value in field.  (Condor <condor@stz-bg.com>)
List pgsql-general
On 2016-03-10 11:09:00 +0200, Condor wrote:
> I using postgresql 9.5.1 and I have problem to match value in one field.
> Both tables are text:
[...]
> =# select imsi from list_cards_tbl where imsi = '284110000123315';
>  imsi
> ------
> (0 rows)
>
> No value, lets change to LIKE
>
> =# select imsi, md5(imsi), bit_length(imsi) from list_cards_tbl where imsi
> like '284110000123315%';
>       imsi       |               md5                | bit_length
> -----------------+----------------------------------+------------
>  284110000123315 | b438e984c97483bb942eaaed5c0147f3 |        120
> (1 row)

That looks familiar. I think I've seen something similar recently. That
was on 9.5beta1 (I haven't gotten around to upgrade to 9.5.1 yet).

> =# reindex table list_cards_tbl;
> REINDEX
[...]
> Still cant find value.

Dropping and recreating the index helped in my case. Still, I find it
worrying if a value which obviously is in the table can't be found using
the index.

        hp

--
   _  | Peter J. Holzer    | I want to forget all about both belts and
|_|_) |                    | suspenders; instead, I want to buy pants
| |   | hjp@hjp.at         | that actually fit.
__/   | http://www.hjp.at/ |   -- http://noncombatant.org/

Attachment

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: index problems (again)
Next
From: Karsten Hilbert
Date:
Subject: Re: Q: extract database name from directory dump