pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: fabriziomello@gmail.com
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Abhijit Menon-Sen <ams@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Prabakaran, Vaishnavi <vaishnavip@fast.au.fujitsu.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Jaime Casanova <jaime@2ndquadrant.com>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: Thu, 29 Jan 2015 15:46:28 -0600
Message-ID: <54CAAA34.8090302@BlueTreble.com> (raw)
In-Reply-To: <CAFcNs+qHV_qMUxT2ebduLetzRoagMg=7Z_zk1ivQQ5s1y-ZVeQ@mail.gmail.com>
References: <F40B0968DB0A904DA78A924E633BE78645FE29@SYDEXCHTMP2.au.fjanz.com>
	<CABUevEwzKy5JR8papHw5Amk=Ok6uddYtwQ+gJntmLdrx2wOgbA@mail.gmail.com>
	<82897A1301080E4B8E461DDAA0FFCF14DDE1@SYD1216>
	<82897A1301080E4B8E461DDAA0FFCF14FD6E@SYD1216>
	<20140629165554.GA5984@toroid.org>
	<20140630070646.GY31357@toroid.org>
	<CAJrrPGe3sZWKFfsHDCJMXfBOqkf6_w6R_DpsUYn2vQK_tVeU1g@mail.gmail.com>
	<54C8156E.1080500@BlueTreble.com>
	<CAJrrPGcFk9_svvipFJeLBrVJYOmq6uNy38NsT8jtfo6Bks5RYw@mail.gmail.com>
	<CAFcNs+oOYYd5k6oE_YyE=AsW2zR0DwvBdjK2PDLQiip53Y0CiA@mail.gmail.com>
	<5661.1422473223@sss.pgh.pa.us>
	<CAFcNs+qHV_qMUxT2ebduLetzRoagMg=7Z_zk1ivQQ5s1y-ZVeQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 1/29/15 6:19 AM, Fabrízio de Royes Mello wrote:
> On Wed, Jan 28, 2015 at 5:27 PM, Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:
>  >
>  > =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= <fabriziomello@gmail.com <mailto:fabriziomello@gmail.com>> 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



view thread (92+ messages)  latest in thread

Message-ID: <54CAAA34.8090302@BlueTreble.com>
Permalink:  ../54CAAA34.8090302@BlueTreble.com/
Also on:    postgresql.org/message-id/54CAAA34.8090302@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, fabriziomello@gmail.com, tgl@sss.pgh.pa.us, kommi.haribabu@gmail.com, ams@2ndquadrant.com, vaishnavip@fast.au.fujitsu.com, magnus@hagander.net, jaime@2ndquadrant.com
  Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
  In-Reply-To: <54CAAA34.8090302@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox