mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 16:21:20 +03: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
536b3af7e3
commit
aa4762e7c8
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.109 2002/09/11 14:48:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.109.2.1 2005/04/14 21:44:46 tgl Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -1620,6 +1620,13 @@ simplify_op_or_func(Expr *expr, List *args)
|
||||
result_typeid = func->funcresulttype;
|
||||
}
|
||||
|
||||
/*
|
||||
* Can't simplify if it returns RECORD, since we can't pass an expected
|
||||
* tupledesc.
|
||||
*/
|
||||
if (result_typeid == RECORDOID)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* we could use func_volatile() here, but we need several fields out
|
||||
* of the func tuple, so might as well just look it up once.
|
||||
|
Loading…
x
Reference in New Issue
Block a user