LIKE erratic? or unseen DB corruption?

From: Frank Miles <fpm(at)u(dot)washington(dot)edu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: LIKE erratic? or unseen DB corruption?
Date: 2001-05-21 15:12:01
Message-ID: Pine.A41.4.33.0105181524360.19064-100000@mead4.u.washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-21 15:28:22 Re: psql shell problem
Previous Message tom 2001-05-21 15:01:16 Inheritance clarification please