Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5AEE1632520 for ; Wed, 17 Jun 2009 11:15:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 67202-01 for ; Wed, 17 Jun 2009 11:15:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 247966344B9 for ; Wed, 17 Jun 2009 11:15:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n5HEF4dE025516; Wed, 17 Jun 2009 10:15:04 -0400 (EDT) To: Peter Eisentraut cc: pgsql-hackers@postgresql.org, Petr Jelinek Subject: Re: GRANT ON ALL IN schema In-reply-to: <200906171644.53717.peter_e@gmx.net> References: <4A37BF63.50008@pjmodos.net> <4A37E122.8070303@pjmodos.net> <4A38A956.8080600@pjmodos.net> <200906171644.53717.peter_e@gmx.net> Comments: In-reply-to Peter Eisentraut message dated "Wed, 17 Jun 2009 16:44:53 +0300" Date: Wed, 17 Jun 2009 10:15:04 -0400 Message-ID: <25515.1245248104@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.096 tagged_above=0 required=5 tests=AWL=0.096 X-Spam-Level: X-Archive-Number: 200906/1048 X-Sequence-Number: 140103 Peter Eisentraut writes: > I think you should design this with a bit wider scope. Instead of just "all > tables in this schema", think "all tables satisfying some condition". It has > been requested, for example, to be able to grant on all tables that match a > pattern. I'm against that. Functionality of that sort is available now if you really need it (write a plpgsql loop around an EXECUTE) and it's fairly hard to see a clean syntax that is significantly more general than "GRANT ON schema.*". In particular I strongly advise against getting into supporting user-defined predicates in GRANT. There are good reasons for not having utility statements evaluate random expressions. regards, tom lane