Re: grant select on database demo to user - Mailing list pgsql-sql

From Thusitha Kodikara
Subject Re: grant select on database demo to user
Date
Msg-id 20060503040757.4998.qmail@web30413.mail.mud.yahoo.com
Whole thread Raw
In response to grant select on database demo to user  (Bryce Nesbitt <bryce1@obviously.com>)
List pgsql-sql
Hi,<br /><br />You could easily generate a script with the list of tables and the required grant information and then
runit to give the necessary grants. (The list of tables may be obtained by querying tables in 'information_schema')<br
/><br/>Regards,<br />-Thusitha<br /><br /><div class="MsoPlainText">-----Original Message-----<br /> From:
pgsql-sql-owner@postgresql.org[mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Bryce Nesbitt<br /> Sent: Wednesday,
May03, 2006 9:03 AM<br /> To: pgsql-sql@postgresql.org<br /> Subject: [SQL] grant select on database demo to
user</div><divclass="MsoPlainText"> </div><div class="MsoPlainText">I find myself with long lists of tables</div><div
class="MsoPlainText"> </div><divclass="MsoPlainText"><span style="">  </span>grant select on xx_tax to user;</div><div
class="MsoPlainText"><spanstyle="">  </span>grant select on xx_trip to user;</div><div class="MsoPlainText"><span
style=""> </span>grant select on xx_foo to user;</div><div class="MsoPlainText"> </div><div class="MsoPlainText">Is
therea way to grant to all tables, with a single grant?<span style="">  </span>I know how</div><div
class="MsoPlainText">todo it in mysql, but not postgres.<span style="">  </span>As close as I get it:</div><div
class="MsoPlainText"> </div><divclass="MsoPlainText">#grant select on database demo to user</div><div
class="MsoPlainText">ERROR:<spanstyle="">  </span>invalid privilege type SELECT for database</div><div
class="MsoPlainText"> </div><divclass="MsoPlainText">-- </div><div class="MsoPlainText">----</div><div
class="MsoPlainText">Visithttp://www.obviously.com/</div><div class="MsoPlainText"> </div><div
class="MsoPlainText"> </div><divclass="MsoPlainText"> </div><div class="MsoPlainText">---------------------------(end
ofbroadcast)---------------------------</div><div class="MsoPlainText">TIP 9: In versions below 8.0, the planner will
ignoreyour desire to</div><div class="MsoPlainText"><span style="">       </span>choose an index scan if your joining
column'sdatatypes do not</div><div class="MsoPlainText"><span style="">       </span>match</div><div
class="MsoPlainText"> </div><divclass="MsoPlainText"> </div><div class="MsoPlainText">-- </div> 

pgsql-sql by date:

Previous
From: Bryce Nesbitt
Date:
Subject: grant select on database demo to user
Next
From: "Ben K."
Date:
Subject: Re: Sorting aggregate column contents