Re: seeking advices for function - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject Re: seeking advices for function
Date
Msg-id 20110622235529.7d089dc8@anubis.defcon1
Whole thread Raw
In response to Re: seeking advices for function  (Merlin Moncure <mmoncure@gmail.com>)
List 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 by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: seeking advices for function
Next
From: Joshua Tolley
Date:
Subject: Re: Database organization questions