Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGEv8-0005ea-BU for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jan 2015 22:47:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGEv7-0001Xy-S8 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jan 2015 22:47:41 +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 1YGEv5-0001Wi-K1 for pgsql-hackers@postgresql.org; Tue, 27 Jan 2015 22:47:39 +0000 Received: from mail-bn1bon0605.outbound.protection.outlook.com ([2a01:111:f400:fc10::1:605] helo=na01-bn1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGEv1-0002y8-F1 for pgsql-hackers@postgresql.org; Tue, 27 Jan 2015 22:47:37 +0000 Received: from decina.local (70.115.158.166) by BN3PR11MB0340.namprd11.prod.outlook.com (25.161.220.22) with Microsoft SMTP Server (TLS) id 15.1.65.19; Tue, 27 Jan 2015 22:47:28 +0000 Message-ID: <54C8156E.1080500@BlueTreble.com> Date: Tue, 27 Jan 2015 16:47:10 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Haribabu Kommi , Abhijit Menon-Sen CC: "pgsql-hackers@postgresql.org" , "Prabakaran, Vaishnavi" , Magnus Hagander , Jaime Casanova Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission References: <82897A1301080E4B8E461DDAA0FFCF14DDE1@SYD1216> <82897A1301080E4B8E461DDAA0FFCF14FD6E@SYD1216> <20140629165554.GA5984@toroid.org> <20140630070646.GY31357@toroid.org> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.115.158.166] X-ClientProxiedBy: BY1PR00CA0016.namprd00.prod.outlook.com (25.160.102.26) To BN3PR11MB0340.namprd11.prod.outlook.com (25.161.220.22) Authentication-Results: 2ndquadrant.com; dkim=none (message not signed) header.d=none;2ndquadrant.com; dmarc=none action=none header.from=BlueTreble.com; X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005004);SRVR:BN3PR11MB0340; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BN3PR11MB0340; X-Forefront-PRVS: 046985391D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(51704005)(377454003)(51914003)(24454002)(479174004)(83506001)(86362001)(87976001)(50986999)(42186005)(93886004)(122386002)(62966003)(54356999)(87266999)(76176999)(77156002)(40100003)(2950100001)(33656002)(23676002)(50466002)(15975445007)(64126003)(47776003)(36756003)(66066001)(92566002)(65806001)(80316001)(46102003)(19580405001)(19580395003)(65956001)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR11MB0340; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN3PR11MB0340; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2015 22:47:28.2016 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR11MB0340 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 On 1/27/15 1:04 AM, Haribabu Kommi wrote: > On Mon, Jun 30, 2014 at 5:06 PM, Abhijit Menon-Sen wrote: >> 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. > > Thanks for the review. > > I corrected all the review comments except the one to add two columns > as (database, database_list and user, user_list). I feel this may cause > some confusion to the users. > > Here I attached the latest version of the patch. > I will add this patch to the next commitfest. Apologies if this was covered, but why isn't the IP address an inet instead of text? Also, what happens if someone reloads the config in the middle of running the SRF? ISTM it'd be better to do something like process all of parsed_hba_lines into a tuplestore. Obviously there's still a race condition there, but at least it's a lot smaller, and AFAIK no worse than the pg_stats views. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers