From: Peter Eisentraut Date: Fri, 11 Oct 2002 23:03:48 +0000 (+0000) Subject: Assorted reference page updates X-Git-Tag: REL7_3~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c086590380b0ea25dcb17a5f1a2599161e2c2a90;p=postgresql Assorted reference page updates --- diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml index 9ffcb2ac34..d5667fbf2a 100644 --- a/doc/src/sgml/ref/clusterdb.sgml +++ b/doc/src/sgml/ref/clusterdb.sgml @@ -1,5 +1,5 @@ @@ -33,8 +33,8 @@ PostgreSQL documentation Description - clusterdb is a utility for re-clustering tables - in a PostgreSQL database. It finds table(s) + clusterdb is a utility for reclustering tables + in a PostgreSQL database. It finds tables that have previously been clustered, and clusters them again on the same index that was last used. Tables that have never been clustered are not touched. @@ -67,12 +67,22 @@ PostgreSQL documentation Options - clusterdb accepts the following command line arguments: + clusterdb accepts the following command-line arguments: - - + + + + + Cluster all databases. + + + + + + + Specifies the name of the database to be clustered. @@ -86,11 +96,22 @@ PostgreSQL documentation - - + + - Cluster all databases. + Echo the commands that clusterdb generates + and sends to the server. + + + + + + + + + + Do not display a response. @@ -110,8 +131,8 @@ PostgreSQL documentation clusterdb also accepts - the following command line arguments for connection parameters: - + the following command-line arguments for connection parameters: + @@ -157,27 +178,6 @@ PostgreSQL documentation - - - - - - - Echo the commands that clusterdb generates - and sends to the server. - - - - - - - - - - Do not display a response. - - - @@ -250,7 +250,7 @@ PostgreSQL documentation foo in a database named xyzzy: -$ clusterdb --verbose --table foo xyzzy +$ clusterdb --table foo xyzzy diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 99d16855ba..e6256cc71b 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -1,5 +1,5 @@ @@ -59,46 +59,39 @@ PostgreSQL documentation Options - - - - - - - Specifies the host name of the machine on which the - server is running. If host begins with a slash, it is used - as the directory for the Unix domain socket. - - - + + createdb accepts the following command-line arguments: + - - + dbname - Specifies the Internet TCP/IP port or the local Unix domain socket file - extension on which the server is listening for connections. + Specifies the name of the database to be created. The name must be + unique among all PostgreSQL databases in this installation. + The default is to create a database with the same name as the + current system user. - - + description - User name to connect as + This optionally specifies a comment to be associated with the newly created + database. - - + + - Force password prompt. + Specifies the alternative location for the database. See also . @@ -115,11 +108,11 @@ PostgreSQL documentation - - + + - Do not display a response. + Specifies the character encoding scheme to be used in this database. @@ -135,12 +128,11 @@ PostgreSQL documentation - - + + - Specifies the alternative location for the database. See also . + Do not display a response. @@ -154,53 +146,68 @@ PostgreSQL documentation + + + + The options , , + , and + correspond to options of the underlying + SQL command ; see there for more information + about them. + + + + createdb also accepts the following + command-line arguments for connection parameters: + + - - + + - Specifies the character encoding scheme to be used in this database. + Specifies the host name of the machine on which the + server is running. If host begins with a slash, it is used + as the directory for the Unix domain socket. - dbname + + - Specifies the name of the database to be created. The name must be - unique among all PostgreSQL databases in this installation. - The default is to create a database with the same name as the - current system user. + Specifies the Internet TCP/IP port or the local Unix domain socket file + extension on which the server is listening for connections. - description + + - This optionally specifies a comment to be associated with the newly created - database. + User name to connect as + + + + + + Force password prompt. + + + - - - The options , , , - , and are passed on literally to - . - - The options , , - , and - are converted into options for the underlying - SQL command ; see there for more information - about them. + diff --git a/doc/src/sgml/ref/createlang.sgml b/doc/src/sgml/ref/createlang.sgml index febcaf72f3..cf26b08f41 100644 --- a/doc/src/sgml/ref/createlang.sgml +++ b/doc/src/sgml/ref/createlang.sgml @@ -1,5 +1,5 @@ @@ -46,7 +46,7 @@ PostgreSQL documentation createlang because it performs a number of checks and is much easier to use. See - for more. + for additional information. @@ -55,7 +55,7 @@ PostgreSQL documentation Options - createlang accepts the following command line arguments: + createlang accepts the following command-line arguments: @@ -69,8 +69,8 @@ PostgreSQL documentation - - + + Specifies to which database the language should be added. @@ -117,7 +117,7 @@ PostgreSQL documentation createlang also accepts - the following command line arguments for connection parameters: + the following command-line arguments for connection parameters: diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index 6197465d75..2db51f8fa5 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -1,5 +1,5 @@ @@ -33,7 +33,7 @@ PostgreSQL documentation the pg_shadow table) can create new PostgreSQL users, so createuser must be - invoked by someone who is a PostgreSQL + invoked by someone who can connect as a PostgreSQL superuser. @@ -62,92 +62,103 @@ PostgreSQL documentation Options + + createuser accepts the following command-line arguments: + - - + username - Specifies the host name of the machine on which the - server - is running. If host begins with a slash, it is used - as the directory for the Unix domain socket. + Specifies the name of the PostgreSQL user to be created. + This name must be unique among all PostgreSQL users. + + + + + + + + + + The new user is allowed to create other users. + (Note: Actually, this makes the new user a superuser. + The option is poorly named.) - - + + - Specifies the Internet TCP/IP port or local Unix domain socket file - extension on which the server - is listening for connections. + The new user is not allowed to create other users (i.e., + the new user is a regular user, not a superuser). - - + + - Echo the queries that createuser generates - and sends to the server. + The new user is allowed to create databases. - - + + - Do not display a response. + The new user is not allowed to create databases. - - + + - The new user is allowed to create databases. + Echo the queries that createuser generates + and sends to the server. - - + + - The new user is not allowed to create databases. + Encrypts the user's password stored in the database. If not + specified, the default is used. - - + + - The new user is allowed to create other users. - (Note: Actually, this makes the new user a superuser. - The option is poorly named.) + Allows you to pick a non-default user ID for the new user. This is not + necessary, but some people like it. - - + + - The new user is not allowed to create other users (i.e., - the new user is a regular user not a superuser). + Does not encrypt the user's password stored in the database. If + not specified, the default is used. @@ -165,60 +176,74 @@ PostgreSQL documentation - - + + - Allows you to pick a non-default user id for the new user. This is not - necessary, but some people like it. + Do not display a response. + + + + You will be prompted for a name and other missing information if it + is not specified on the command line. + + + + createuser also accepts the following + command-line arguments for connection parameters: + + - - + + - Encrypts the user's password stored in the database. If not - specified, the default is used. + Specifies the host name of the machine on which the + server + is running. If host begins with a slash, it is used + as the directory for the Unix domain socket. - - + + - Does not encrypt the user's password stored in the database. If - not specified, the default is used. + Specifies the Internet TCP/IP port or local Unix domain socket file + extension on which the server + is listening for connections. - username + + - Specifies the name of the PostgreSQL user to be created. - This name must be unique among all PostgreSQL users. + User name to connect as (not the user name to create) - - + - - You will be prompted for a name and other missing information if it is not - specified on the command line. - - - - The options -h, -p, and -e, - are passed on literally to . The - psql options -U and -W - are available as well, but their use can be confusing in this context. - + + + + + + Force password prompt (to connect to the server, not for the + password of the new user). + + + + + diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index 574c0b9883..191f5e5be4 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -1,5 +1,5 @@ @@ -50,102 +50,107 @@ PostgreSQL documentation - Options + Options + + + dropdb accepts the following command-line arguments: - - + dbname - Specifies the host name of the machine on which the - server - is running. If host begins with a slash, it is used - as the directory for the Unix domain socket. + Specifies the name of the database to be removed. The database + must be one of the existing PostgreSQL databases + in this installation. - - + + - Specifies the Internet TCP/IP port or local Unix domain socket file - extension on which the server - is listening for connections. + Echo the queries that dropdb generates + and sends to the server. - - + + - User name to connect as + Issues a verification prompt before doing anything destructive. - - + + - Force password prompt. + Do not display a response. + + + + + createdb also accepts the following + command-line arguments for connection parameters: + - - + + - Echo the queries that dropdb generates - and sends to the server. + Specifies the host name of the machine on which the + server + is running. If host begins with a slash, it is used + as the directory for the Unix domain socket. - - + + - Do not display a response. + Specifies the Internet TCP/IP port or local Unix domain socket file + extension on which the server + is listening for connections. - - + + - Issues a verification prompt before doing anything destructive. + User name to connect as - dbname + + - Specifies the name of the database to be removed. The database - must be one of the existing PostgreSQL databases - in this installation. + Force password prompt. - - - - The options -h, -p, -U, - -W, and -e are passed on literally to - . - + + diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index b533c3a22a..03489318a4 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -1,5 +1,5 @@ @@ -54,39 +54,38 @@ PostgreSQL documentation Options + + dropuser accepts the following command-line arguments: + - - + username - Specifies the host name of the machine on which the - server - is running. If host begins with a slash, it is used - as the directory for the Unix domain socket. + Specifies the name of the PostgreSQL user to be removed. + This name must exist in the PostgreSQL installation. + You will be prompted for a name if none is specified on the command line. - - + + - Specifies the Internet TCP/IP port or local Unix domain socket file - extension on which the server - is listening for connections. + Echo the queries that dropuser generates + and sends to the server. - - + + - Echo the queries that dropuser generates - and sends to the server. + Prompt for confirmation before actually removing the user. @@ -100,35 +99,61 @@ PostgreSQL documentation + + + + createuser also accepts the following + command-line arguments for connection parameters: + + - - + + - Prompt for confirmation before actually removing the user. + Specifies the host name of the machine on which the + server + is running. If host begins with a slash, it is used + as the directory for the Unix domain socket. - username + + - Specifies the name of the PostgreSQL user to be removed. - This name must exist in the PostgreSQL installation. - You will be prompted for a name if none is specified on the command line. + Specifies the Internet TCP/IP port or local Unix domain socket file + extension on which the server + is listening for connections. - - - The options -h, -p, and -e, - are passed on literally to . The - psql options -U and -W - are available as well, but they can be confusing in this context. - + + + + + + User name to connect as (not the user name to drop) + + + + + + + + + + Force password prompt (to connect to the server, not for the + password of the user to be dropped). + + + + + diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index f42295dc6f..b6565d0f2f 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -1,5 +1,5 @@ @@ -18,32 +18,12 @@ PostgreSQL documentation initdb - - --pgdata - -D - directory - - - --username - -U - username - - --pwprompt-W - - --encoding - -E - encoding - - --locale locale - --lc-collate locale - --lc-ctype locale - --lc-messages locale - --lc-monetary locale - --lc-numeric locale - --lc-time locale - -L directory - --noclean-n - --debug-d + options + + --pgdata + -D + directory + @@ -107,15 +87,16 @@ PostgreSQL documentation su to become the database user, and finally run initdb as the database user. + - - Options + + Options - + This option specifies the directory where the database system @@ -130,37 +111,8 @@ PostgreSQL documentation - - - - - Selects the user name of the database superuser. This defaults - to the name of the effective user running - initdb. It is really not important what the - superuser's name is, but one might choose to keep the - customary name postgres, even if the operating - system user's name is different. - - - - - - - - - - Makes initdb prompt for a password - to give the database superuser. If you don't plan on using password - authentication, this is not important. Otherwise you won't be - able to use password authentication until you have a password - set up. - - - - - - + Selects the encoding of the template database. This will also @@ -198,13 +150,56 @@ PostgreSQL documentation - + + + + + + + Selects the user name of the database superuser. This defaults + to the name of the effective user running + initdb. It is really not important what the + superuser's name is, but one might choose to keep the + customary name postgres, even if the operating + system user's name is different. + + + + + + + + + + Makes initdb prompt for a password + to give the database superuser. If you don't plan on using password + authentication, this is not important. Otherwise you won't be + able to use password authentication until you have a password + set up. + + + + Other, less commonly used, parameters are also available: + + + + + + Print debugging output from the bootstrap backend and a few other + messages of lesser interest for the general public. + The bootstrap backend is the program initdb + uses to create the catalog tables. This option generates a tremendous + amount of extremely boring output. + + + + @@ -230,25 +225,9 @@ PostgreSQL documentation - - - - - - - Print debugging output from the bootstrap backend and a few other - messages of lesser interest for the general public. - The bootstrap backend is the program initdb - uses to create the catalog tables. This option generates a tremendous - amount of extremely boring output. - - - - - diff --git a/doc/src/sgml/ref/initlocation.sgml b/doc/src/sgml/ref/initlocation.sgml index e37e0a40e1..b89acd8838 100644 --- a/doc/src/sgml/ref/initlocation.sgml +++ b/doc/src/sgml/ref/initlocation.sgml @@ -1,5 +1,5 @@ @@ -41,7 +41,6 @@ PostgreSQL documentation Examples - To create a database in an alternate location, using an environment variable: @@ -56,9 +55,7 @@ PostgreSQL documentation $ createdb -D PGDATA2 testdb - - Alternatively, if you allow absolute paths you could write: @@ -66,7 +63,6 @@ PostgreSQL documentation $ createdb -D /opt/postgres/data/testdb testdb - diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml index b7f1a42014..222058b7fc 100644 --- a/doc/src/sgml/ref/pg_config-ref.sgml +++ b/doc/src/sgml/ref/pg_config-ref.sgml @@ -1,4 +1,4 @@ - + @@ -60,7 +60,7 @@ - Print the location of C and C++ header files of the client interfaces. + Print the location of C header files of the client interfaces. @@ -69,7 +69,7 @@ - Print the location of C and C++ header files for server + Print the location of C header files for server programming. diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml index 6659ac914c..1c5c842513 100644 --- a/doc/src/sgml/ref/pg_ctl-ref.sgml +++ b/doc/src/sgml/ref/pg_ctl-ref.sgml @@ -1,5 +1,5 @@ @@ -125,10 +125,12 @@ PostgreSQL documentation and if so displays the PID and the command line options that were used to invoke it. + - - Options - + + Options + + @@ -224,7 +226,6 @@ PostgreSQL documentation - diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index ae1bb7b4ea..ea4d0d6ea8 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1,5 +1,5 @@ @@ -21,27 +21,7 @@ PostgreSQL documentation pg_dump - -a -s - -b - -c - -C - -d -D - -f file - -F format - -i - -o - -O - -R - -S - -t table - -v - -x - -X keyword - -Z 0...9 - -h host - -p port - -U username - -W + options dbname @@ -53,42 +33,41 @@ PostgreSQL documentation - pg_dump is a utility for saving a + pg_dump is a utility for saving a PostgreSQL database into a script or an archive file. The script files are in plain-text format and contain the SQL commands required to reconstruct the database to - the state it was in at the time it was saved. They can be used to + the state it was in at the time it was saved. To restore these + scripts, use . They can be used to reconstruct the database even on other machines and other - architectures, with some modifications even on other RDBMS - products. Furthermore, there are alternative archive file formats that - are meant to be - used with to rebuild the database, - and they also allow pg_restore to be selective - about what is restored, or even to reorder the items prior to being - restored. The archive files are also designed to be portable across + architectures, with some modifications even on other SQL database + products. + + + + Furthermore, there are alternative archive file formats + that are meant to be used with to + rebuild the database, and they also allow + pg_restore to be selective about what is + restored, or even to reorder the items prior to being restored. The + archive files are also designed to be portable across architectures. - pg_dump will save the information necessary to + pg_dump will save the information necessary to re-generate all user-defined types, functions, tables, indexes, aggregates, and operators. In addition, all the data is copied out in text format so that it can be readily copied in again, as well as imported into tools for editing. - - pg_dump - is useful for dumping out the contents of a database to move from one - PostgreSQL installation to another. - - When used with one of the archive file formats and combined with - , pg_dump provides a + pg_restore, pg_dump provides a flexible archival and - transfer mechanism. pg_dump can be used to - backup an entire database, then pg_restore can + transfer mechanism. pg_dump can be used to + backup an entire database, then pg_restore can be used to examine the archive and/or select which parts of the database are to be restored. The most flexible output file format is the custom @@ -107,8 +86,8 @@ PostgreSQL documentation - pg_dump makes consistent backups even if the - database is being used concurrently. pg_dump + pg_dump makes consistent backups even if the + database is being used concurrently. pg_dump does not block other users accessing the database (readers or writers). @@ -202,7 +181,7 @@ PostgreSQL documentation Dump data as INSERT commands (rather than COPY). This will make restoration very - slow, but it makes the archives more portable to other RDBMS + slow, but it makes the archives more portable to other SQL database packages. @@ -258,7 +237,7 @@ PostgreSQL documentation Output a tar archive suitable for input into - pg_restore. Using this archive format + pg_restore. Using this archive format allows reordering and/or exclusion of schema elements at the time the database is restored. It is also possible to limit which data is reloaded at restore time. @@ -271,7 +250,7 @@ PostgreSQL documentation Output a custom archive suitable for input into - pg_restore. This is the most flexible + pg_restore. This is the most flexible format in that it allows reordering of data load as well as schema elements. This format is also compressed by default. @@ -324,8 +303,8 @@ PostgreSQL documentation Do not output commands to set the object ownership to match the original database. Typically, - pg_dump issues - (psql-specific) \connect + pg_dump issues + (psql-specific) \connect statements to set ownership of schema elements. See also under and . Note that @@ -347,13 +326,13 @@ PostgreSQL documentation - Prohibit pg_dump + Prohibit pg_dump from outputting a script that would require reconnections to the database while being restored. An average restoration script usually has to reconnect several times as different users to set the original ownerships of the objects. This option is a rather blunt instrument because it makes - pg_dump lose this ownership information, + pg_dump lose this ownership information, unless you use the option. @@ -435,13 +414,13 @@ PostgreSQL documentation Normally, if a (plain-text mode) script generated by - pg_dump must alter the current database + pg_dump must alter the current database user (e.g., to set correct object ownerships), it uses the - \connect command. + psql \connect command. This command actually opens a new connection, which might require manual interaction (e.g., passwords). If you use the option, then - pg_dump will instead output pg_dump will instead output commands. This has the same effect, but it requires that the user restoring the database from the generated script be a database superuser. @@ -452,7 +431,7 @@ PostgreSQL documentation Since is a standard SQL command, whereas \connect only - works in , this option also enhances + works in psql, this option also enhances the theoretical portability of the output script. @@ -470,7 +449,7 @@ PostgreSQL documentation This option is only relevant when creating a data-only dump. - It instructs pg_dump to include commands + It instructs pg_dump to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you @@ -591,22 +570,21 @@ PostgreSQL documentation - + Connection to database 'template1' failed. connectDBStart() -- connect() failed: No such file or directory Is the postmaster running locally and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'? - + - pg_dump could not attach to the - postmaster - process on the specified host and port. If you see this message, - ensure that the postmaster + pg_dump could not attach to the + PostgreSQL server on the specified host and port. If you see this message, + ensure that the server is running on the proper host and that you have specified the proper port. @@ -617,9 +595,9 @@ connectDBStart() -- connect() failed: No such file or directory - pg_dump internally executes + pg_dump internally executes SELECT statements. If you have problems running - pg_dump, + pg_dump, make sure you are able to select information from the database using, for example, . @@ -632,23 +610,23 @@ connectDBStart() -- connect() failed: No such file or directory If your installation has any local additions to the template1 database, - be careful to restore the output of pg_dump into a + be careful to restore the output of pg_dump into a truly empty database; otherwise you are likely to get errors due to duplicate definitions of the added objects. To make an empty database without any local additions, copy from template0 not template1, for example: -CREATE DATABASE foo WITH TEMPLATE = template0; +CREATE DATABASE foo WITH TEMPLATE template0; - pg_dump has a few limitations: + pg_dump has a few limitations: - When dumping a single table or as plain text, pg_dump + When dumping a single table or as plain text, pg_dump does not handle large objects. Large objects must be dumped in their entirety using one of the binary archive formats. @@ -656,7 +634,7 @@ CREATE DATABASE foo WITH TEMPLATE = template0; - When doing a data only dump, pg_dump emits queries + When doing a data only dump, pg_dump emits queries to disable triggers on user tables before inserting the data and queries to re-enable them after the data has been inserted. If the restore is stopped in the middle, the system catalogs may be left in the wrong state. @@ -717,7 +695,7 @@ CREATE DATABASE foo WITH TEMPLATE = template0; History - The pg_dump utility first appeared in + The pg_dump utility first appeared in Postgres95 release 0.02. The non-plain-text output formats were introduced in PostgreSQL release 7.1. diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index 7f5432fc7a..c380bb499e 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -1,4 +1,4 @@ - + @@ -22,43 +22,16 @@ pg_restore - -a - -c - -C - -d dbname - -f output-file - -F format - -i - -I index - -l - -L contents-file - -N -o -r - -O - -P function-name(argtype [, ...]) - -R - -s - -S - -t table - -T trigger - -v - -x - -X keyword - -h host - -p port - -U username - -W - archive-file + options - - Description - + Description - pg_restore is a utility for restoring a + pg_restore is a utility for restoring a PostgreSQL database from an archive created by in one of the non-plain-text formats. It @@ -69,36 +42,35 @@ The archive files contain information for - pg_restore to rebuild the database, but also - allow pg_restore to be selective about what is + pg_restore to rebuild the database, but also + allow pg_restore to be selective about what is restored, or even to reorder the items prior to being restored. The archive files are designed to be portable across architectures. - pg_restore can operate in two modes: If a + pg_restore can operate in two modes: If a database name is specified, the archive is restored directly into the database. Otherwise, a script containing the SQL commands necessary to rebuild the database is created (and written to a file or standard output), similar to the ones created by the - pg_dump plain text format. Some of the options + pg_dump plain text format. Some of the options controlling the script output are therefore analogous to - pg_dump options. + pg_dump options. - Obviously, pg_restore cannot restore information + Obviously, pg_restore cannot restore information that is not present in the archive file; for instance, if the archive was made using the dump data as INSERTs option, - pg_restore will not be able to load the data + pg_restore will not be able to load the data using COPY statements. + - - - Options - + + Options pg_restore accepts the following command @@ -140,11 +112,11 @@ - Create the database before restoring into it. - (When this switch appears, the database named with - is used only - to issue the initial CREATE DATABASE command. All data is restored - into the database name that appears in the archive.) + Create the database before restoring into it. (When this + switch appears, the database named with is + used only to issue the initial CREATE DATABASE + command. All data is restored into the database name that + appears in the archive.) @@ -154,8 +126,10 @@ - Connect to database dbname and restore - directly into the database. Large objects can only be restored by using a direct database connection. + Connect to database dbname and restore directly + into the database. Large objects can only be restored by using + a direct database connection. @@ -166,7 +140,8 @@ Specify output file for generated script, or for the listing - when used with . Default is the standard output. + when used with . Default is the standard + output. @@ -176,20 +151,21 @@ - Specify format of the archive. - It is not necessary to specify the format, since pg_restore will - determine the format automatically. If specified, it can be one of the following: + Specify format of the archive. It is not necessary to specify + the format, since pg_restore will + determine the format automatically. If specified, it can be + one of the following: - t - Archive is a tar archive. Using this archive format allows reordering and/or - exclusion of schema elements at the time the database is restored. It is also possible to limit which - data is reloaded at restore time. + Archive is a tar archive. Using this + archive format allows reordering and/or exclusion of schema + elements at the time the database is restored. It is also + possible to limit which data is reloaded at restore time. @@ -198,15 +174,15 @@ c - Archive is in the custom format of pg_dump. This is the most flexible format - in that it allows reordering of data load as well as schema elements. - This format is also compressed by default. + Archive is in the custom format of + pg_dump. This is the most + flexible format in that it allows reordering of data load + as well as schema elements. This format is also compressed + by default. - - @@ -225,7 +201,8 @@ - Restore definition for named index only. + Restore definition for named index only. @@ -235,8 +212,9 @@ - List the contents of the archive. The output of this command can be used with the option - to restrict and reorder the items that are restored. + List the contents of the archive. The output of this command + can be used with the option to restrict + and reorder the items that are restored. @@ -246,8 +224,10 @@ - Restore elements in list-file only, and in the - order they appear in the file. Lines can be moved and may also be commented out by placing a ; at the + Restore elements in list-file only, and in the + order they appear in the file. Lines can be moved and may also + be commented out by placing a ; at the start of the line. @@ -258,8 +238,11 @@ - Restore items in the original dump order. By default pg_dump will dump items in an order convenient - to pg_dump, then save the archive in a modified OID order. This option overrides the OID ordering. + Restore items in the original dump order. By default + pg_dump will dump items in an order + convenient to pg_dump, then save the + archive in a modified OID order. This option overrides the OID + ordering. @@ -269,8 +252,11 @@ - Restore items in the OID order. By default pg_dump will dump items in an order convenient - to pg_dump, then save the archive in a modified OID order. This option enforces strict OID ordering. + Restore items in the OID order. By default + pg_dump will dump items in an order + convenient to pg_dump, then save the + archive in a modified OID order. This option enforces strict + OID ordering. @@ -280,8 +266,9 @@ - Prevent any attempt to restore original object ownership. Objects will be owned by the user name used - to attach to the database. + Prevent any attempt to restore original object + ownership. Objects will be owned by the user name used to + attach to the database. @@ -301,10 +288,13 @@ - Restore items in modified OID order. By default pg_dump will dump items in an order convenient - to pg_dump, then save the archive in a modified OID order. Most objects - will be restored in OID order, but some things (e.g., rules and indexes) will be restored at the end of - the process irrespective of their OIDs. This option is the default. + Restore items in modified OID order. By default + pg_dump will dump items in an order + convenient to pg_dump, then save the + archive in a modified OID order. Most objects will be restored + in OID order, but some things (e.g., rules and indexes) will + be restored at the end of the process irrespective of their + OIDs. This option is the default. @@ -314,18 +304,18 @@ - While restoring an archive, pg_restore + While restoring an archive, pg_restore typically has to reconnect to the database several times with different user names to set the correct ownership of the created objects. If this is undesirable (e.g., because manual interaction (passwords) would be necessary for each reconnection), this option prevents - pg_restore from issuing any reconnection + pg_restore from issuing any reconnection requests. (A connection request while in plain text mode, not connected to a database, is made by putting out a \connect command.) However, this option is a rather blunt instrument because it - makes pg_restore lose all object ownership + makes pg_restore lose all object ownership information, unless you use the option. @@ -404,7 +394,7 @@ ownerships), a new connection to the database must be opened, which might require manual interaction (e.g., passwords). If you use the option, - then pg_restore will instead use the pg_restore will instead use the command. This has the same effect, but it requires that the user restoring the archive is a database superuser. This option effectively @@ -419,7 +409,7 @@ This option is only relevant when performing a data-only restore. - It instructs pg_restore to execute commands + It instructs pg_restore to execute commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you @@ -431,7 +421,7 @@ must be done as superuser. So, you should also specify a superuser name with @@ -449,10 +439,9 @@ - Specifies the host name of the machine on which the - server - is running. If host begins with a slash, it is used - as the directory for the Unix domain socket. + Specifies the host name of the machine on which the server is + running. If host begins with a slash, it is used as the + directory for the Unix domain socket. @@ -462,11 +451,10 @@ - Specifies the Internet TCP/IP port or local Unix domain socket file - extension on which the server - is listening for connections. The port number defaults to 5432, - or the value of the PGPORT - environment variable (if set). + Specifies the Internet TCP/IP port or local Unix domain socket + file extension on which the server is listening for + connections. The port number defaults to 5432, or the value + of the PGPORT environment variable (if set). @@ -491,8 +479,6 @@ - - @@ -523,20 +509,20 @@ - + Connection to database 'template1' failed. connectDBStart() -- connect() failed: No such file or directory Is the postmaster running locally and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'? - + - pg_restore could not attach to the - postmaster + pg_restore could not attach to the + PostgreSQL server process on the specified host and port. If you see this message, ensure that the server is running on the proper host and that you have specified the proper @@ -549,40 +535,39 @@ connectDBStart() -- connect() failed: No such file or directory - When a direct database connection is specified using the -d option, pg_restore - internally executes SQL statements. If you have problems running - pg_restore, - make sure you are able to select information from the database using, for - example, psql. + When a direct database connection is specified using the -d + option, pg_restore internally executes + SQL statements. If you have problems running + pg_restore, make sure you are able to select + information from the database using, for example, + psql. - - Notes - + Notes - If your installation has any local additions to the template1 database, - be careful to load the output of pg_restore into a - truly empty database; otherwise you are likely to get errors due to - duplicate definitions of the added objects. To make an empty database - without any local additions, copy from template0 not template1, - for example: + If your installation has any local additions to the + template1 database, be careful to load the output of + pg_restore into a truly empty database; + otherwise you are likely to get errors due to duplicate definitions + of the added objects. To make an empty database without any local + additions, copy from template0 not template1, for example: CREATE DATABASE foo WITH TEMPLATE = template0; - The limitations of pg_restore are detailed below. + The limitations of pg_restore are detailed below. - When restoring data to a pre-existing table, pg_restore emits queries + When restoring data to a pre-existing table, pg_restore emits queries to disable triggers on user tables before inserting the data then emits queries to re-enable them after the data has been inserted. If the restore is stopped in the middle, the system catalogs may be left in the wrong state. @@ -591,7 +576,7 @@ CREATE DATABASE foo WITH TEMPLATE = template0; - pg_restore will not restore large objects for a single table. If + pg_restore will not restore large objects for a single table. If an archive contains large objects, then all large objects will be restored. @@ -600,16 +585,14 @@ CREATE DATABASE foo WITH TEMPLATE = template0; - See the documentation for details on - limitations of pg_dump. + See also the documentation for details on + limitations of pg_dump. - - Examples - + Examples To dump a database: @@ -701,7 +684,7 @@ CREATE DATABASE foo WITH TEMPLATE = template0; History - The pg_restore utility first appeared in + The pg_restore utility first appeared in PostgreSQL 7.1. diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index a242dcc863..ed9a24baba 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -1,5 +1,5 @@ @@ -101,15 +101,16 @@ PostgreSQL documentation When running a stand-alone backend, the session user will be set to - the user with id 1. This user does not actually have to exist, so + the user with ID 1. This user does not actually have to exist, so a stand-alone backend can be used to manually recover from certain kinds of accidental damage to the system catalogs. Implicit - superuser powers are granted to the user with id 1 in stand-alone + superuser powers are granted to the user with ID 1 in stand-alone mode. + - - Options + + Options When postgres is started by a postgres command-line options. - + General Purpose @@ -210,9 +211,9 @@ PostgreSQL documentation - + - + Options for stand-alone mode @@ -244,9 +245,9 @@ PostgreSQL documentation - + - + Semi-internal Options @@ -345,8 +346,7 @@ PostgreSQL documentation - - + diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index 51910ee1a1..fa2eec8312 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -1,5 +1,5 @@ @@ -72,9 +72,11 @@ PostgreSQL documentation communication ports (see below). A data area is created with . + + + + Options - - Options postmaster accepts the following command line arguments. For a detailed discussion of the options @@ -336,7 +338,6 @@ PostgreSQL documentation - @@ -580,6 +581,15 @@ StreamServerPort: cannot bind to port + + + See Also + + + , + + + @@ -43,12 +43,6 @@ PostgreSQL documentation Options - - If so configured, psql understands both - standard Unix short options, and GNU-style long - options. The latter are not available on all systems. - - @@ -452,6 +446,10 @@ PostgreSQL documentation + + + Long options are not available on all platforms. + diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 8fada3eac0..0eecf8f3c7 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -1,5 +1,5 @@ @@ -75,12 +75,12 @@ PostgreSQL documentation Options - vacuumdb accepts the following command line arguments: + vacuumdb accepts the following command-line arguments: - - + + Specifies the name of the database to be cleaned or analyzed. @@ -103,32 +103,34 @@ PostgreSQL documentation + - - + + - Perform full vacuuming. + Echo the commands that vacuumdb generates + and sends to the server. - - + + - Print detailed information during processing. + Perform full vacuuming. - - + + - Calculate statistics for use by the optimizer. + Do not display a response. @@ -151,12 +153,31 @@ PostgreSQL documentation + + + + + + Print detailed information during processing. + + + + + + + + + + Calculate statistics for use by the optimizer. + + + vacuumdb also accepts - the following command line arguments for connection parameters: + the following command-line arguments for connection parameters: @@ -203,27 +224,6 @@ PostgreSQL documentation - - - - - - - Echo the commands that vacuumdb generates - and sends to the server. - - - - - - - - - - Do not display a response. - - -