Skip site navigation (1) Skip section navigation (2)

Re: seeking advices for function

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: seeking advices for function
Date: 2011-06-22 21:55:29
Message-ID: 20110622235529.7d089dc8@anubis.defcon1 (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Wed, 22 Jun 2011 16:27:39 -0500, Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

pgsql-novice by date

Next:From: Joshua TolleyDate: 2011-06-25 00:15:41
Subject: Re: Database organization questions
Previous:From: Merlin MoncureDate: 2011-06-22 21:27:39
Subject: Re: seeking advices for function

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group