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: '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: Joshua D. Drake <jd@commandprompt.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: viewing source code
Date: Tue, 18 Dec 2007 15:52:23 -0300
Message-ID: <20071218185223.GD8088@alvh.no-ip.org> (raw)
In-Reply-To: <1A6E6D554222284AB25ABE3229A92762112A25@nrtexcus702.int.asurion.com>
References: <1A6E6D554222284AB25ABE3229A92762112A25@nrtexcus702.int.asurion.com>

Roberts, Jon escribió:
> So you are saying I need to create a view per user to achieve this?  That
> isn't practical for an enterprise level database.

No -- that would be quite impractical indeed.  I'm talking about
something like

revoke all privileges on pg_proc from public;
create view limited_pg_proc
as select * from pg_proc
where proowner = (select oid from pg_authid where rolname = current_user);
grant select on limited_pg_proc to public;

Of course, it is only a rough sketch.  It needs to be improved in a
number of ways.  But it shows that even with pure SQL the solution is
not far; with backend changes it is certainly doable (for example invent
a separate "view source" privilege for functions).

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



view thread (60+ messages)  latest in thread

Message-ID: <20071218185223.GD8088@alvh.no-ip.org>
Permalink:  ../20071218185223.GD8088@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20071218185223.GD8088@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, Jon.Roberts@asurion.com, books@ejurka.com, mmoncure@gmail.com, jonah.harris@gmail.com, wmoran@collaborativefusion.com, jd@commandprompt.com
  Subject: Re: viewing source code
  In-Reply-To: <20071218185223.GD8088@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