Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id ED71663390D for ; Wed, 5 Aug 2009 16:21:59 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28843-10 for ; Wed, 5 Aug 2009 19:21:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f220.google.com (mail-fx0-f220.google.com [209.85.220.220]) by mail.postgresql.org (Postfix) with ESMTP id 4AAD663306B for ; Wed, 5 Aug 2009 16:21:49 -0300 (ADT) Received: by fxm20 with SMTP id 20so321251fxm.24 for ; Wed, 05 Aug 2009 12:21:47 -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=gkgJXF0l6Obxu+tewvleBrpyxHUBYQhMwS4cT5RsxvU=; b=EkPl1VA24YN3g54yzLgHsNFSqJCLxcvAaSI/wUJ/a6DmFh64pTeMU/tn0x1MIqN/hy wjMWyiJMdCfrX1+7sKCMyVbCGrDR5NdbVXwWfxBUWTkT/FjWr9D1kJnV9w8cMPV2CVu2 MYD5Ryx5ndhR9V3A3s6912ch2neb6I5Nf2TBQ= 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=Rq99R6tey/8APJVwRXSVzXXIwL1sHyxfj6Rxv/XYcgUtEJGhj4QuyS0YJL8dA3HBSh dyO+McjS33M6RHkyANt/pH0YTgaFWa60PsmMFt66ezsDveTEW+N5XBhiyjVXWZTgSMDU CC4wmiPoLHlhJ1WaH6Acpi5TfYM3M1qvDvazo= MIME-Version: 1.0 Received: by 10.223.112.6 with SMTP id u6mr559873fap.30.1249500107556; Wed, 05 Aug 2009 12:21:47 -0700 (PDT) In-Reply-To: <4A79D60D.1090900@agliodbs.com> References: <4A37BF63.50008@pjmodos.net> <4A37E122.8070303@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> Date: Wed, 5 Aug 2009 15:21:47 -0400 Message-ID: <603c8f070908051221u676e9d68ya42f5099aafb2e8e@mail.gmail.com> Subject: Re: GRANT ON ALL IN schema From: Robert Haas To: Josh Berkus Cc: Tom Lane , Petr Jelinek , PostgreSQL-development Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/350 X-Sequence-Number: 142993 On Wed, Aug 5, 2009 at 2:57 PM, Josh Berkus wrote: > Right now we have a situation where most web developers aren't using > ROLEs *at all* because they are too complex for them to bother with. =A0I > literally couldn't count the number of production applications I've run > across which connect to Postgres as the superuser. =A0We need a I have one database that is set up with a reporting user (read only on everything). It requires constant maintenance. Every 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. I finally crontabbed a script that fixes it every 20 minutes. I 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. The DefaultACL stuff is another important step in the right direction. Documenting how to use PL/pgsql to do this stuff is an EXCELLENT idea, but it's not a complete substitute for providing some usable SQL-level facilities. ...Robert