Re: seeking advices for function
От | Jean-Yves F. Barbier |
---|---|
Тема | Re: seeking advices for function |
Дата | |
Msg-id | 20110622235529.7d089dc8@anubis.defcon1 обсуждение исходный текст |
Ответ на | Re: seeking advices for function (Merlin Moncure <mmoncure@gmail.com>) |
Список | pgsql-novice |
On Wed, 22 Jun 2011 16:27:39 -0500, Merlin Moncure <mmoncure@gmail.com> wrote: ... > > why in the world do you need to create one view/user/table? that is > absolutely something you would want to avoid... No, I didn't meant one view/user/table; what I meant is, for example, that for some tables (that just need to be read alone, w/o joins) I'll juste have one function instead of Nb tables x view - furthermore, I can't use a view for some tables as I need to slice answers eg: suppose I've got 15,000 clients, I can't load the whole list at once; and AFAIK views can't do that. I also meant using this kind of function (extended of course) to retrieve joined rows. But even if I don't have a view per table, my application needs a bunch of them, which needs to be multiplied by the number of users profiles (eg: buyers can set purchase price & minimum profit margin up, but salers won't; so, for this example we already have 2 different views, which also means we must have 2 different schemas for these categories of users... and so on) Thing would be *much* easier if a 'SELECT *' returned only the columns on which user have the SELECT privilege - I guess SQL standard forbid that &| it is hard to implement. -- Necessity has no law. -- St. Augustine
В списке pgsql-novice по дате отправления: