Re: BUG #5240: Stable Functions that return a table type with a dropped column fail - Mailing list pgsql-bugs

From Andrew Gierth
Subject Re: BUG #5240: Stable Functions that return a table type with a dropped column fail
Date
Msg-id 87zl5p2mi1.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to BUG #5240: Stable Functions that return a table type with a dropped column fail  ("David Gardner" <dgardner@creatureshop.com>)
Responses Re: BUG #5240: Stable Functions that return a table type with a dropped column fail  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
>>>>> "David" == "David Gardner" <dgardner@creatureshop.com> writes:

 David> The following bug has been logged online:

 David> Bug reference:      5240
 David> Logged by:          David Gardner
 David> Email address:      dgardner@creatureshop.com
 David> PostgreSQL version: 8.4.1
 David> Operating system:   Debian Linux, amd64 2.6.30
 David> Description:        Stable Functions that return a table type with a dropped
 David> column fail
 David> Details:

 David> SELECT foo(); works while SELECT * FROM foo(); fails.
 David> However redefining the function as volatile fixes the
 David> issue. Possibly related to BUG #4907.

I don't think it's particularly closely related to #4907.

I've confirmed this bug still exists in both 8.4.2 and HEAD; it's
clearly a problem that affects only inlined SQL functions (making the
function volatile defeats inlining, and thus avoids the bug).

--
Andrew (irc:RhodiumToad)

pgsql-bugs by date:

Previous
From: "David Gardner"
Date:
Subject: BUG #5240: Stable Functions that return a table type with a dropped column fail
Next
From: Tom Lane
Date:
Subject: Re: BUG #5240: Stable Functions that return a table type with a dropped column fail