projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f9e495
)
Don't try to constant-fold functions returning RECORD, since the optimizer
author
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 14 Apr 2005 21:44:35 +0000
(21:44 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 14 Apr 2005 21:44:35 +0000
(21:44 +0000)
isn't presently set up to pass them an expected tuple descriptor. Bug has
been there since 7.3 but was just recently reported by Thomas Hallgren.
src/backend/optimizer/util/clauses.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/optimizer/util/clauses.c
b/src/backend/optimizer/util/clauses.c
index ccd0fe7392e2c032d7499ac3bbca09331301a308..1cf0b6b89c2e7a1b4a0733f5bea2f13fe10fd4a5 100644
(file)
--- a/
src/backend/optimizer/util/clauses.c
+++ b/
src/backend/optimizer/util/clauses.c
@@
-1667,6
+1667,13
@@
evaluate_function(Oid funcid, Oid result_type, List *args,
if (funcform->proretset)
return NULL;
+ /*
+ * Can't simplify if it returns RECORD, since it will be needing an
+ * expected tupdesc which we can't supply here.
+ */
+ if (funcform->prorettype == RECORDOID)
+ return NULL;
+
/*
* Check for constant inputs and especially constant-NULL inputs.
*/