Re: Predicates not getting pushed into SQL function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Predicates not getting pushed into SQL function?
Дата
Msg-id 11061.1320352516@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Predicates not getting pushed into SQL function?  (Jay Levitt <jay.levitt@gmail.com>)
Ответы Re: Predicates not getting pushed into SQL function?  (Jay Levitt <jay.levitt@gmail.com>)
Список pgsql-performance
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?  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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mario Weilguni
Дата:
Сообщение: Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Следующее
От: CS DBA
Дата:
Сообщение: Re: function slower than the same code in an sql file