Re: creating variable views
От | Tom Lane |
---|---|
Тема | Re: creating variable views |
Дата | |
Msg-id | 5832.994564176@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: creating variable views ("Josh Berkus" <josh@agliodbs.com>) |
Список | pgsql-sql |
"Josh Berkus" <josh@agliodbs.com> writes: >> I don't understand the distinction you're trying to make here. In >> general, a view column that is implemented as a function will give >> the >> optimizer headaches if you refer to it in WHERE --- the simplicity or >> complexity of the function has got nothing to do with that AFAICS. > OK. I thought that I noticed a difference between simple SQL functions > and PL/pgSQL functions in this respect, but I could easily be mistaken. AFAIR, the optimizer doesn't pay any attention at all to the implementation language of a function. The only thing that comes to mind here is that some care has been taken to mark all the built-in functions as "iscachable" (or not, as appropriate); but user-created functions may not be so marked when they should be, leading to loss of performance in some cases. regards, tom lane
В списке pgsql-sql по дате отправления: