From: Jim C. Nasby <jnasby@pervasive.com>
To: AKHILESH GUPTA <akhilesh.davim@gmail.com>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] regarding grant option
Date: Wed, 1 Mar 2006 16:12:33 -0600
Message-ID: <20060301221233.GV82012@pervasive.com> (raw)
In-Reply-To: <20060301150016.GA6350@surnet.cl>
References: <ad39daf90602282020q7a65b072l20a119788dbe2db7@mail.gmail.com>
<20060301134902.GB4800@surnet.cl>
<ad39daf90603010628q5e303d83g4cf419606d8fa726@mail.gmail.com>
<20060301150016.GA6350@surnet.cl>
Though, it is pretty easy to do something like:
select 'GRANT ALL ON ' || table_name || ' TO public;' from
information_schema.tables where table_schema='blah';
You can feed the output of that to psql, ei:
psql -qc "select 'GRANT ALL ON ' || table_name || ' TO public;' from
information_schema.tables where table_schema='blah'" | psql
On Wed, Mar 01, 2006 at 12:00:16PM -0300, Alvaro Herrera wrote:
> AKHILESH GUPTA wrote:
> > thank you very much sir for your valuable suggestion,
> > but i am talking about direct database query...........!
>
> There is none that can help you here, short of making a function in
> PL/pgSQL or other language ...
>
> > On 3/1/06, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> > >
> > > AKHILESH GUPTA wrote:
> > >
> > > > here i have to grant permissions to that user individually for each and
> > > > every table by using:
> > > > :->> grant ALL ON <tab_name> to <user_name>;
> > > > GRANT
> > > > and all the permissions are granted to that user for that particular
> > > table.
> > >
> > > Yes. If you are annoyed by having to type too many commands, you can
> > > write a little shell script to do it for you.
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
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-sql@postgresql.org
Cc: jnasby@pervasive.com, akhilesh.davim@gmail.com, pgsql-general@postgresql.org
Subject: Re: [SQL] regarding grant option
In-Reply-To: <20060301221233.GV82012@pervasive.com>
* 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