Hosting web - 616 CHAPTER 27 THE MANY POSTGRESQL CLIENTS

616 CHAPTER 27 THE MANY POSTGRESQL CLIENTS VERSION = ‘PostgreSQL 8.1.2 on i686-pc-linux-gnu, compiled by GCC gcc(GCC) 3.3.5 (Debian 1:3.3.5-8ubuntu2)’ AUTOCOMMIT = ‘on’ VERBOSITY = ‘default’ PROMPT1 = ‘%/%R%# ‘ PROMPT2 = ‘%/%R%# ‘ PROMPT3 = ‘>> ‘ DBNAME = ‘corporate’ USER = ‘websiteuser’ PORT = ‘5432′ ENCODING = ‘SQL_ASCII’ HISTFILE = ‘~/.psql_history’ HISTSIZE = ‘500′ Storing Configuration Information in a Startup File PostgreSQL users have two startup files at their disposal, both of which can be used to affect psql s behavior on the system-wide and user-specific levels, respectively. The system-wide psqlrcfile is located within PostgreSQL s etc/ directory on Linux and within %APPDATApostgresql on Windows, whereas the user-specific file is stored within the user s home directory and prefixed with a period (.), as is standard for configuration files of this sort. Note On Windows, the system-wide psqlrc file should use .conf as the extension. Also, to determine the location of %APPDATA%, open a command prompt and execute echo %APPDATA%. Further, on both Linux and Windows, you can create version-specific startup files by appending a dash and specific version number to psqlrc. For example, a system-wide startup file named psqlrc-8.1.0 will be read only when connecting to a PostgreSQL server running version 8.1.0. Both files support the same syntax, and anything stored in the system-wide file can also be stored in the user-specific version. However, keep in mind that if both files contain the same setting, anything found in the user-specific version will override the value declared in the system-wide version, because the user-specific version is read last. So what might one of these files look like? The following presents an example of what you might expect to find within a user s .psqlrc file: # Set the prompt set PROMPT1 ‘%n@%m::%`date +%H:%M:%S`> ‘ # Set the location of the history file set HISTFILE ~/pgsql/.psql_history
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply