X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1B9FF53874 for ; Wed, 27 Apr 2005 14:28:30 -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 49446-01 for ; Wed, 27 Apr 2005 17:28:20 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6754753833 for ; Wed, 27 Apr 2005 14:27:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3RHRU0B024261; Wed, 27 Apr 2005 13:27:31 -0400 (EDT) To: weigelt@metux.de Cc: pgsql-admin Subject: Re: security via views In-reply-to: <20050427155202.GA20043@nibiru.borg.metux.de> References: <20050427155202.GA20043@nibiru.borg.metux.de> Comments: In-reply-to Enrico Weigelt message dated "Wed, 27 Apr 2005 17:52:02 +0200" Date: Wed, 27 Apr 2005 13:27:30 -0400 Message-ID: <24260.1114622850@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/382 X-Sequence-Number: 17395 Enrico Weigelt writes: > Most of the database access works over views and functions. > For functions its possible to run them with separate privileges > than the calling user. But is this also possible with views ? > I've noticed that for views also GRANT is necessary (AFAIK a > view is nothing else than a table with appropriate RULEs). You have noticed incorrectly. A view's references to other tables are privilege-checked with respect to the owner of the view. regards, tom lane