Re: Function Stats WAS: Passing arguments to views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function Stats WAS: Passing arguments to views
Дата
Msg-id 28636.1138996552@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function Stats WAS: Passing arguments to views  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> I'm not thrilled with putting in a stopgap that we will have to support
>> forever.  The constant method is *clearly* inadequate for many (probably
>> most IMHO) practical cases.  Where do you see it being of use?

> Well, mostly for the real-world use cases where I've run into SRF estimate 
> issues, which have mostly been SRFs which return one row.

Well, if they're certain to return one row, you can just declare them as
not SETOF, no?  Since 8.1 we do get that case right:

regression=# explain select * from cos(0);                      QUERY PLAN
--------------------------------------------------------Function Scan on cos  (cost=0.00..0.01 rows=1 width=8)
(1 row)


> No, but if you're calling the S() estimator in the context of performing a 
> join, what do you supply for parameters?

Exactly my point about the API problem.  I'm not sure that joins matter,
but the function parameters sure do, and those might not be simple constants.
        regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Function Stats WAS: Passing arguments to views
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Re: Multiple logical databases