X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 27C23528BD for ; Mon, 20 Jun 2005 20:22:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75259-04 for ; Mon, 20 Jun 2005 23:22:14 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 09B65528B2 for ; Mon, 20 Jun 2005 20:22:13 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j5KNMB47074577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Jun 2005 17:22:15 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j5KNMAT7027920; Mon, 20 Jun 2005 17:22:10 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j5KNMAGr027919; Mon, 20 Jun 2005 17:22:10 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 20 Jun 2005 17:22:09 -0600 From: Michael Fuhr To: Teunis Peters Cc: pgsql-interfaces@postgresql.org Subject: Re: users, address record restrictions Message-ID: <20050620232209.GA27784@winnie.fuhr.org> References: <70756f4668fbcef8a75a240af4bb3d7d@wintersgift.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70756f4668fbcef8a75a240af4bb3d7d@wintersgift.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/56 X-Sequence-Number: 5624 On Mon, Jun 20, 2005 at 11:51:11AM -0700, Teunis Peters wrote: > > I've got an interesting problem - this MIGHT (probably) isn't the right > forum for this. pgsql-general is usually a good place if you're not sure where a question belongs. This doesn't sound much like an interfaces problem. > however - I'd like to restrict access to specific records and groups of > records (based on another table) - and I'm not even sure where to start > looking. By "access" do you mean SELECT only, or also INSERT, UPDATE, and/or DELETE? One possibility might be to use a view with a WHERE clause that does the restriction. You'd revoke all privileges from the underlying tables and grant whatever privileges people need on the view, possibly adding rules to rewrite INSERT, UPDATE, and DELETE operations. -- Michael Fuhr http://www.fuhr.org/~mfuhr/