]> granicus.if.org Git - postgresql/commit
Fix a thinko in my patch of a couple months ago for bug #3116: it did the
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 May 2007 18:54:02 +0000 (18:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 May 2007 18:54:02 +0000 (18:54 +0000)
commit1430b51761a03e5c116b9c4b29fdeb113944b112
tree62d4ed2971a0813e6134fe8d2973f46829e46e37
parent9c35b136f1469dc24d255b7c667d79aeb91e2be3
Fix a thinko in my patch of a couple months ago for bug #3116: it did the
wrong thing when inlining polymorphic SQL functions, because it was using the
function's declared return type where it should have used the actual result
type of the current call.  In 8.1 and 8.2 this causes obvious failures even if
you don't have assertions turned on; in 8.0 and 7.4 it would only be a problem
if the inlined expression were used as an input to a function that did
run-time type determination on its inputs.  Add a regression test, since this
is evidently an under-tested area.
src/backend/optimizer/util/clauses.c
src/test/regress/expected/polymorphism.out
src/test/regress/sql/polymorphism.sql