Skip site navigation (1) Skip section navigation (2)

BUG #5877: problem with wild char used in where clause

From: "Savita" <savita(dot)halli(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5877: problem with wild char used in where clause
Date: 2011-02-10 11:02:40
Message-ID: 201102101102.p1AB2eCZ025163@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5877
Logged by:          Savita
Email address:      savita(dot)halli(at)gmail(dot)com
PostgreSQL version: 8.3.5
Operating system:   Solaris
Description:        problem with wild char used in where clause
Details: 

I have a table with id as primary key.
"slect id from table" gives me following data
      id
--------------
 AB1
 AB2
 AB3
 AB4
(4 rows)

Now when I need ids which starts from A
select id from table where id like 'A%'; Gives the follwoing result set.

      id
--------------
 AB1
 AB2
 AB3
 AB4
(4 rows)

When I ran query to get the ids which ends with B1
select id from table where id like '%B1'
does not return me any rows. Should it be not returning row with id AB1? Is
there known issue?

Thanks in advance
Savita

Responses

pgsql-bugs by date

Next:From: Jan-Peter SeifertDate: 2011-02-10 12:56:53
Subject: BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail
Previous:From: Dag LemDate: 2011-02-10 10:18:23
Subject: BUG #5876: Incorrectly reported column value

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group