Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Incorrect Query Result

$
0
0

I have a table with the following data:

    unit_codes
    kind    | code
-------------------------
    UNIT    | PS3b
    UNIT    | PS3B
    UNIT    | PS3C

If I run this select I get the correct result.

select * from unit_codes where kind = 'UNIT';

Result:

UNIT    PS3b
UNIT    PS3B 
UNIT    PS3C

If I filter on the code column I get no rows.

select * from unit_codes where code = 'PS3C';

No rows are retuned.

I suspect there is a non visible character on the code column for some rows. The problem started after some OS patches were installed.

We are running PostgreSQL 9.2.4 on sparc-sun-solaris2.10, compiled by cc: Sun C 5.9 SunOS_sparc 2007/05/03, 32-bit.


Viewing all articles
Browse latest Browse all 1138

Trending Articles