*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
* 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)
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
}
#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;
-}
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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);
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 */