Summary
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.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_ident_file_mappings system view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
map_numberint4
Number of this map, in priority order, if valid, otherwise NULLfile_nametext
Name of the file containing this mapline_numberint4
Line number of this map in file_namemap_nametext
Name of the mapsys_nametext
Detected user name of the clientpg_usernametext
Requested PostgreSQL user nameerrortext
If not NULL, an error message indicating why this line could not be processed
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_ident_file_mappings.