Re: 9.5 "chained equality" behavior

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: 9.5 "chained equality" behavior
Дата
Msg-id FACFED75-000C-4B1A-BAD5-129062A44178@gmail.com
обсуждение исходный текст
Ответ на [GENERAL] 9.5 "chained equality" behavior  (Joshua Ma <josh@benchling.com>)
Список pgsql-general
> On 30 May 2017, at 22:56, Joshua Ma <josh@benchling.com> wrote:
>
> Our team is upgrading from 9.4 to 9.5, and we noticed this behavior change:
>
> 9.4:
> # SELECT true = true = true;
>  ?column?
> ----------
>  t
> (1 row)

Does that really do what you intended though?

# select false = false = false;
 ?column?
----------
 f
(1 row)

I suspect you expect that to result in 't', not 'f', so replacing that with AND would change the behaviour for false
booleanvalues. (This is from 9.3, btw) 

Perhaps explicitly adding the braces that pre-9.5 pg adds implicitly gets you what you had? I suspect that would work
on9.5 as well (but can't test right now). 

# select false = (false = false);
 ?column?
----------
 f
(1 row)

# select true = (true = true);
 ?column?
----------
 t
(1 row)

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: [GENERAL] Regexp + spaces PG 9.1
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: [GENERAL] Slow query plan used