Skip site navigation (1) Skip section navigation (2)

pgsql: Prevent inlining a SQL function with multiple OUT parameters.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent inlining a SQL function with multiple OUT parameters.
Date: 2010-12-01 05:54:31
Message-ID: E1PNfeB-0004LQ-3a@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Prevent inlining a SQL function with multiple OUT parameters.

There were corner cases in which the planner would attempt to inline such
a function, which would result in a failure at runtime due to loss of
information about exactly what the result record type is.  Fix by disabling
inlining when the function's recorded result type is RECORD.  There might
be some sub-cases where inlining could still be allowed, but this is a
simple and backpatchable fix, so leave refinements for another day.
Per bug #5777 from Nate Carson.

Back-patch to all supported branches.  8.1 happens to avoid a core-dump
here, but it still does the wrong thing.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=0a85bb237e63c0e0634ed029cbc4916b0eceeea4

Modified Files
--------------
src/backend/executor/functions.c         |    5 +++++
src/backend/optimizer/util/clauses.c     |    5 +++++
src/test/regress/expected/rangefuncs.out |   20 ++++++++++++++++++++
src/test/regress/sql/rangefuncs.sql      |   19 +++++++++++++++++++
4 files changed, 49 insertions(+), 0 deletions(-)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-12-02 19:49:07
Subject: pgsql: Refactor the pg_dump zlib code from pg_backup_custom.c to asepa
Previous:From: User ItagakiDate: 2010-12-01 03:20:46
Subject: orafce - orafce: work around for 9.1.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group