diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-08-24 03:29:15 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-08-24 03:29:15 +0000 |
commit | 782c16c6a154e760bf1608d633488538cd52da93 (patch) | |
tree | 902da787593da21a979bd2f74b0b44acf9c427b0 /src/include/executor | |
parent | 87523ab8db34859ae3fb980a3fab9f29dfc4c97a (diff) | |
download | postgresql-782c16c6a154e760bf1608d633488538cd52da93.tar.gz postgresql-782c16c6a154e760bf1608d633488538cd52da93.zip |
SQL-language functions are now callable in ordinary fmgr contexts ...
for example, an SQL function can be used in a functional index. (I make
no promises about speed, but it'll work ;-).) Clean up and simplify
handling of functions returning sets.
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/execFlatten.h | 11 | ||||
-rw-r--r-- | src/include/executor/executor.h | 14 | ||||
-rw-r--r-- | src/include/executor/functions.h | 11 |
3 files changed, 21 insertions, 15 deletions
diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h index c7d85e2e6da..3fa3673b201 100644 --- a/src/include/executor/execFlatten.h +++ b/src/include/executor/execFlatten.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execFlatten.h,v 1.11 2000/01/26 05:58:05 momjian Exp $ + * $Id: execFlatten.h,v 1.12 2000/08/24 03:29:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,11 +15,14 @@ #define EXECFLATTEN_H #include "nodes/execnodes.h" -#include "nodes/relation.h" +#include "nodes/parsenodes.h" -extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsNull, bool *iterIsDone); -extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, bool *isNullVect, bool *fj_isDone); +extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, + bool *isNull, ExprDoneCond *isDone); + +extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, + bool *isNullVect, ExprDoneCond *fj_isDone); #endif /* EXECFLATTEN_H */ diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index ea589e06dd9..e39a60a6a24 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: executor.h,v 1.48 2000/08/21 20:55:29 tgl Exp $ + * $Id: executor.h,v 1.49 2000/08/24 03:29:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -78,14 +78,20 @@ extern char *GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno, bool *isNull); extern char *GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull); +extern Datum ExecMakeFunctionResult(FunctionCachePtr fcache, + List *arguments, + ExprContext *econtext, + bool *isNull, + ExprDoneCond *isDone); extern Datum ExecEvalExpr(Node *expression, ExprContext *econtext, - bool *isNull, bool *isDone); + bool *isNull, ExprDoneCond *isDone); extern Datum ExecEvalExprSwitchContext(Node *expression, ExprContext *econtext, - bool *isNull, bool *isDone); + bool *isNull, ExprDoneCond *isDone); extern bool ExecQual(List *qual, ExprContext *econtext, bool resultForNull); extern int ExecTargetListLength(List *targetlist); extern int ExecCleanTargetListLength(List *targetlist); -extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, bool *isDone); +extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, + ExprDoneCond *isDone); /* * prototypes from functions in execScan.c diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 0e55be1980e..649e38e142f 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -1,24 +1,21 @@ /*------------------------------------------------------------------------- * * functions.h - * + * Declarations for execution of SQL-language functions. * * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: functions.h,v 1.13 2000/08/08 15:42:39 tgl Exp $ + * $Id: functions.h,v 1.14 2000/08/24 03:29:10 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef FUNCTIONS_H #define FUNCTIONS_H -#include "nodes/parsenodes.h" -#include "utils/syscache.h" +#include "fmgr.h" -extern Datum postquel_function(FunctionCallInfo fcinfo, - FunctionCachePtr fcache, - bool *isDone); +extern Datum fmgr_sql(PG_FUNCTION_ARGS); #endif /* FUNCTIONS_H */ |