diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 51a93517c1..9628423c8e 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.28 1998/07/19 05:49:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.29 1998/07/20 21:18:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -446,7 +446,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList) if (typeTypeRelid(typ) == InvalidOid) { - if (exec_tlist_length(tlist) > 1) + if (ExecTargetListLength(tlist) > 1) elog(ERROR, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ)); resnode = (Resdom *) ((TargetEntry *) lfirst(tlist))->resdom; @@ -464,7 +464,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList) * is 'retrieve (x = func2())', where func2 has the same return type * as the function that's calling it. */ - if (exec_tlist_length(tlist) == 1) + if (ExecTargetListLength(tlist) == 1) { resnode = (Resdom *) ((TargetEntry *) lfirst(tlist))->resdom; if (resnode->restype == rettype) @@ -485,7 +485,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList) relid = reln->rd_id; relnatts = reln->rd_rel->relnatts; - if (exec_tlist_length(tlist) != relnatts) + if (ExecTargetListLength(tlist) != relnatts) elog(ERROR, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ)); /* expect attributes 1 .. n in order */ diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index ed39fd43f2..d7a74f3184 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.15 1998/07/20 19:53:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.16 1998/07/20 21:18:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -589,23 +589,3 @@ AddGroupAttrToTlist(List *tlist, List *grpCl) } #endif - -/* was ExecTargetListLength() in execQual.c, - moved here to reduce dependencies on the executor module */ -int -exec_tlist_length(List *targetlist) -{ - int len; - List *tl; - TargetEntry *curTle; - - len = 0; - foreach(tl, targetlist) - { - curTle = lfirst(tl); - - if (curTle->resdom != NULL) - len++; - } - return len; -} diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index d15dc07918..30580bf4d8 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tlist.h,v 1.11 1998/07/20 20:48:54 momjian Exp $ + * $Id: tlist.h,v 1.12 1998/07/20 21:18:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,7 +17,6 @@ #include "nodes/parsenodes.h" #include "nodes/relation.h" -extern int exec_tlist_length(List *targelist); extern TargetEntry *tlistentry_member(Var *var, List *targetlist); extern Expr *matching_tlvar(Var *var, List *targetlist); extern void add_tl_element(RelOptInfo *rel, Var *var); @@ -30,8 +29,7 @@ extern TargetEntry *match_varid(Var *test_var, List *tlist); extern List *new_unsorted_tlist(List *targetlist); extern List *copy_vars(List *target, List *source); extern List *flatten_tlist(List *tlist); -extern List * -flatten_tlist_vars(List *full_tlist, +extern List *flatten_tlist_vars(List *full_tlist, List *flat_tlist); #endif /* TLIST_H */