Re: [Pgsql-ayuda] Uso de GRANT para toda las tablas

From: Oscar Estevez Lopez <oestevez(at)prisacom(dot)com>
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [Pgsql-ayuda] Uso de GRANT para toda las tablas
Date: 2003-08-12 15:31:51
Message-ID: 20030812173151.6be58771.oestevez@prisacom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El Tue, 12 Aug 2003 10:53:03 -0400
Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl> escribio:

> On Tue, Aug 12, 2003 at 10:30:26AM -0400, Edwin Quijada wrote:
> > He leido sobre GRANT pero no se como puedo darle permisos para todas las
> > tablas de mi base de datos.
> > Esto se puede?
> > O tengo que ir tabla por tabla para darle los permisos necesarios??
>
> Una por una... pero usa un script! Por algo estas en *nix y no en
> Windows.
>

o... suponiendo que, p.ej, las tablas son del usuario 'pepito':
SELECT 'GRANT ALL ON ' || tablename || ' TO pepito;' FROM pg_tables WHERE tableowner = 'pepito';

y luego copy-paste ;)

> --
> Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
> "El conflicto es el camino real hacia la union"
> _______________________________________________
> Pgsql-ayuda mailing list
> Pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
> http://tlali.iztacala.unam.mx/mailman/listinfo/pgsql-ayuda

--

________________________________________________________
One ping to rule them all, one ping to find them,
one ping to bring them all and in the darkness bind them.
(Lord of the windows)

============================================================================
This e-mail message and any attached files are intended SOLELY for the addressee/s identified herein. It may contain CONFIDENTIAL and/or LEGALLY PRIVILEGED information and may not necessarily represent the opinion of this company. If you receive this message in ERROR, please immediately notify the sender and DELETE it since you ARE NOT AUTHORIZED to use, disclose, distribute, print or copy all or part of the contained information. Thank you.
============================================================================

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message sandrigo lezcano 2003-08-12 15:39:56 [Pgsql-ayuda] return new, return old, trigger
Previous Message Alvaro Herrera Munoz 2003-08-12 14:53:03 Re: [Pgsql-ayuda] Uso de GRANT para toda las tablas