Re: LIKE erratic? or unseen DB corruption?

From: Anand Raman <araman(at)india-today(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: LIKE erratic? or unseen DB corruption?
Date: 2001-05-30 15:34:25
Message-ID: 20010530210425.B26533@india-today.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

a few months back i had a similar problem.. The query ran my query
properly when i didnt give any group by constraints but failed to give
right grouping results when i used a group by claus..
I deleted the entire set of data and reloaded it to drive it away,,
Hope it helps
Anand
On Mon, May 21, 2001 at 08:12:01AM -0700, Frank Miles wrote:
>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
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-05-30 16:05:03 type conversion fails
Previous Message Bruce Momjian 2001-05-30 15:09:08 Re: [GENERAL] Patch for PGACCESS