Re: Predicates not getting pushed into SQL function? - Mailing list pgsql-performance

From Jay Levitt
Subject Re: Predicates not getting pushed into SQL function?
Date
Msg-id 4EB83BF7.4070905@gmail.com
Whole thread Raw
In response to Re: Predicates not getting pushed into SQL function?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Predicates not getting pushed into SQL function?
List pgsql-performance
Tom Lane wrote:
 > Please don't send HTML-only email to these lists.

Oops - new mail client, sorry.

 > Anyway, the answer seems to be that inline_set_returning_function needs
 > some work to handle cases with declared OUT parameters.  I will see
 > about fixing that going forward, but in existing releases what you need
 > to do is declare the function as returning SETOF some named composite
 > type


Yes, that patch works great!  Oddly enough, the workaround now does NOT
work; functions returning SETOF named composite types don't get inlined, but
functions returning the equivalent TABLE do get inlined.  Let me know if you
need a failcase, but the bug doesn't actually affect me now :)

Jay

 >
 > create type matcher_result as (user_id int, match int);
 >
 > create or replace function matcher() returns setof matcher_result as ...


pgsql-performance by date:

Previous
From: Ivan Voras
Date:
Subject: Re: PostgreSQL perform poorly on VMware ESXi
Next
From: Jay Levitt
Date:
Subject: Re: Predicates not getting pushed into SQL function?