56.10. pg_ident_file_mappings

В представлении pg_ident_file_mappings показывается сводное содержимое файла конфигурации, в котором описываются сопоставления имён пользователей, pg_ident.conf. Для каждой непустой и незакомментированной строки в этом файле данное представление содержит строку, дополняемую текстом ошибки, если сопоставление не может быть применено.

Это представление может быть полезно для проверки, будут ли работать планируемые изменения в файле конфигурации аутентификации, или для диагностики возникшей проблемы. Заметьте, что в этом представлении отражается текущее содержимое файла, а не то, что было загружено сервером в последний раз.

По умолчанию представление pg_ident_file_mappings могут читать только суперпользователи.

Таблица 56.10. Столбцы pg_ident_file_mappings

Тип столбца

Описание

line_number int4

Номер строки этого сопоставления в pg_ident.conf

map_name text

Имя сопоставления

sys_name text

Полученное имя пользователя клиента

pg_username text

Сопоставленное имя пользователя PostgreSQL

error text

Сообщение об ошибке, говорящее, почему эта строка не может быть обработана, либо NULL


Обычно строка, отражающая некорректную запись, будет содержать значения только в полях line_number и error.

Чтобы узнать больше о конфигурации аутентификации клиентов, обратитесь к Главе 20.

56.10. pg_ident_file_mappings

The view pg_ident_file_mappings provides a summary of the contents of the client user name mapping configuration file, pg_ident.conf. A row appears in this view for each non-empty, non-comment line in the file, with annotations indicating whether the map could be applied successfully.

This view can be helpful for checking whether planned changes in the authentication configuration file will work, or for diagnosing a previous failure. Note that this view reports on the current contents of the file, not on what was last loaded by the server.

By default, the pg_ident_file_mappings view can be read only by superusers.

Table 56.10. pg_ident_file_mappings Columns

Column Type

Description

line_number int4

Line number of this map in pg_ident.conf

map_name text

Name of the map

sys_name text

Detected user name of the client

pg_username text

Requested PostgreSQL user name

error text

If not NULL, an error message indicating why this line could not be processed


Usually, a row reflecting an incorrect entry will have values for only the line_number and error fields.

See Chapter 20 for more information about client authentication configuration.

FAQ