Re: control pg_hba.conf via SQL - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: control pg_hba.conf via SQL
Date
Msg-id 442BFCA3.2090700@dunslane.net
Whole thread Raw
In response to Re: control pg_hba.conf via SQL  ("A.M." <agentm@themactionfaction.com>)
Responses Re: control pg_hba.conf via SQL
List pgsql-hackers
A.M. wrote:
> Could postgres offer at least a read-only view of the data in the interim?
> Ordering could be controlled by line number.
>   

You can get the contents as a single text field like this:

|  select pg_read_file|('pg_hba.conf', 0, 50*1024);


Writing a plperl function that would strip comments and blank lines and 
return the rest as a numbered set of lines would be fairly trivial.


cheers

andrew


pgsql-hackers by date:

Previous
From: "A.M."
Date:
Subject: Re: control pg_hba.conf via SQL
Next
From: Tony Caduto
Date:
Subject: Re: control pg_hba.conf via SQL