Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Vfx-0006fT-MR for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jun 2014 07:06:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X1Vfx-00035e-4Z for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jun 2014 07:06:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1Vfu-00032L-QD for pgsql-hackers@postgresql.org; Mon, 30 Jun 2014 07:06:50 +0000 Received: from raven.toroid.org ([178.63.84.200]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Vfr-0002Wp-KS for pgsql-hackers@postgresql.org; Mon, 30 Jun 2014 07:06:49 +0000 Received: by raven.toroid.org (Postfix, from userid 1000) id 66D4B240C689; Mon, 30 Jun 2014 09:06:46 +0200 (CEST) Date: Mon, 30 Jun 2014 12:36:46 +0530 From: Abhijit Menon-Sen To: pgsql-hackers@postgresql.org Cc: "Prabakaran, Vaishnavi" , Magnus Hagander , Jaime Casanova Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission Message-ID: <20140630070646.GY31357@toroid.org> References: <82897A1301080E4B8E461DDAA0FFCF14DDE1@SYD1216> <82897A1301080E4B8E461DDAA0FFCF14FD6E@SYD1216> <20140629165554.GA5984@toroid.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140629165554.GA5984@toroid.org> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org At 2014-06-29 22:25:54 +0530, ams@2ndQuadrant.com wrote: > > I think the really right thing to do would be to have two separate > columns, one with "all", "sameuser", "samerole", "replication", or > empty; and the other an array of database names. After sleeping on it, I realised that the code would return '{all}' for 'all' in pg_hba.conf, but '{"all"}' for '"all"'. So it's not exactly ambiguous, but I don't think it's especially useful for callers. I think having two columns would work. The columns could be called "database" and "database_list" and "user" and "user_list" respectively. The database column may contain one of "all", "sameuser", "samegroup", "replication", but if it's empty, database_list will contain an array of database names. Then ("all", {}) and ("", {all}) are easily separated. Likewise for user and user_list. I've marked this patch "returned with feedback" and moved it to the August CF after discussion with Vaishnavi. -- Abhijit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers