Re: Granting read-only access to an existing database?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Eric Jain <eric(dot)jain(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Granting read-only access to an existing database?
Date: 2008-11-14 09:17:05
Message-ID: 491D4211.3000605@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Jain wrote:
>
> I came across some PL/pgSQL procedures for doing batch GRANTs, but
> they appear to be outdated (i.e. don't work with 8.3) and are "run at
> your own risk". There was also mention that pgAdmin had a function to
> batch GRANTs, but I couldn't find any such thing in the current
> version...

Must be pretty old if they don't work in 8.3. I've attached code for a
plpgsql exec_all function that matches table-names etc per schema.
Should be obvious enough how to wrap it for a grant_all or revoke_all
function. It assumes you've got a "util" schema to put it in.

--
Richard Huxton
Archonet Ltd

Attachment Content-Type Size
exec_all.sql text/x-sql 2.2 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-11-14 09:25:11 Re: Archive files growth!!!
Previous Message Martijn van Oosterhout 2008-11-14 09:02:22 Re: Tweaking PG (again)