Re: OOP real life example (was Re: Why is MySQL more chosen

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Daniel Lyons <fusion(at)nmt(dot)edu>
Subject: Re: OOP real life example (was Re: Why is MySQL more chosen
Date: 2002-08-12 06:38:21
Message-ID: 200208120838.21817.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am Montag, 12. August 2002 08:02 schrieb Don Baccus:
> Curt Sampson wrote:
> > On Sun, 11 Aug 2002, Don Baccus wrote:
> >>I've been wanting to point out that SQL views are really, when
> >>scrutinized, "just syntactic sugar" ...
> >
> > Oh? Ok, please translate the following into equivalant SQL that
> > does not use a view:
> >
> > CREATE TABLE t1 (key serial, value1 text, value2 text);
> > CREATE VIEW v1 AS SELECT key, value1 FROM t1;
> > GRANT SELECT ON v1 TO sorin;
>
> Granulize GRANT to the table column level. Then GRANT "SELECT" perms
> for the user on every column from the two tables that happen to be
> included in the view.
>
> Yes, it's awkward. So are the VIEW-based replacements for PG's type
> extensibility features.

But this is not a replacement for a view, isn't it? With a view I can do this:
create view v1 as select name, salary from workers where type <> 'MANAGEMENT';

with column permissions I must give access to all workers salary including the management, but not with a view.

best regards,
mario weilguni

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-08-12 06:52:09 Re: OOP real life example (was Re: Why is MySQL more chosen
Previous Message Tom Lane 2002-08-12 06:35:17 Re: Interesting message about printf()'s in PostgreSQL