pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jay Levitt <jay.levitt@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Predicates not getting pushed into SQL function?
Date: Thu, 03 Nov 2011 16:35:16 -0400
Message-ID: <11061.1320352516@sss.pgh.pa.us> (raw)
In-Reply-To: <4EB2E251.90906@gmail.com>
References: <4EB2D3CB.7020708@gmail.com>
	<6646.1320345676@sss.pgh.pa.us>
	<4EB2E251.90906@gmail.com>

Jay Levitt <jay.levitt@gmail.com> writes:
> <html><head>
> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
> </head><body bgcolor="#FFFFFF" text="#000000">What other info can I 
> provide?&nbsp; id is int, gender is varchar(255), and it's happening on 
> 9.0.4...<br>
> <blockquote style="border: 0px none;" 
> [ 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



view thread (6+ messages)  latest in thread

Message-ID: <11061.1320352516@sss.pgh.pa.us>
Permalink:  ../11061.1320352516@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11061.1320352516@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, jay.levitt@gmail.com
  Subject: Re: Predicates not getting pushed into SQL function?
  In-Reply-To: <11061.1320352516@sss.pgh.pa.us>

* 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