On 2/14/14, 8:36 AM, Stephen Frost wrote:
> * Bruce Momjian (bruce@momjian.us) wrote:
>> In an ideal world we would have a tool where you could plug in a
>> username, database, IP address, and test pg_hba.conf file and it would
>> report what line is matched.
>
> That's not a bad idea, but we don't expose the logic that figures that
> out today.. It would, perhaps, not be horrible to duplicate it, but
> then we'd need to make sure that we update both places if it ever
> changes (not that it's changed much in oh-so-many-years). Perhaps
> another candidate to be a GSoC project.
Stupid question... is there a reason we couldn't use the same code for both?
BTW, I'm not sure that SQL would be the appropriate API for this testing; but presumably it wouldn't be hard to add
functionalityto the wire protocol to support the case of "hypothetically, if I were to attempt a connection that looks
likethis, what would happen?"
--
Jim C. Nasby, Data Architect jim@nasby.net
512.569.9461 (cell) http://jim.nasby.net