Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9B0A8632573 for ; Fri, 20 Aug 2010 13:29:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 53060-08 for ; Fri, 20 Aug 2010 16:29:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 58FB063243E for ; Fri, 20 Aug 2010 13:29:32 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 10185348034; Fri, 20 Aug 2010 09:29:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IxSWpneCLcX0; Fri, 20 Aug 2010 09:29:22 -0700 (PDT) Received: from [75.142.154.144] (unknown [75.142.154.144]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id D9082348002; Fri, 20 Aug 2010 09:29:21 -0700 (PDT) Subject: Re: Couple of admin Qs From: "Joshua D. Drake" Reply-To: jd@commandprompt.com To: Lou Picciano Cc: pgsql-admin In-Reply-To: <222302061.247711.1282308402600.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net> References: <222302061.247711.1282308402600.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net> Content-Type: text/plain; charset="UTF-8" Organization: Command Prompt, Inc. Date: Fri, 20 Aug 2010 09:28:59 -0700 Message-ID: <1282321739.9325.2.camel@jd-desktop.unknown.charter.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/141 X-Sequence-Number: 35390 On Fri, 2010-08-20 at 12:46 +0000, Lou Picciano wrote: > Pg Admins, > > > As many of you have done these things already (and yes, I have to dig > further into the docs...) > > > - Is there a privileges incantation which will limit a user's view, > within a given cluster, to only those databases to which he can > connect? Ie, he'd see only the 3 or 4 databases to which he has > privileges? Does the privileges model permit this level of > granularity? They will be able to see every database but they won't be able to connect unless you allow them, i.e; you can't stop them from executing select * from pg_database but you can't stop them from actually connecting to any of them. > - Can someone point to an example of how to 'trigger' an event when a > user logs on/off, or performs other non-data-touching actions, such as > connecting to another database? That is called logging. Just turn it on :D > Can't build a trigger on a function call, right? Has to be based on > a data change? A trigger is based on data modification, yes. Joshua D. Drake > > > Tks in advance - Lou -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt