Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGwvH-0002LU-LM for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2015 21:46:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGwvH-00007r-5y for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2015 21:46:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGwvF-00007l-RC for pgsql-hackers@postgresql.org; Thu, 29 Jan 2015 21:46:45 +0000 Received: from mail-bl2on0695.outbound.protection.outlook.com ([2a01:111:f400:fc09::695] helo=na01-bl2-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGwvA-00058z-Qc for pgsql-hackers@postgresql.org; Thu, 29 Jan 2015 21:46:44 +0000 Received: from decina.local (24.55.12.91) by DM2PR11MB0352.namprd11.prod.outlook.com (25.160.136.17) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 21:46:34 +0000 Message-ID: <54CAAA34.8090302@BlueTreble.com> Date: Thu, 29 Jan 2015 15:46:28 -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: , Tom Lane CC: Haribabu Kommi , Abhijit Menon-Sen , "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> <54C8156E.1080500@BlueTreble.com> <5661.1422473223@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [24.55.12.91] X-ClientProxiedBy: BN1PR08CA0029.namprd08.prod.outlook.com (10.242.217.157) To DM2PR11MB0352.namprd11.prod.outlook.com (25.160.136.17) 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:DM2PR11MB0352; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:DM2PR11MB0352; X-Forefront-PRVS: 0471B73328 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(377454003)(479174004)(24454002)(77156002)(87266999)(87976001)(62966003)(50986999)(65816999)(54356999)(50466002)(46102003)(64126003)(42186005)(36756003)(2950100001)(40100003)(83506001)(92566002)(15975445007)(80316001)(47776003)(33656002)(19580405001)(19580395003)(65806001)(65956001)(66066001)(23746002)(86362001)(122386002)(76176999)(85282002)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR11MB0352; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0352; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2015 21:46:34.0041 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0352 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/29/15 6:19 AM, Fabrízio de Royes Mello wrote: > On Wed, Jan 28, 2015 at 5:27 PM, Tom Lane > wrote: > > > > =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= > writes: > > > But I'm thinking about this patch and would not be interesting to have a > > > FDW to manipulate the hba file? Imagine if we are able to manipulate the > > > HBA file using INSERT/UPDATE/DELETE. > > > > Since the HBA file is fundamentally order-dependent, while SQL tables > > are fundamentally not, that doesn't seem like a great API match. You > > could probably brute-force something that would work, but it would very > > much be a case of using a hammer to solve a screwdriver problem. > > > > Maybe, but my intention is provide an easy way to edit HBA entries. With an extension or API to edit HBA entries many developers of PostgreSQL tools (ie. pgadmin, phppgadmin, etc) will be benefited. > > Perhaps a fdw can't be the best choice, maybe a complete new SQL syntax to manipulate HBA entries like we did with ALTER SYSTEM. It's just some thoughts about it. Aside from Tom's concern about sets not being a good way to handle this (which I agree with), the idea of "editing" pg_hba.conf via SQL raises all the problems that were brought up when ALTER SYSTEM was being developed. One of the big problems is a question of how you can safely modify a text file that's full of comments and what-not. You'd need to address those issues if you hope to modify pg_hba.conf via SQL. -- 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