Re: struct RelOptInfo member relid comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: struct RelOptInfo member relid comments
Date
Msg-id 585848.1716528533@sss.pgh.pa.us
Whole thread Raw
In response to Re: struct RelOptInfo member relid comments  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> OJ is an outer join, AFAIU. OJ's have their own relids. If you are
> wondering why not all joins - I think inner joins need not be tracked as
> separated relations in parse tree, but OJ's need to be.

An outer join is necessarily associated with explicit JOIN syntax
in the FROM clause, and each such JOIN has its own rangetable entry
and hence a relid.  Inner joins might arise from comma syntax
(that is, "SELECT ... FROM tab1, tab2").  For perhaps-historical
reasons that syntax doesn't give rise to an explicit RTE_JOIN
rangetable entry, so the implied join has no relid.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: struct RelOptInfo member relid comments
Next
From: Michael Paquier
Date:
Subject: Re: Avoid possible dereference null pointer (src/backend/catalog/pg_depend.c)