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

From Gregory Wood
Subject Re: LIKE erratic? or unseen DB corruption?
Date
Msg-id 00b701c0e215$a03b5f10$7889ffcc@comstock.com
Whole thread Raw
In response to LIKE erratic? or unseen DB corruption?  (Frank Miles <fpm@u.washington.edu>)
List pgsql-general
> A direct query gets appropriate rows of data:
>
> dbname=# select * from partdef where shpname = 'IDC16W';

> ...while the very same query (substituting LIKE for the '=' sign) gets
nothing!?
>
> dbname=# select * from partdef where shpname LIKE 'IDC16W';

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

Just a guess here... is shpname a CHAR field (which would be padded with
spaces)? If so you'd have to do LIKE 'IDC16W%'

Greg


pgsql-general by date:

Previous
From: Zak McGregor
Date:
Subject: Re: Queries across multiple databases  (was: SELECT from a table in another database).
Next
From: "Richard Huxton"
Date:
Subject: Re: LIKE erratic? or unseen DB corruption?