GRANT a varias tablas al mismo tiempo

From: jsgarcia(at)seguridad(dot)unam(dot)mx
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: GRANT a varias tablas al mismo tiempo
Date: 2009-12-01 18:34:52
Message-ID: 20091201123452.xttunvcqgwscsk8o@correo.seguridad.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda pgsql-es-fomento

Hola muchachos, espero que todos estén muy bien.

Como esto de estar dando privilegios tabla por tabla resulta muy
tedioso cuando se necesita hacer un ALL PRIVILEGES sobre todas las
tablas de nuestra base, se me ha ocurrido hacer una query así:

GRANT ALL PRIVILEGES ON (SELECT viewname FROM pg_views WHERE
schemaname='public'
UNION
SELECT tablename FROM pg_tables WHERE schemaname='public'
UNION
SELECT relname FROM pg_statio_all_sequences WHERE schemaname='public')
TO prueba_permisos;

Quizá algunos ya se imaginen que no sirvió :(

Hay alguna forma de que esta query sí pueda servir? o más bien que se
construya una que haga lo que deseo?????

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Javier Fritz Alsite 2009-12-01 19:05:11 Tunning PGSQL
Previous Message Alvaro Herrera 2009-12-01 18:04:38 Re: PgDay Marzo-2010 Republica Dominicana

Browse pgsql-es-fomento by date

  From Date Subject
Next Message Fernando Hevia 2009-12-01 20:33:27 RE: GRANT a varias tablas al mismo tiempo
Previous Message Alvaro Herrera 2009-12-01 18:04:38 Re: PgDay Marzo-2010 Republica Dominicana