Скачать в pdf «PostgreSQL»

The ident entry also takes an optional argument that specifies a special map name to map ident user names to database user names. The file data/pg_ident.conf records these mappings.


Local entries are configured on per-database hosts. A database entry of all applies to all databases. In data/pg_hba.eonf, the lines

local    all    trust

host    all trust

cause all local users to be trusted. The first line affects users connecting via Unix domain sockets; the second line controls local users connecting to the same machine by tcp/ip. The local machine is accessed as tcp/ip address {localhost}.

Both host and hostssl entries require the additional specification of host addresses and network masks. The lines

host    all    crypt

host    all    password

force all users from host and network to provide passwords. Crypt encrypts the passwords that are sent; password sends passwords over the network without encryption. The line

host    all    password    finance

is similar to the previous entries, except that it uses the user names/passwords stored in finance to authenticate users.

The lines

host    sales    ident

host    sales    ident support

use ident on the remote machine to verify the users connecting to database sales from the hosts and The second entry uses the support user name mapping in data/pg_-ident.conf.

Connections from hosts and networks not appearing in the file are rejected. For more information, see the file data/pg_hba.conf and the Administrator’s Guide discussed in Appendix

For database client applications, the environment variables PGHOST, PGPORT, PGUSER, PGPASS-word, pgdatestyle, pgtz, pgclientencoding, and pgdatabase are helpful for setting default connection parameters and options. The PostgreSQL documentation provides more information about them.

Скачать в pdf «PostgreSQL»