|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * 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 $ |
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | * INTERFACE ROUTINES
|
@@ -1538,11 +1538,9 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin,
|
1538 | 1538 | */
|
1539 | 1539 | rte = makeNode(RangeTblEntry);
|
1540 | 1540 | rte->relname = RelationGetRelationName(rel);
|
1541 |
| -#ifndef DISABLE_EREF |
1542 |
| - rte->ref = makeNode(Attr); |
1543 |
| - rte->ref->relname = RelationGetRelationName(rel); |
1544 |
| -#endif |
1545 | 1541 | rte->relid = RelationGetRelid(rel);
|
| 1542 | + rte->eref = makeNode(Attr); |
| 1543 | + rte->eref->relname = RelationGetRelationName(rel); |
1546 | 1544 | rte->inh = false;
|
1547 | 1545 | rte->inFromCl = true;
|
1548 | 1546 | rte->skipAcl = false;
|
@@ -1623,11 +1621,9 @@ StoreRelCheck(Relation rel, char *ccname, char *ccbin)
|
1623 | 1621 | */
|
1624 | 1622 | rte = makeNode(RangeTblEntry);
|
1625 | 1623 | rte->relname = RelationGetRelationName(rel);
|
1626 |
| -#ifndef DISABLE_EREF |
1627 |
| - rte->ref = makeNode(Attr); |
1628 |
| - rte->ref->relname = RelationGetRelationName(rel); |
1629 |
| -#endif |
1630 | 1624 | rte->relid = RelationGetRelid(rel);
|
| 1625 | + rte->eref = makeNode(Attr); |
| 1626 | + rte->eref->relname = RelationGetRelationName(rel); |
1631 | 1627 | rte->inh = false;
|
1632 | 1628 | rte->inFromCl = true;
|
1633 | 1629 | rte->skipAcl = false;
|
@@ -1723,6 +1719,7 @@ AddRelationRawConstraints(Relation rel,
|
1723 | 1719 | int numoldchecks;
|
1724 | 1720 | ConstrCheck *oldchecks;
|
1725 | 1721 | ParseState *pstate;
|
| 1722 | + RangeTblEntry *rte; |
1726 | 1723 | int numchecks;
|
1727 | 1724 | List *listptr;
|
1728 | 1725 | Relation relrel;
|
@@ -1752,7 +1749,8 @@ AddRelationRawConstraints(Relation rel,
|
1752 | 1749 | */
|
1753 | 1750 | pstate = make_parsestate(NULL);
|
1754 | 1751 | 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); |
1756 | 1754 |
|
1757 | 1755 | /*
|
1758 | 1756 | * Process column default expressions.
|
|
0 commit comments