Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6A664B5DC31 for ; Thu, 3 Nov 2011 17:35:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 51015-04 for ; Thu, 3 Nov 2011 20:35:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 585C0B5D80A for ; Thu, 3 Nov 2011 17:35:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pA3KZGLO011062; Thu, 3 Nov 2011 16:35:16 -0400 (EDT) To: Jay Levitt cc: pgsql-performance@postgresql.org Subject: Re: Predicates not getting pushed into SQL function? In-reply-to: <4EB2E251.90906@gmail.com> References: <4EB2D3CB.7020708@gmail.com> <6646.1320345676@sss.pgh.pa.us> <4EB2E251.90906@gmail.com> Comments: In-reply-to Jay Levitt message dated "Thu, 03 Nov 2011 14:49:53 -0400" Date: Thu, 03 Nov 2011 16:35:16 -0400 Message-ID: <11061.1320352516@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.101 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201111/70 X-Sequence-Number: 45581 Jay Levitt writes: > > > What other info can I > provide?  id is int, gender is varchar(255), and it's happening on > 9.0.4...
>
[ etc etc ] Please don't send HTML-only email to these lists. 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, eg create type matcher_result as (user_id int, match int); create or replace function matcher() returns setof matcher_result as ... regards, tom lane