From: Jay Levitt <jay.levitt@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Predicates not getting pushed into SQL function?
Date: Mon, 07 Nov 2011 15:13:43 -0500
Message-ID: <4EB83BF7.4070905@gmail.com> (raw)
In-Reply-To: <11061.1320352516@sss.pgh.pa.us>
References: <4EB2D3CB.7020708@gmail.com>
<6646.1320345676@sss.pgh.pa.us>
<4EB2E251.90906@gmail.com>
<11061.1320352516@sss.pgh.pa.us>
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 ...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jay.levitt@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Predicates not getting pushed into SQL function?
In-Reply-To: <4EB83BF7.4070905@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox