Re: Rules and views (was Re: [HACKERS] Rules: 2nd patch)

From: jwieck(at)debis(dot)com (Jan Wieck)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: jwieck(at)debis(dot)com, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Rules and views (was Re: [HACKERS] Rules: 2nd patch)
Date: 1998-08-19 19:54:32
Message-ID: m0z9EJW-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > If nobody votes against, I would like to make them builtins
> > as pg_get_ruledef() and pg_get_viewdef() and then setup the
> > appropriate views (pg_rule and pg_view) in template1 by
> > initdb like we do it with pg_user. It cannot break anything,
> > except that a rule action the two functions cannot handle
> > will make the new views unusable. But it would be a really
> > powerful possibility for pg_dump or just useful to see what
> > that damn event qual and parsetree's in pg_rewrite came from.
> >
> > Comments?
> >
>
> Go, Jan, go.

You'll get it after the currently running clean compile of
the initial source tree (with the patch applied) and the rest
went through.

>
> --
> Bruce Momjian | 830 Blythe Avenue

For the rule permissions:

I think it would be O.K. to check the rule actions against
the owner of their event relation. And the creator/destructor
must be the owner of it or a superuser. This way, a regular
user can do with rules anything he want's on the tables he
has access to and as soon as he grant's access to his tables
the granted user can use them as he would including the rule
actions.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-08-19 20:10:28 Patch adding pg_rule and pg_view
Previous Message Dr. Michael Meskes 1998-08-19 18:10:34 Re: [HACKERS] struct index