Postgresql 中文操作指南

54.10. pg_ident_file_mappings #

pg_ident_file_mappings 视图可总结客户端用户名映射配置文件 pg_ident.conf 的内容。该视图将针对该文件中每行非空非注释行显示一行,并以注释指明该映射是否已成功应用。

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.

此视图有助于检查身份验证配置文件中的计划更改是否有效,或者诊断以前遇到的故障。请注意,此视图报告文件中的 current 内容,而不是服务器上次加载的内容。

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.

默认情况下,仅超级用户可以读取 pg_ident_file_mappings 视图。

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

Table 54.10. pg_ident_file_mappings Columns

Table 54.10. pg_ident_file_mappings Columns

Column Type

Description

map_number int4

Number of this map, in priority order, if valid, otherwise NULL

file_name text

Name of the file containing this map

line_number int4

Line number of this map in file_name

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

通常,反映错误输入的行将仅包含 line_numbererror 字段的值。

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

有关客户端认证配置的更多信息,请参见 Chapter 21

See Chapter 21 for more information about client authentication configuration.