From: | "Tim Bruce - Postgres" <postgres(at)tbruce(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "dipti shah" <shahdipti1980(at)gmail(dot)com>, "Richard Huxton" <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Questions on PostGreSQL Authentication mechanism... |
Date: | 2010-02-02 18:44:04 |
Message-ID: | e74dd1519e036e047e67bc2fa5523534.squirrel@sm.tbruce.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, February 2, 2010 08:23, Alvaro Herrera wrote:
> dipti shah escribió:
>> Techdb=# show hba_file;
>> hba_file
>> --------------------------------------
>> /etc/postgresql/8.4/main/pg_hba.conf
>> (1 row)
>>
>> Moreover, is there anyway to view content of this file from stored in
>> above
>> location "Techdb" command prompt itself.
>>
>> Techdb=# cat /etc/postgresql/8.4/main/pg_hba.conf;
>
> Probably pg_read_file():
>
> select pg_read_file('pg_hba.conf', 0, 8192);
>
> Note that pg_read_file only allows paths relative to $PGDATA, which is
> what you get from SHOW data_directory;
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
Since the pg_hba.conf file is located in the /etc path, the pg_read_file
command fails with an error of
"could not open file "pg_hba.conf" for reading: No such file or direcotry"
It also won't allow use of the absolute path.
The answer I found was to use the following command:
postgres=# \! exec cat /etc/postgresql/8.3/main/pg_hba.conf
Tim
--
Timothy J. Bruce
Registered Linux User #325725
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-02-02 19:09:35 | Re: Questions on PostGreSQL Authentication mechanism... |
Previous Message | Wang, Mary Y | 2010-02-02 17:56:10 | Startup proc 30595 exited with status 512 - abort and FATAL 2: XLogFlush |