Re: Passing arguments to views
От | Tino Wildenhain |
---|---|
Тема | Re: Passing arguments to views |
Дата | |
Msg-id | 43E30196.7040603@wildenhain.de обсуждение исходный текст |
Ответ на | Re: Passing arguments to views (Chris Campbell <chris@bignerdranch.com>) |
Ответы |
Re: Passing arguments to views
|
Список | pgsql-hackers |
Chris Campbell schrieb: ... > That was a very simplistic example and didn't illustrate my point -- I > apologize. I was trying to think of something succinct and illustrative > for a quick mailing list post but came up short. > > Maybe a better example would be a situation where you want to do > substitutions in places other than the WHERE clause? There's no way to > "push" that out to the calling query. But even in this simple case, the > easier-to-grok syntax of making a view look like a function (and > codifying the options for restricting the results as arguments to the > view) is a nice win in terms of readability and maintainability. Well if the view does not suit your needs, why dont you use an set returnung function instead? Inside it you can do all the magic you want and still use it similar to a table or view. Regards Tino
В списке pgsql-hackers по дате отправления: