*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.164 2002/08/19 00:40:14 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.165 2002/08/19 15:08:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
foreach(l, attnamelist)
{
- char *name = ((Ident *) lfirst(l))->name;
+ char *name = strVal(lfirst(l));
int attnum;
/* Lookup column name, elog on failure */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.29 2002/08/15 16:36:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.30 2002/08/19 15:08:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
count = 4;
foreach(list, fkconstraint->fk_attrs)
{
- Ident *fk_at = lfirst(list);
+ char *fk_at = strVal(lfirst(list));
- trig.tgargs[count] = fk_at->name;
+ trig.tgargs[count] = fk_at;
count += 2;
}
count = 5;
foreach(list, fkconstraint->pk_attrs)
{
- Ident *pk_at = lfirst(list);
+ char *pk_at = strVal(lfirst(list));
- trig.tgargs[count] = pk_at->name;
+ trig.tgargs[count] = pk_at;
count += 2;
}
trig.tgnargs = count - 1;
i = 0;
foreach(l, fkconstraint->fk_attrs)
{
- Ident *id = (Ident *) lfirst(l);
+ char *id = strVal(lfirst(l));
AttrNumber attno;
- attno = get_attnum(RelationGetRelid(rel), id->name);
+ attno = get_attnum(RelationGetRelid(rel), id);
if (attno == InvalidAttrNumber)
elog(ERROR, "Relation \"%s\" has no column \"%s\"",
- RelationGetRelationName(rel), id->name);
+ RelationGetRelationName(rel), id);
fkattr[i++] = attno;
}
i = 0;
foreach(l, fkconstraint->pk_attrs)
{
- Ident *id = (Ident *) lfirst(l);
+ char *id = strVal(lfirst(l));
AttrNumber attno;
- attno = get_attnum(RelationGetRelid(pkrel), id->name);
+ attno = get_attnum(RelationGetRelid(pkrel), id);
if (attno == InvalidAttrNumber)
elog(ERROR, "Relation \"%s\" has no column \"%s\"",
- RelationGetRelationName(pkrel), id->name);
+ RelationGetRelationName(pkrel), id);
pkattr[i++] = attno;
}
CreateTrigStmt *fk_trigger;
List *fk_attr;
List *pk_attr;
- Ident *id;
ObjectAddress trigobj,
constrobj;
while (fk_attr != NIL)
{
- id = (Ident *) lfirst(fk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
- id = (Ident *) lfirst(pk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(fk_attr));
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(pk_attr));
fk_attr = lnext(fk_attr);
pk_attr = lnext(pk_attr);
}
pk_attr = fkconstraint->pk_attrs;
while (fk_attr != NIL)
{
- id = (Ident *) lfirst(fk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
- id = (Ident *) lfirst(pk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(fk_attr));
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(pk_attr));
fk_attr = lnext(fk_attr);
pk_attr = lnext(pk_attr);
}
pk_attr = fkconstraint->pk_attrs;
while (fk_attr != NIL)
{
- id = (Ident *) lfirst(fk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
- id = (Ident *) lfirst(pk_attr);
- fk_trigger->args = lappend(fk_trigger->args, makeString(id->name));
-
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(fk_attr));
+ fk_trigger->args = lappend(fk_trigger->args, lfirst(pk_attr));
fk_attr = lnext(fk_attr);
pk_attr = lnext(pk_attr);
}
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.203 2002/08/19 00:40:14 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.204 2002/08/19 15:08:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
return newnode;
}
-static Stream *
-_copyStream(Stream *from)
-{
- Stream *newnode = makeNode(Stream);
-
- newnode->pathptr = from->pathptr;
- newnode->cinfo = from->cinfo;
- newnode->clausetype = from->clausetype;
-
- newnode->upstream = (StreamPtr) NULL; /* only copy nodes
- * downwards! */
- Node_Copy(from, newnode, downstream);
- if (newnode->downstream)
- ((Stream *) newnode->downstream)->upstream = (Stream *) newnode;
-
- newnode->groupup = from->groupup;
- newnode->groupcost = from->groupcost;
- newnode->groupsel = from->groupsel;
-
- return newnode;
-}
-
/* ****************************************************************
* parsenodes.h copy functions
* ****************************************************************
return newnode;
}
-static Ident *
-_copyIdent(Ident *from)
-{
- Ident *newnode = makeNode(Ident);
-
- newnode->name = pstrdup(from->name);
-
- return newnode;
-}
-
static FuncCall *
_copyFuncCall(FuncCall *from)
{
case T_JoinInfo:
retval = _copyJoinInfo(from);
break;
- case T_Stream:
- retval = _copyStream(from);
- break;
case T_IndexOptInfo:
retval = _copyIndexOptInfo(from);
break;
case T_A_Const:
retval = _copyAConst(from);
break;
- case T_Ident:
- retval = _copyIdent(from);
- break;
case T_FuncCall:
retval = _copyFuncCall(from);
break;
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.152 2002/08/19 00:40:14 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.153 2002/08/19 15:08:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
return true;
}
-static bool
-_equalStream(Stream *a, Stream *b)
-{
- if (a->clausetype != b->clausetype)
- return false;
- if (a->groupup != b->groupup)
- return false;
- if (a->groupcost != b->groupcost)
- return false;
- if (a->groupsel != b->groupsel)
- return false;
- if (!equal(a->pathptr, b->pathptr))
- return false;
- if (!equal(a->cinfo, b->cinfo))
- return false;
- if (!equal(a->upstream, b->upstream))
- return false;
- return equal(a->downstream, b->downstream);
-}
-
/*
* Stuff from parsenodes.h
*/
return true;
}
-static bool
-_equalIdent(Ident *a, Ident *b)
-{
- if (!equalstr(a->name, b->name))
- return false;
-
- return true;
-}
-
static bool
_equalFuncCall(FuncCall *a, FuncCall *b)
{
case T_JoinInfo:
retval = _equalJoinInfo(a, b);
break;
- case T_Stream:
- retval = _equalStream(a, b);
- break;
case T_TidPath:
retval = _equalTidPath(a, b);
break;
case T_A_Const:
retval = _equalAConst(a, b);
break;
- case T_Ident:
- retval = _equalIdent(a, b);
- break;
case T_FuncCall:
retval = _equalFuncCall(a, b);
break;
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.167 2002/08/10 20:44:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.168 2002/08/19 15:08:46 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
}
}
-static void
-_outStream(StringInfo str, Stream *node)
-{
- appendStringInfo(str,
- " STREAM :pathptr @ %p :cinfo @ %p :clausetype %p :upstream @ %p ",
- node->pathptr,
- node->cinfo,
- node->clausetype,
- node->upstream);
-
- appendStringInfo(str,
- " :downstream @ %p :groupup %d :groupcost %f :groupsel %f ",
- node->downstream,
- node->groupup,
- node->groupcost,
- node->groupsel);
-}
-
static void
_outAExpr(StringInfo str, A_Expr *node)
{
_outNode(str, node->indirection);
}
-static void
-_outIdent(StringInfo str, Ident *node)
-{
- appendStringInfo(str, " IDENT ");
- _outToken(str, node->name);
-}
-
static void
_outAConst(StringInfo str, A_Const *node)
{
case T_JoinInfo:
_outJoinInfo(str, obj);
break;
- case T_Stream:
- _outStream(str, obj);
- break;
case T_A_Expr:
_outAExpr(str, obj);
break;
case T_ParamRef:
_outParamRef(str, obj);
break;
- case T_Ident:
- _outIdent(str, obj);
- break;
case T_A_Const:
_outAConst(str, obj);
break;
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.240 2002/08/02 18:15:06 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.241 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
TargetEntry *te = (TargetEntry *) lfirst(targetList);
Resdom *rd;
- Ident *id;
Assert(IsA(te, TargetEntry));
rd = te->resdom;
Assert(IsA(rd, Resdom));
- if (rd->resjunk) /* junk columns don't get
- * aliases */
+ /* junk columns don't get aliases */
+ if (rd->resjunk)
continue;
- id = (Ident *) lfirst(aliaslist);
- Assert(IsA(id, Ident));
- rd->resname = pstrdup(id->name);
+ rd->resname = pstrdup(strVal(lfirst(aliaslist)));
aliaslist = lnext(aliaslist);
if (aliaslist == NIL)
break; /* done assigning aliases */
bool saw_nullable;
Constraint *constraint;
List *clist;
- Ident *key;
cxt->columns = lappend(cxt->columns, column);
/*
* If this column constraint is a FOREIGN KEY constraint, then we
- * fill in the current attributes name and throw it into the list
+ * fill in the current attribute's name and throw it into the list
* of FK constraints to be processed later.
*/
if (IsA(constraint, FkConstraint))
{
FkConstraint *fkconstraint = (FkConstraint *) constraint;
- Ident *id = makeNode(Ident);
-
- id->name = column->colname;
- fkconstraint->fk_attrs = makeList1(id);
+ fkconstraint->fk_attrs = makeList1(makeString(column->colname));
cxt->fkconstraints = lappend(cxt->fkconstraints, fkconstraint);
continue;
}
case CONSTR_NULL:
if (saw_nullable && column->is_not_null)
elog(ERROR, "%s/(NOT) NULL conflicting declaration for '%s.%s'",
- cxt->stmtType, (cxt->relation)->relname, column->colname);
+ cxt->stmtType, cxt->relation->relname, column->colname);
column->is_not_null = FALSE;
saw_nullable = true;
break;
case CONSTR_NOTNULL:
if (saw_nullable && !column->is_not_null)
elog(ERROR, "%s/(NOT) NULL conflicting declaration for '%s.%s'",
- cxt->stmtType, (cxt->relation)->relname, column->colname);
+ cxt->stmtType, cxt->relation->relname, column->colname);
column->is_not_null = TRUE;
saw_nullable = true;
break;
case CONSTR_DEFAULT:
if (column->raw_default != NULL)
elog(ERROR, "%s/DEFAULT multiple values specified for '%s.%s'",
- cxt->stmtType, (cxt->relation)->relname, column->colname);
+ cxt->stmtType, cxt->relation->relname, column->colname);
column->raw_default = constraint->raw_expr;
Assert(constraint->cooked_expr == NULL);
break;
case CONSTR_PRIMARY:
if (constraint->name == NULL)
- constraint->name = makeObjectName((cxt->relation)->relname,
+ constraint->name = makeObjectName(cxt->relation->relname,
NULL,
"pkey");
if (constraint->keys == NIL)
- {
- key = makeNode(Ident);
- key->name = pstrdup(column->colname);
- constraint->keys = makeList1(key);
- }
+ constraint->keys = makeList1(makeString(column->colname));
cxt->ixconstraints = lappend(cxt->ixconstraints, constraint);
break;
case CONSTR_UNIQUE:
if (constraint->name == NULL)
- constraint->name = makeObjectName((cxt->relation)->relname,
+ constraint->name = makeObjectName(cxt->relation->relname,
column->colname,
"key");
if (constraint->keys == NIL)
- {
- key = makeNode(Ident);
- key->name = pstrdup(column->colname);
- constraint->keys = makeList1(key);
- }
+ constraint->keys = makeList1(makeString(column->colname));
cxt->ixconstraints = lappend(cxt->ixconstraints, constraint);
break;
case CONSTR_CHECK:
if (constraint->name == NULL)
- constraint->name = makeObjectName((cxt->relation)->relname,
+ constraint->name = makeObjectName(cxt->relation->relname,
column->colname,
NULL);
cxt->ckconstraints = lappend(cxt->ckconstraints, constraint);
{
case CONSTR_PRIMARY:
if (constraint->name == NULL)
- constraint->name = makeObjectName((cxt->relation)->relname,
+ constraint->name = makeObjectName(cxt->relation->relname,
NULL,
"pkey");
cxt->ixconstraints = lappend(cxt->ixconstraints, constraint);
relationHasPrimaryKey(cxt->relOid)))
elog(ERROR, "%s / PRIMARY KEY multiple primary keys"
" for table '%s' are not allowed",
- cxt->stmtType, (cxt->relation)->relname);
+ cxt->stmtType, cxt->relation->relname);
cxt->pkey = index;
}
index->isconstraint = true;
if (constraint->name != NULL)
index->idxname = pstrdup(constraint->name);
else if (constraint->contype == CONSTR_PRIMARY)
- index->idxname = makeObjectName((cxt->relation)->relname, NULL, "pkey");
+ index->idxname = makeObjectName(cxt->relation->relname, NULL, "pkey");
else
index->idxname = NULL; /* will set it later */
*/
foreach(keys, constraint->keys)
{
- Ident *key = (Ident *) lfirst(keys);
+ char *key = strVal(lfirst(keys));
bool found = false;
- Assert(IsA(key, Ident));
column = NULL;
foreach(columns, cxt->columns)
{
column = lfirst(columns);
Assert(IsA(column, ColumnDef));
- if (strcmp(column->colname, key->name) == 0)
+ if (strcmp(column->colname, key) == 0)
{
found = true;
break;
if (constraint->contype == CONSTR_PRIMARY)
column->is_not_null = TRUE;
}
- else if (SystemAttributeByName(key->name, cxt->hasoids) != NULL)
+ else if (SystemAttributeByName(key, cxt->hasoids) != NULL)
{
/*
* column will be a system column in the new table, so
if (inhattr->attisdropped)
continue;
- if (strcmp(key->name, inhname) == 0)
+ if (strcmp(key, inhname) == 0)
{
found = true;
/* ALTER TABLE case: does column already exist? */
HeapTuple atttuple;
- atttuple = SearchSysCacheAttName(cxt->relOid, key->name);
+ atttuple = SearchSysCacheAttName(cxt->relOid, key);
if (HeapTupleIsValid(atttuple))
{
found = true;
if (constraint->contype == CONSTR_PRIMARY &&
!((Form_pg_attribute) GETSTRUCT(atttuple))->attnotnull)
elog(ERROR, "Existing attribute \"%s\" cannot be a PRIMARY KEY because it is not marked NOT NULL",
- key->name);
+ key);
ReleaseSysCache(atttuple);
}
}
if (!found)
elog(ERROR, "%s: column \"%s\" named in key does not exist",
- cxt->stmtType, key->name);
+ cxt->stmtType, key);
/* Check for PRIMARY KEY(foo, foo) */
foreach(columns, index->indexParams)
{
iparam = (IndexElem *) lfirst(columns);
- if (iparam->name && strcmp(key->name, iparam->name) == 0)
+ if (iparam->name && strcmp(key, iparam->name) == 0)
elog(ERROR, "%s: column \"%s\" appears twice in %s constraint",
- cxt->stmtType, key->name,
+ cxt->stmtType, key,
index->primary ? "PRIMARY KEY" : "UNIQUE");
}
/* OK, add it to the index definition */
iparam = makeNode(IndexElem);
- iparam->name = pstrdup(key->name);
+ iparam->name = pstrdup(key);
iparam->funcname = NIL;
iparam->args = NIL;
iparam->opclass = NIL;
attnum = 0;
foreach(fkattrs, fkconstraint->fk_attrs)
{
- Ident *fkattr = lfirst(fkattrs);
+ char *fkattr = strVal(lfirst(fkattrs));
if (attnum >= INDEX_MAX_KEYS)
elog(ERROR, "Can only have %d keys in a foreign key",
INDEX_MAX_KEYS);
- fktypoid[attnum++] = transformFkeyGetColType(cxt,
- fkattr->name);
+ fktypoid[attnum++] = transformFkeyGetColType(cxt, fkattr);
}
/*
*/
if (fkconstraint->pk_attrs == NIL)
{
- if (strcmp(fkconstraint->pktable->relname, (cxt->relation)->relname) != 0)
+ if (strcmp(fkconstraint->pktable->relname, cxt->relation->relname) != 0)
transformFkeyGetPrimaryKey(fkconstraint, pktypoid);
else if (cxt->pkey != NULL)
{
foreach(attr, cxt->pkey->indexParams)
{
IndexElem *ielem = lfirst(attr);
- Ident *pkattr = (Ident *) makeNode(Ident);
+ char *iname = ielem->name;
- Assert(ielem->name); /* no func index here */
- pkattr->name = pstrdup(ielem->name);
+ Assert(iname); /* no func index here */
fkconstraint->pk_attrs = lappend(fkconstraint->pk_attrs,
- pkattr);
+ makeString(iname));
if (attnum >= INDEX_MAX_KEYS)
elog(ERROR, "Can only have %d keys in a foreign key",
INDEX_MAX_KEYS);
pktypoid[attnum++] = transformFkeyGetColType(cxt,
- ielem->name);
+ iname);
}
}
else
else
{
/* Validate the specified referenced key list */
- if (strcmp(fkconstraint->pktable->relname, (cxt->relation)->relname) != 0)
+ if (strcmp(fkconstraint->pktable->relname, cxt->relation->relname) != 0)
transformFkeyCheckAttrs(fkconstraint, pktypoid);
else
{
attnum = 0;
foreach(pkattrs, fkconstraint->pk_attrs)
{
- Ident *pkattr = lfirst(pkattrs);
+ char *pkattr = strVal(lfirst(pkattrs));
List *indparms;
found = false;
IndexElem *indparm = lfirst(indparms);
if (indparm->name &&
- strcmp(indparm->name, pkattr->name) == 0)
+ strcmp(indparm->name, pkattr) == 0)
{
found = true;
break;
elog(ERROR, "Can only have %d keys in a foreign key",
INDEX_MAX_KEYS);
pktypoid[attnum++] = transformFkeyGetColType(cxt,
- pkattr->name);
+ pkattr);
}
if (found)
break;
foreach(attrl, fkconstraint->pk_attrs)
{
- Ident *attr = lfirst(attrl);
+ char *attrname = strVal(lfirst(attrl));
found = false;
for (i = 0; i < INDEX_MAX_KEYS && indexStruct->indkey[i] != 0; i++)
int pkattno = indexStruct->indkey[i];
if (namestrcmp(attnumAttName(pkrel, pkattno),
- attr->name) == 0)
+ attrname) == 0)
{
pktypoid[attnum++] = attnumTypeId(pkrel, pkattno);
found = true;
for (i = 0; i < INDEX_MAX_KEYS && indexStruct->indkey[i] != 0; i++)
{
int pkattno = indexStruct->indkey[i];
- Ident *pkattr = makeNode(Ident);
- pkattr->name = pstrdup(NameStr(*attnumAttName(pkrel, pkattno)));
pktypoid[attnum++] = attnumTypeId(pkrel, pkattno);
-
- fkconstraint->pk_attrs = lappend(fkconstraint->pk_attrs, pkattr);
+ fkconstraint->pk_attrs = lappend(fkconstraint->pk_attrs,
+ makeString(pstrdup(NameStr(*attnumAttName(pkrel, pkattno)))));
}
ReleaseSysCache(indexTuple);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.359 2002/08/15 16:36:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.360 2002/08/19 15:08:47 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
columnElem: ColId
{
- Ident *id = makeNode(Ident);
- id->name = $1;
- $$ = (Node *)id;
+ $$ = (Node *) makeString($1);
}
;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.87 2002/08/08 01:44:31 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.88 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
switch (nodeTag(node))
{
- case T_Ident:
- *name = ((Ident *) node)->name;
- return 2;
case T_ColumnRef:
{
char *cname = strVal(llast(((ColumnRef *) node)->fields));
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.115 2002/08/15 16:36:07 momjian Exp $
+ * $Id: nodes.h,v 1.116 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
T_PathKeyItem,
T_RestrictInfo,
T_JoinInfo,
- T_Stream,
T_IndexOptInfo,
/*
*/
T_IndexInfo = 300,
T_ResultRelInfo,
- T_TupleCount,
T_TupleTableSlot,
T_ExprContext,
T_ProjectionInfo,
T_JunkFilter,
T_EState,
- T_BaseNode,
T_CommonState,
T_ResultState,
T_AppendState,
T_A_Expr = 700,
T_ColumnRef,
T_ParamRef,
- T_Ident,
T_A_Const,
T_FuncCall,
T_A_Indices,
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.200 2002/08/19 00:40:15 tgl Exp $
+ * $Id: parsenodes.h,v 1.201 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
RangeVar *support; /* supporting relation, if any */
} ColumnDef;
-/*
- * Ident -
- * an unqualified identifier. This is currently used only in the context
- * of column name lists.
- */
-typedef struct Ident
-{
- NodeTag type;
- char *name; /* its name */
-} Ident;
-
/*
* FuncCall - a function or aggregate invocation
*
{
NodeTag type;
RangeVar *relation; /* the relation to copy */
- List *attlist; /* List of Ident nodes, or NIL for all */
+ List *attlist; /* List of column names (as Strings),
+ * or NIL for all columns */
bool is_from; /* TO or FROM */
char *filename; /* if NULL, use stdin/stdout */
List *options; /* List of DefElem nodes */
char *name; /* name, or NULL if unnamed */
Node *raw_expr; /* expr, as untransformed parse tree */
char *cooked_expr; /* expr, as nodeToString representation */
- List *keys; /* Ident nodes naming referenced column(s) */
+ List *keys; /* String nodes naming referenced column(s) */
} Constraint;
/* ----------
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.65 2002/06/20 20:29:51 momjian Exp $
+ * $Id: relation.h,v 1.66 2002/08/19 15:08:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
List *jinfo_restrictinfo; /* relevant RestrictInfos */
} JoinInfo;
-/*
- * Stream:
- * A stream represents a root-to-leaf path in a plan tree (i.e. a tree of
- * JoinPaths and Paths). The stream includes pointers to all Path nodes,
- * as well as to any clauses that reside above Path nodes. This structure
- * is used to make Path nodes and clauses look similar, so that Predicate
- * Migration can run.
- *
- * XXX currently, Predicate Migration is dead code, and so is this node type.
- * Probably should remove support for it.
- *
- * pathptr -- pointer to the current path node
- * cinfo -- if NULL, this stream node referes to the path node.
- * Otherwise this is a pointer to the current clause.
- * clausetype -- whether cinfo is in loc_restrictinfo or pathinfo in the
- * path node (XXX this is now used only by dead code, which is
- * good because the distinction no longer exists...)
- * upstream -- linked list pointer upwards
- * downstream -- ditto, downwards
- * groupup -- whether or not this node is in a group with the node upstream
- * groupcost -- total cost of the group that node is in
- * groupsel -- total selectivity of the group that node is in
- */
-typedef struct Stream *StreamPtr;
-
-typedef struct Stream
-{
- NodeTag type;
- Path *pathptr;
- RestrictInfo *cinfo;
- int *clausetype;
- StreamPtr upstream;
- StreamPtr downstream;
- bool groupup;
- Cost groupcost;
- Selectivity groupsel;
-} Stream;
-
#endif /* RELATION_H */