From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: gsv371@ukr.net, "pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13941: Different value "pg_constraint.consrc" for similar Check Constrait
Date: Wed, 10 Feb 2016 12:46:05 -0500
Message-ID: <29611.1455126365@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZbVi0VXJOEtEj2y5J9Ote+nO=jNr5ttMxM21tUC90tpw@mail.gmail.com>
References: <20160210105328.24150.99473@wrigleys.postgresql.org>
<20160210164736.dag57bvnjqou24fm@alap3.anarazel.de>
<CAKFQuwZbVi0VXJOEtEj2y5J9Ote+nO=jNr5ttMxM21tUC90tpw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Feb 10, 2016 at 9:47 AM, Andres Freund <andres@anarazel.de> wrote:
>> Why do you consider that a bug?
> ​Probably because of this 9.5 release note item:
> Adjust operator precedence to match the SQL standard (Tom Lane)
No, I think the difference is actually because of 2146f1340 (Avoid
recursion when processing simple lists of AND'ed or OR'ed clauses).
Before 9.5 you got nested BoolExprs out of either the BETWEEN ... AND
or the AND ... AND formulations. As of 2146f1340, the grammar produces a
single 3-argument BoolExpr for AND ... AND. I'm not sure offhand whether
it also produced that for BETWEEN ... AND at the time, but in any case it
would not have done so after 34af082f9 (Represent BETWEEN as a special
node type in raw parse trees).
Whether you have nested BoolExprs or a pre-flattened one has exactly zero
impact on semantics or execution behavior, since the planner will flatten
the nested case anyway; but you can tell the difference in ruleutils.c
output by counting the parens.
So the BETWEEN case hasn't changed, the AND ... AND case has, and I
entirely concur with Andres that this is not a bug.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, andres@anarazel.de
Subject: Re: BUG #13941: Different value "pg_constraint.consrc" for similar Check Constrait
In-Reply-To: <29611.1455126365@sss.pgh.pa.us>
References: <20160210105328.24150.99473@wrigleys.postgresql.org> <20160210164736.dag57bvnjqou24fm@alap3.anarazel.de> <CAKFQuwZbVi0VXJOEtEj2y5J9Ote+nO=jNr5ttMxM21tUC90tpw@mail.gmail.com> <29611.1455126365@sss.pgh.pa.us>
* 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