pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: natan@logicasistemas.com.br
To: pgsql-bugs@postgresql.org
Subject: BUG #11401: When I comparison geting of field returns false, but when I do directly with result returns true
Date: Thu, 11 Sep 2014 21:27:06 +0000
Message-ID: <20140911212706.2484.18059@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      11401
Logged by:          Natan Medeiros
Email address:      natan@logicasistemas.com.br
PostgreSQL version: 9.1.14
Operating system:   Debian
Description:        

Hi everyone,

I'm trying to do a query and stops in source below:

btrim = clean spaces

upper = a -> A

pcc.mac returns "" (null)

pcc.username returns "SIMONE.GISELIA"

    btrim(upper(pcc.mac::character varying::text)) <>
btrim(upper(pcc.username::text))

if I put the code above, the postgres understand as false, but if I put the
code below returns true, why?

    SELECT CASE WHEN "" <> "SIMONE.GISELIA" THEN true ELSE false end



Both fields returns different text and the result is false and shouldn't.

I'm stuck on that and don't know what do.

I need to compare this options, if don't, the source not work.

If anyone could help me I will be glad for that.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



Message-ID: <20140911212706.2484.18059@wrigleys.postgresql.org>
Permalink:  ../20140911212706.2484.18059@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140911212706.2484.18059@wrigleys.postgresql.org

 · 

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: natan@logicasistemas.com.br
  Subject: Re: BUG #11401: When I comparison geting of field returns false, but when I do directly with result returns true
  In-Reply-To: <20140911212706.2484.18059@wrigleys.postgresql.org>
  References: <20140911212706.2484.18059@wrigleys.postgresql.org>

* 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