aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeFunctionscan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-05 02:30:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-05 02:30:50 +0000
commit07f9682de43ce53fcd6d86744f610cacfabc60bb (patch)
tree2415db60be54912154c9c8f8834fb94f33fa5bca /src/backend/executor/nodeFunctionscan.c
parentac1a3dcf24e182a1cc9a136246b7f18a8a64bbd5 (diff)
downloadpostgresql-07f9682de43ce53fcd6d86744f610cacfabc60bb.tar.gz
postgresql-07f9682de43ce53fcd6d86744f610cacfabc60bb.zip
Preliminary code review for anonymous-composite-types patch: fix breakage
of functions returning domain types, update documentation for typtype, move get_typtype to lsyscache.c (actually, resurrect the old version), add defense against creating pseudo-typed table columns, fix some bogus list-parsing in grammar. Issues remain with respect to alias handling and type checking; Joe is on those.
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
-rw-r--r--src/backend/executor/nodeFunctionscan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/executor/nodeFunctionscan.c b/src/backend/executor/nodeFunctionscan.c
index 66c418c8ba6..b8aecc2b825 100644
--- a/src/backend/executor/nodeFunctionscan.c
+++ b/src/backend/executor/nodeFunctionscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.4 2002/08/04 19:48:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.5 2002/08/05 02:30:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,6 @@
#include "executor/nodeFunctionscan.h"
#include "parser/parsetree.h"
#include "parser/parse_expr.h"
-#include "parser/parse_relation.h"
#include "parser/parse_type.h"
#include "storage/lmgr.h"
#include "tcop/pquery.h"
@@ -204,7 +203,7 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate, Plan *parent)
* Now determine if the function returns a simple or composite type,
* and check/add column aliases.
*/
- functyptype = typeid_get_typtype(funcrettype);
+ functyptype = get_typtype(funcrettype);
/*
* Build a suitable tupledesc representing the output rows
@@ -228,7 +227,7 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate, Plan *parent)
else
elog(ERROR, "Invalid return relation specified for function");
}
- else if (functyptype == 'b')
+ else if (functyptype == 'b' || functyptype == 'd')
{
/*
* Must be a base data type, i.e. scalar
@@ -462,7 +461,7 @@ function_getonetuple(FunctionScanState *scanstate,
*/
if (fn_typtype == 'p' && fn_typeid == RECORDOID)
if (tupledesc_mismatch(tupdesc, slot->ttc_tupleDescriptor))
- elog(ERROR, "Query specified return tuple and actual"
+ elog(ERROR, "Query-specified return tuple and actual"
" function return tuple do not match");
}
else