Andres Freund <and...@anarazel.de> writes: > On October 10, 2018 10:37:40 AM PDT, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Tomas Vondra <tomas.von...@2ndquadrant.com> writes: >>> So, which part of this supposedly does not work in PostgreSQL?
>> The part where it infers that b.sno is unique based solely on it having >> been equated to a.sno. > Isn't the spec compliant thing that's missing dealing with unique not null? IIRC, the spec has a whole bunch of "functional dependency" proof rules, of which the only one we implement at the moment is the one about the other columns of a table all being functionally dependent on its pkey. I don't know if any of the spec's rules are at all close to this one. regards, tom lane