Re: Bogus use of canonicalize_qual

2018-03-11 Thread Tom Lane
Dean Rasheed writes: > On 10 March 2018 at 20:21, Tom Lane wrote: >> If we suppose that we only need to fix it in HEAD, the most attractive >> answer is to add a parameter distinguishing WHERE and CHECK arguments >> to canonicalize_qual. > I agree

Re: Bogus use of canonicalize_qual

2018-03-11 Thread Dean Rasheed
On 10 March 2018 at 20:21, Tom Lane wrote: > I wrote: >> Whilst fooling about with predtest.c, I noticed a rather embarrassing >> error. Consider the following, rather silly, CHECK constraint: >> ... >> So, what to do? We have a few choices, none ideal: > > I'd been assuming

Re: Bogus use of canonicalize_qual

2018-03-10 Thread Tom Lane
I wrote: > Whilst fooling about with predtest.c, I noticed a rather embarrassing > error. Consider the following, rather silly, CHECK constraint: > ... > So, what to do? We have a few choices, none ideal: I'd been assuming that we need to back-patch a fix for this, but after further reflection,

Bogus use of canonicalize_qual

2018-03-09 Thread Tom Lane
Whilst fooling about with predtest.c, I noticed a rather embarrassing error. Consider the following, rather silly, CHECK constraint: regression=# create table pp (f1 int); CREATE TABLE regression=# create table cc (check (f1 = 1 or f1 = null)) inherits(pp); CREATE TABLE Because "f1 = null"