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 BA5893A4EB5 for ; Fri, 7 Jan 2005 18:05:36 +0000 (GMT) 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 33373-02 for ; Fri, 7 Jan 2005 18:05:09 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 2CEB73A4F03 for ; Fri, 7 Jan 2005 18:05:07 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j07I510C044599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jan 2005 11:05:04 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j07I51fb090493; Fri, 7 Jan 2005 11:05:01 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j07I51NH090492; Fri, 7 Jan 2005 11:05:01 -0700 (MST) (envelope-from mfuhr) Date: Fri, 7 Jan 2005 11:05:01 -0700 From: Michael Fuhr To: santosh dwivedi Cc: pgsql-admin@postgresql.org Subject: Re: how to grant select on table using trigger Message-ID: <20050107180501.GA90377@winnie.fuhr.org> References: <20050107095001.GA81396@winnie.fuhr.org> <20050107103350.19567.qmail@web52103.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050107103350.19567.qmail@web52103.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/46 X-Sequence-Number: 15905 On Fri, Jan 07, 2005 at 02:33:50AM -0800, santosh dwivedi wrote: > i want to use trigger because my one of application connects to > databse and creates tables in database dynamically , other user > want to acces it . as when application creates table in databse it > does not GRANT select to other users. thats why i thought to grant > permission by trigger. Do you have control over how the application works? Is it possible to configure or modify the application to issue the appropriate GRANTs? > i know the newly created table name is listed in one Table called > queries. can you pls write sample code so that i can grant permission > on tables created by application I *did* show sample code. If it doesn't work for you then please provide more information, like any error messages that resulted. -- Michael Fuhr http://www.fuhr.org/~mfuhr/