| From: | tgl(at)postgresql(dot)org (Tom Lane) | 
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org | 
| Subject: | pgsql: Fix oversight in original coding of inline_function(): since | 
| Date: | 2007-03-06 22:45:41 | 
| Message-ID: | 20070306224541.D84E49FB574@postgresql.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers | 
Log Message:
-----------
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.
Tags:
----
REL7_4_STABLE
Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        clauses.c (r1.154.2.5 -> r1.154.2.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c.diff?r1=1.154.2.5&r2=1.154.2.6)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2007-03-07 13:35:03 | pgsql: Cleanup the bootstrap code a little, and rename "dummy procs" in | 
| Previous Message | Tom Lane | 2007-03-06 22:45:35 | pgsql: Fix oversight in original coding of inline_function(): since |