Re: OOP real life example (was Re: Why is MySQL more chosen
Don Baccus <dhogaza@pacifier.com>
From: Don Baccus <dhogaza@pacifier.com>
To: Curt Sampson <cjs@cynic.net>
Cc: Daniel Lyons <fusion@nmt.edu>, pgsql-hackers@postgresql.org
Date: 2002-08-12T06:02:48Z
Lists: pgsql-hackers
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. -- Don Baccus Portland, OR http://donb.photo.net, http://birdnotes.net, http://openacs.org