pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Savita <savita.halli@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5877: problem with wild char used in where clause
Date: Thu, 10 Feb 2011 20:40:44 +0100
Message-ID: <20110210194044.GA17765@depesz.com> (raw)
In-Reply-To: <201102101102.p1AB2eCZ025163@wwwmaster.postgresql.org>
References: <201102101102.p1AB2eCZ025163@wwwmaster.postgresql.org>

On Thu, Feb 10, 2011 at 11:02:40AM +0000, Savita wrote:
> 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?

is this by any chance char(x) datatype?

if yes - please read:
http://www.depesz.com/index.php/2010/03/02/charx-vs-varcharx-vs-varchar-vs-text/

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007



view thread (4+ messages)  latest in thread

Message-ID: <20110210194044.GA17765@depesz.com>
Permalink:  ../20110210194044.GA17765@depesz.com/
Also on:    postgresql.org/message-id/20110210194044.GA17765@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: depesz@depesz.com, savita.halli@gmail.com
  Subject: Re: BUG #5877: problem with wild char used in where clause
  In-Reply-To: <20110210194044.GA17765@depesz.com>
  References: <201102101102.p1AB2eCZ025163@wwwmaster.postgresql.org> <20110210194044.GA17765@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox