Skip to content

Commit ed5003c

Browse files
committed
First cut at full support for OUTER JOINs. There are still a few loose
ends to clean up (see my message of same date to pghackers), but mostly it works. INITDB REQUIRED!
1 parent b5c0ab2 commit ed5003c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+6276
-4152
lines changed

src/backend/catalog/heap.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.143 2000/09/12 04:49:06 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.144 2000/09/12 21:06:46 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1538,11 +1538,9 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin,
15381538
*/
15391539
rte = makeNode(RangeTblEntry);
15401540
rte->relname = RelationGetRelationName(rel);
1541-
#ifndef DISABLE_EREF
1542-
rte->ref = makeNode(Attr);
1543-
rte->ref->relname = RelationGetRelationName(rel);
1544-
#endif
15451541
rte->relid = RelationGetRelid(rel);
1542+
rte->eref = makeNode(Attr);
1543+
rte->eref->relname = RelationGetRelationName(rel);
15461544
rte->inh = false;
15471545
rte->inFromCl = true;
15481546
rte->skipAcl = false;
@@ -1623,11 +1621,9 @@ StoreRelCheck(Relation rel, char *ccname, char *ccbin)
16231621
*/
16241622
rte = makeNode(RangeTblEntry);
16251623
rte->relname = RelationGetRelationName(rel);
1626-
#ifndef DISABLE_EREF
1627-
rte->ref = makeNode(Attr);
1628-
rte->ref->relname = RelationGetRelationName(rel);
1629-
#endif
16301624
rte->relid = RelationGetRelid(rel);
1625+
rte->eref = makeNode(Attr);
1626+
rte->eref->relname = RelationGetRelationName(rel);
16311627
rte->inh = false;
16321628
rte->inFromCl = true;
16331629
rte->skipAcl = false;
@@ -1723,6 +1719,7 @@ AddRelationRawConstraints(Relation rel,
17231719
int numoldchecks;
17241720
ConstrCheck *oldchecks;
17251721
ParseState *pstate;
1722+
RangeTblEntry *rte;
17261723
int numchecks;
17271724
List *listptr;
17281725
Relation relrel;
@@ -1752,7 +1749,8 @@ AddRelationRawConstraints(Relation rel,
17521749
*/
17531750
pstate = make_parsestate(NULL);
17541751
makeRangeTable(pstate, NULL);
1755-
addRangeTableEntry(pstate, relname, makeAttr(relname, NULL), false, true, true);
1752+
rte = addRangeTableEntry(pstate, relname, NULL, false, true);
1753+
addRTEtoJoinTree(pstate, rte);
17561754

17571755
/*
17581756
* Process column default expressions.

0 commit comments

Comments
 (0)