aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-03-06 22:45:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-03-06 22:45:35 +0000
commit14686de2b5aa11532f7629af6ec42ea35e50455b (patch)
treed123e78b036c0d8e1c1a77da922602ff84eea560 /src/backend/optimizer/util/pathnode.c
parent45c84659eea6fb54e791e28a1a816917abe0b3de (diff)
downloadpostgresql-14686de2b5aa11532f7629af6ec42ea35e50455b.tar.gz
postgresql-14686de2b5aa11532f7629af6ec42ea35e50455b.zip
Fix oversight in original coding of inline_function(): since
check_sql_fn_retval allows binary-compatibility cases, the expression extracted from an inline-able SQL function might have a type that is only binary-compatible with the declared function result type. To avoid possibly changing the semantics of the expression, we should insert a RelabelType node in such cases. This has only been shown to have bad consequences in recent 8.1 and up releases, but I suspect there may be failure cases in the older branches too, so patch it all the way back. Per bug #3116 from Greg Mullane. Along the way, fix an omission in eval_const_expressions_mutator: it failed to copy the relabelformat field when processing a RelabelType. No known observable failures from this, but it definitely isn't intended behavior.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
0 files changed, 0 insertions, 0 deletions