LIKE erratic? or unseen DB corruption? - Mailing list pgsql-general

From Frank Miles
Subject LIKE erratic? or unseen DB corruption?
Date
Msg-id Pine.A41.4.33.0105181524360.19064-100000@mead4.u.washington.edu
Whole thread Raw
Responses Re: LIKE erratic? or unseen DB corruption?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: LIKE erratic? or unseen DB corruption?  (Peter Eisentraut <peter_e@gmx.net>)
Re: LIKE erratic? or unseen DB corruption?  (Anand Raman <araman@india-today.com>)
List pgsql-general
Running 7.1(.0) on a PC running Debian Linux (potato), I have a strange situation in psql:

A direct query gets appropriate rows of data:

dbname=# select * from partdef where shpname = 'IDC16W';
 pn_id | class | num  | mt | ver | loc_id | unit_id | subptcnt |     shpname      |   value    | descrip
-------+-------+------+----+-----+--------+---------+----------+------------------+------------+---------
    17 | 328   | 08X2 | 0  | 0   |        |         |        1 | IDC16W           | Header-8x2 |
    11 | 323   | 08X2 | 0  | 0   |        |         |        1 | IDC16W           | Header-8x2 |

...while the very same query (substituting LIKE for the '=' sign) gets nothing!?

dbname=# select * from partdef where shpname LIKE 'IDC16W';
 pn_id | class | num | mt | ver | loc_id | unit_id | subptcnt | shpname | value | descrip
-------+-------+-----+----+-----+--------+---------+----------+---------+-------+---------
(0 rows)

Creating a new table, and populating it with trial values shows no problem --
it all works as expected (both '=' and 'LIKE' returning the same results).
If selects are done on other columns (same table) they seem to work correctly,
whether one or more rows are returned.

Can someone please tell me the really stupid thing that I'm doing wrong?
Thanks....

    -frank


pgsql-general by date:

Previous
From: "tom"
Date:
Subject: Inheritance clarification please
Next
From: Patrick Welche
Date:
Subject: Re: psql shell problem