Re: 9.5 "chained equality" behavior

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Joshua Ma <josh(at)benchling(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: 9.5 "chained equality" behavior
Date: 2017-05-30 21:39:40
Message-ID: CAKFQuwai_koXpB_GhTFCTw=YiAHDg9peXOKs7ijT7-N2sVBSbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 30, 2017 at 2:32 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> ​...​
> namely because aside from equality all of the comparison operators
> convert their inputs to a boolean and so cannot be placed in sequence like
> shown here (boolean compared to, say, integer doesn't work). Boolean
> equality is the one exception which is what no longer works - so the docs
> are correct.
>
>
​Yes, that was poorly written...booleans keep the same type and so can be
"chained" while other types do not. But precedence is not based upon type,
just the operator.

David J.​

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ludovic Vaugeois-Pepin 2017-05-30 22:16:37 Fwd: pg_basebackup error: replication slot "pg_basebackup_2194" already exists
Previous Message David G. Johnston 2017-05-30 21:32:20 Re: 9.5 "chained equality" behavior