On Tue, Jan 6, 2015 at 4:15 PM, Jim Nasby <jim.na...@bluetreble.com> wrote:
> On 1/6/15, 10:32 AM, Alvaro Herrera wrote: > >> Tom Lane wrote: >> >> What would make sense to me is to teach the planner about inlining >>> SQL functions that include ORDER BY clauses, so that the performance >>> issue of a double sort could be avoided entirely transparently to >>> the user. >>> >> >> Wouldn't this be applicable to functions in other languages too, not >> only SQL? >> > > Dumb question... we can inline functions from other languages? What chunk > of code handles that? We cannot that I know of. The point being made here is that suggesting an alternative that requires inlining doesn't cover the entire purpose of this feature since the feature can be applied to functions that cannot be inlined. David J.