Re: Making Vars outer-join aware

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>
Subject: Re: Making Vars outer-join aware
Date: 2022-11-16 22:02:41
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> BTW, inner_join_rels can contain base Relids and OJ Relids. Maybe we
> can revise the comments a bit for it atop deconstruct_recurse and
> make_outerjoininfo. The same for the comments of qualscope, ojscope and
> outerjoin_nonnullable atop distribute_qual_to_rels.

Yeah. I had an XXX comment about whether or not it was okay to
include OJs in inner_join_rels. I took a second look and decided it's
fine, so I removed the XXX and updated these comments.

> The README mentions restriction_is_computable_at(), I think it should be
> clause_is_computable_at().

Right. I think when I wrote that I was imagining that there'd be a
wrapper function specifically concerned with RestrictInfos, but in the
event it didn't seem useful. There's only one place that uses this,
namely subbuild_joinrel_restrictlist.

The cfbot is about to start complaining that this patchset doesn't apply
over e9e26b5e7, so here's a rebase.

regards, tom lane

Attachment Content-Type Size
v7-0000-add-overview-documentation.patch text/x-diff 25.5 KB
v7-0001-add-nullingrels-fields.patch text/x-diff 16.9 KB
v7-0002-label-Var-nullability-in-parser.patch text/x-diff 22.0 KB
v7-0003-cope-with-nullability-in-planner.patch text/x-diff 198.1 KB
v7-0004-add-rinfo-serial-numbers.patch text/x-diff 26.8 KB
v7-0005-fix-flatten_join_alias_vars.patch text/x-diff 14.4 KB
v7-0006-fix-FDWs.patch text/x-diff 10.1 KB
v7-0007-avoid-using-nullable_relids.patch text/x-diff 9.8 KB
v7-0008-remove-nullable_relids.patch text/x-diff 40.9 KB
v7-0009-simplify-dummy-join-clauses.patch text/x-diff 13.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2022-11-16 22:14:07 Re: Allow single table VACUUM in transaction block
Previous Message Greg Stark 2022-11-16 21:52:16 Re: PATCH: Using BRIN indexes for sorted output