Re: Questions on PostGreSQL Authentication mechanism...

Поиск
Список
Период
Сортировка
От Tim Bruce - Postgres
Тема Re: Questions on PostGreSQL Authentication mechanism...
Дата
Msg-id e74dd1519e036e047e67bc2fa5523534.squirrel@sm.tbruce.com
обсуждение исходный текст
Ответ на Re: Questions on PostGreSQL Authentication mechanism...  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Questions on PostGreSQL Authentication mechanism...  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Questions on PostGreSQL Authentication mechanism...  (dipti shah <shahdipti1980@gmail.com>)
Список 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@postgresql.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Ivano Luberti
Дата:
Сообщение: Re: Unusual table size and very slow inserts
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Questions on PostGreSQL Authentication mechanism...