BUG #11401: When I comparison geting of field returns false, but when I do directly with result returns true

Поиск
Список
Период
Сортировка
От natan@logicasistemas.com.br
Тема BUG #11401: When I comparison geting of field returns false, but when I do directly with result returns true
Дата
Msg-id 20140911212706.2484.18059@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: kkaminski@vidsys.com
Дата:
Сообщение: BUG #11399: CreateUser error when upgrading
Следующее
От: srinivas.mca41@gmail.com
Дата:
Сообщение: BUG #11404: Current PostgreSQL Databases Configuration