pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Roberts, Jon <Jon.Roberts@asurion.com>
Cc: 'Trevor Talbot' <quension@gmail.com>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: Bill Moran <wmoran@collaborativefusion.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: viewing source code
Date: Thu, 20 Dec 2007 15:29:52 -0300
Message-ID: <20071220182952.GB10849@alvh.no-ip.org> (raw)
In-Reply-To: <1A6E6D554222284AB25ABE3229A92762112A42@nrtexcus702.int.asurion.com>
References: <1A6E6D554222284AB25ABE3229A92762112A42@nrtexcus702.int.asurion.com>

Roberts, Jon escribió:
> So your suggestion is first to come up with a query that dynamically checks
> permissions and create a view for it.  Secondly, change pgAdmin to reference
> this view in place of pg_proc.  Actually, it should be extended to all
> objects in the database, not just pg_proc.  If you don't have this
> dictionary role, you shouldn't be able to look at any of the objects in the
> database unless you own the object or have been granted rights to the
> object.

Right.

Another thing that just occured to me was to rename pg_proc to something
else, and create the restricted view using the pg_proc name.  This
sounds dangerous in terms of internals, but actually the system catalogs
are invoked by OID not name, so maybe it will still work.

You do need to make sure that superusers continue to see all functions
though ... (the view test should really be "does the current user have
access to this function".)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



view thread (60+ messages)  latest in thread

Message-ID: <20071220182952.GB10849@alvh.no-ip.org>
Permalink:  ../20071220182952.GB10849@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20071220182952.GB10849@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, Jon.Roberts@asurion.com, quension@gmail.com, jd@commandprompt.com, books@ejurka.com, mmoncure@gmail.com, jonah.harris@gmail.com, wmoran@collaborativefusion.com
  Subject: Re: viewing source code
  In-Reply-To: <20071220182952.GB10849@alvh.no-ip.org>
  References: <1A6E6D554222284AB25ABE3229A92762112A42@nrtexcus702.int.asurion.com> <20071220182952.GB10849@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox