Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 02910633AF9 for ; Wed, 5 Aug 2009 17:05:01 -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 68200-04 for ; Wed, 5 Aug 2009 20:04:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.210.180]) by mail.postgresql.org (Postfix) with ESMTP id D9B1B632840 for ; Wed, 5 Aug 2009 17:04:50 -0300 (ADT) Received: by yxe10 with SMTP id 10so419286yxe.15 for ; Wed, 05 Aug 2009 13:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=j2Bp3rMkSJQ0k5xw89gskmrcn8w1IU7zEINznFFhY0M=; b=kByS4NPsejSaYUyOs/YJmKSejoTRN+JoBQAo9TWmRqbTPkGLLpzvntNwYPxwZqsSMC JalpQusWBvOsjq+YRn2yaOGdECpY6xmMhryYn/pYaesnxPlZqyyslH40RxIMdjzFxC10 c9UNjrIGQ4qTwqLlNDp+96OAPaggzT1RfTI6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=D73fk3Bslu9yHjUD26zgT2CZdQ1uMoy+gbsHObGDdUt4nlQ5BnILvFCTrixNcLhLor FI+YiWPvZ09qSzDhqd58TDgLcYfdT7W548lOEwoArHy4AdW7RWF/d5pt0dZYnR4YBBKk APtcPO2DdfHu5qWw77v/LzAoDUU0XBdFB/wNY= MIME-Version: 1.0 Received: by 10.150.140.9 with SMTP id n9mr15043372ybd.234.1249502690026; Wed, 05 Aug 2009 13:04:50 -0700 (PDT) In-Reply-To: <28123.1249501226@sss.pgh.pa.us> References: <4A37BF63.50008@pjmodos.net> <4A38A956.8080600@pjmodos.net> <4A4DE104.8090605@pjmodos.net> <4A6059B4.5010004@pjmodos.net> <4A607997.3030305@pjmodos.net> <21542.1249492707@sss.pgh.pa.us> <4A79D60D.1090900@agliodbs.com> <603c8f070908051221u676e9d68ya42f5099aafb2e8e@mail.gmail.com> <28123.1249501226@sss.pgh.pa.us> Date: Wed, 5 Aug 2009 22:04:49 +0200 Message-ID: <162867790908051304v45240d7aub0e4bccb6a6c8a1b@mail.gmail.com> Subject: Re: GRANT ON ALL IN schema From: Pavel Stehule To: Tom Lane Cc: Robert Haas , Josh Berkus , Petr Jelinek , PostgreSQL-development Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.364 tagged_above=-10 required=5 tests=AWL=1.235, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/359 X-Sequence-Number: 143002 2009/8/5 Tom Lane : > Robert Haas writes: >> I have one database that is set up with a reporting user (read only on >> everything). =C2=A0It requires constant maintenance. =C2=A0Every time an= object >> is added or deleted (or dropped and recreated, like a view, which I do >> ALL THE TIME to work around the inability to add/remove columns) the >> permissions get shot to hell. =C2=A0I finally crontabbed a script that >> fixes it every 20 minutes. =C2=A0I had another database where I tried to= do >> some real permission separation and it was just a huge pain in the >> ass. > >> Grant on all isn't gonna fix these problems completely, but it's a >> start. =C2=A0The DefaultACL stuff is another important step in the right >> direction. > > Seems like default ACLs, not grant-on-all, is what you want for that. > > The idea of better support for plpgsql-driven granting isn't going > to compete with default ACLs, but it does compete with grant-on-all. > So that's why I'm thinking we ought to take a harder look at that > before adding nonstandard extensions to GRANT. > > Josh's position that "this should be standard SQL" is nonsense, or > at least he ought to be making that argument to the standards committee > not us. =C2=A0It *isn't* standard, and therefore it's up to us to decide = how > we want to expose the facility. =C2=A0What's more, syntax extensions to G= RANT > are a pretty risky way to do it: what if the SQL committee sees the > light and SQL:201x includes a GRANT extension, only it conflicts with > ours? > > If we want something built-in, maybe providing some prefab plpgsql > functions is the way to go. =C2=A0But we'd have to arrive at a consensus > on what best practice of that form looks like. There are some people, that dislike stored procedures :(. Probably lot of MySQL users. For them are procedures devil still. I would to like some base maintenance library in plpgsql. But it's need plpgsql installed in core by default. Pavel > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0regards, tom lane > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers >