First cut at OUTER JOINs committed

Поиск
Список
Период
Сортировка
Искать

First cut at OUTER JOINs committed

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
I have committed initial support for outer joins.  There's still more to do,
but I was getting antsy to get back in sync with the CVS repository.  Also,
I'm hoping to get other people to do some of the remaining work ;-)

What works: ISO "JOIN" syntax for INNER, LEFT, RIGHT, FULL, CROSS joins.
Table and column name aliases applied to JOIN results sort of work (see
below).  All regression tests pass, including some rule cases that 7.0
gets wrong.

Things that need to be fixed before 7.1:

* Update user docs

* GEQO planner is untested, possibly broken

* Rule rewriter fails for views that are used inside JOIN clauses. Cleanest solution for this would be to implement sub-select in FROM so that a view can be translated to a subselect.  I'm going to work on that next.  If it seems too hard for 7.1, I'll hack up a patch instead.

* parse_clause.c should check validity of JOIN/ON condition (make sure it doesn't refer to any rels not in the JOIN)

* Scope of aliases in sub-joins needs work.  For example, this fails:select * from (int4_tbl i1(a) join int4_tbl i2(b) on (a
FAQ