PostgreSQL 8.4 grant DML privileges on all tables to a role

前端 未结 5 783
情书的邮戳
情书的邮戳 2020-12-06 17:44

How do I go about granting DML (SELECT,INSERT,UPDATE,DELETE) on all tables in a schema in PostgreSQL 8.4? I\'d also like this grant to persist for new table creation in the

5条回答
  •  鱼传尺愫
    2020-12-06 18:16

    I believe you can't do that. But you can use the information schema to generate the grants so you don't have to manually do it for 10,000 tables. See the link below for a relative example and the site linked to easy very good for info.

    http://www.postgresonline.com/journal/archives/30-DML-to-generate-DDL-and-DCL-Making-structural-and-Permission-changes-to-multiple-tables.html

提交回复
热议问题