LIKE erratic? or unseen DB corruption?

Поиск
Список
Период
Сортировка
От Frank Miles
Тема LIKE erratic? or unseen DB corruption?
Дата
Msg-id Pine.A41.4.33.0105181524360.19064-100000@mead4.u.washington.edu
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: "tom"
Дата:
Сообщение: Inheritance clarification please
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: psql shell problem