On Thu, Mar 30, 2006 at 10:43:31AM -0500, Andrew Dunstan wrote:
> 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
You don't even need PL/Perl :)
SELECT * FROM (
s.t AS "Ordering",
), '\n'))[s.t] AS "Line"
) AS s(t)
) AS foo
"Line" !~ '^#'
"Line" !~ '^\s*$'
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Remember to vote!
In response to
pgsql-hackers by date
|Next:||From: Andrew Dunstan||Date: 2006-03-30 22:17:38|
|Subject: Re: Tru64/Alpha problems|
|Previous:||From: Robert Treat||Date: 2006-03-30 19:49:49|
|Subject: Re: control pg_hba.conf via SQL|