mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
Don't try to constant-fold functions returning RECORD, since the optimizer
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.
This commit is contained in:
parent
c61d1c95ea
commit
59974b0e0a
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.186.4.3 2005/04/10 20:57:45 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.186.4.4 2005/04/14 21:44:22 tgl Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -2043,6 +2043,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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user