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

Oscar Estevez Lopez oestevez@prisacom.com
Tue, 12 Aug 2003 17:31:51 +0200


El Tue, 12 Aug 2003 10:53:03 -0400
Alvaro Herrera Munoz <alvherre@dcc.uchile.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[@]dcc.uchile.cl>)
> "El conflicto es el camino real hacia la union"
> _______________________________________________
> Pgsql-ayuda mailing list
> Pgsql-ayuda@tlali.iztacala.unam.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.  
============================================================================