Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
30.15. The Password File
Prev UpChapter 30. libpq - C LibraryHome Next

30.15. The Password File

The file.pgpass in a user's home directory or the file referenced byPGPASSFILE can contain passwords to be used if the connection requires a password (and no password has been specified otherwise). On Microsoft Windows the file is named%APPDATA%\postgresql\pgpass.conf (where%APPDATA% refers to the Application Data subdirectory in the user's profile).

This file should contain lines of the following format:

hostname:port:database:username:password

(You can add a reminder comment to the file by copying the line above and preceding it with#.) Each of the first four fields can be a literal value, or*, which matches anything. The password field from the first line that matches the current connection parameters will be used. (Therefore, put more-specific entries first when you are using wildcards.) If an entry needs to contain: or\, escape this character with\. A host name oflocalhost matches both TCP (host namelocalhost) and Unix domain socket (pghost empty or the default socket directory) connections coming from the local machine. In a standby server, a database name ofreplication matches streaming replication connections made to the master server. Thedatabase field is of limited usefulness because users have the same password for all databases in the same cluster.

On Unix systems, the permissions on.pgpass must disallow any access to world or group; achieve this by the commandchmod 0600 ~/.pgpass. If the permissions are less strict than this, the file will be ignored. On Microsoft Windows, it is assumed that the file is stored in a directory that is secure, so no special permissions check is made.


Prev Home Next
30.14. Environment Variables Up 30.16. The Connection Service File
pdfepub
Go to Postgres Pro Standard 9.6
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp