summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/util/clauses.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 38291be27af..496a4b03f44 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.199 2005/06/26 22:05:38 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.200 2005/07/03 21:14:17 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -2200,13 +2200,17 @@ evaluate_function(Oid funcid, Oid result_type, List *args,
return NULL;
/*
- * Can't simplify if it returns RECORD, except in the case where it has
- * OUT parameters, since it will be needing an expected tupdesc which we
- * can't supply here.
+ * Can't simplify if it returns RECORD. The immediate problem is that
+ * it will be needing an expected tupdesc which we can't supply here.
+ *
+ * In the case where it has OUT parameters, it could get by without an
+ * expected tupdesc, but we still have issues: get_expr_result_type()
+ * doesn't know how to extract type info from a RECORD constant, and
+ * in the case of a NULL function result there doesn't seem to be any
+ * clean way to fix that. In view of the likelihood of there being
+ * still other gotchas, seems best to leave the function call unreduced.
*/
- if (funcform->prorettype == RECORDOID &&
- (heap_attisnull(func_tuple, Anum_pg_proc_proallargtypes) ||
- heap_attisnull(func_tuple, Anum_pg_proc_proargmodes)))
+ if (funcform->prorettype == RECORDOID)
return NULL;
/*