From d55f8781933d76fec931e865315009635f4d1018 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 11 Nov 2000 23:01:45 +0000 Subject: [PATCH] Markup enhancements, some factual corrections. --- doc/src/sgml/ref/createdb.sgml | 101 +++++++-------- doc/src/sgml/ref/createlang.sgml | 65 +++++----- doc/src/sgml/ref/createuser.sgml | 98 +++++++------- doc/src/sgml/ref/drop_database.sgml | 4 +- doc/src/sgml/ref/dropdb.sgml | 94 +++++++------- doc/src/sgml/ref/droplang.sgml | 64 +++++----- doc/src/sgml/ref/dropuser.sgml | 93 ++++++-------- doc/src/sgml/ref/initdb.sgml | 191 ++++++++++++++-------------- doc/src/sgml/ref/initlocation.sgml | 127 +++++++----------- doc/src/sgml/ref/ipcclean.sgml | 61 +++------ doc/src/sgml/ref/pg_config-ref.sgml | 28 ++-- doc/src/sgml/ref/vacuumdb.sgml | 108 ++++++++-------- 12 files changed, 466 insertions(+), 568 deletions(-) diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 0bdddc0144..3d1aca17bb 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -1,35 +1,33 @@ + + 2000-11-11 + + - - createdb - + createdb + 1 Application + - - createdb - - - Create a new Postgres database - + createdb + Create a new Postgres database + - - 1999-11-07 - - -createdb [ options ] dbname [ description ] - + + createdb + options + dbname + description + - - 1999-11-07 - Inputs @@ -99,9 +97,8 @@ createdb [ options ] -D, --location datadir - Specifies the alternate database location for this database installation. - This is the location of the installation system tables, not the location - of this specific database, which may be different. + Specifies the alternative database location. See also . @@ -146,9 +143,6 @@ createdb [ options ] - - 1999-11-07 - Outputs @@ -189,9 +183,6 @@ createdb [ options ] - - 1999-11-07 - Description @@ -215,36 +206,34 @@ createdb [ options ] - - 1999-11-07 - - - Usage - - - To create the database demo - using the default database server: + Usage - -$ createdb demo -CREATE DATABASE - + + + To create the database demo using the default + database server: + +$ createdb demo +CREATE DATABASE + + The response is the same as you would have gotten from running the + CREATE DATABASE SQL command. + + - The response is the same as you would have gotten from running the - CREATE DATABASE SQL command. - - - - To create the database demo - using the postmaster on host eden, port 5000, using the LATIN1 - encoding scheme with a look at the underlying query: - - -$ createdb -p 5000 -h eden -E LATIN1 -e demo -CREATE DATABASE "demo" WITH ENCODING = 'LATIN1' -CREATE DATABASE - - + + + To create the database demo using the + postmaster on host eden, port 5000, using the + LATIN1 encoding scheme with a look at the + underlying query: + +$ createdb -p 5000 -h eden -E LATIN1 -e demo +CREATE DATABASE "demo" WITH ENCODING = 'LATIN1' +CREATE DATABASE + + + diff --git a/doc/src/sgml/ref/createlang.sgml b/doc/src/sgml/ref/createlang.sgml index 28acbd585e..f7c0540eac 100644 --- a/doc/src/sgml/ref/createlang.sgml +++ b/doc/src/sgml/ref/createlang.sgml @@ -1,31 +1,36 @@ + + 2000-11-11 + + - - createlang - + createlang + 1 Application + - - createlang - - - Add a new programming language to a Postgres database - + createlang + Add a new programming language to a Postgres database + - - 1999-12-05 - - -createlang [ connection options ] [ langname [ dbname ] ] -createlang [ connection options ] --list|-l [ dbname ] - + + createlang + connection-options + langname + dbname + + createlang + connection-options + --list-l + dbname + @@ -119,9 +124,6 @@ createlang [ <replaceable class="parameter">connection options</replaceable> ] - </refsect2> <refsect2 id="R2-APP-CREATELANG-2"> - <refsect2info> - <date>1998-10-04</date> - </refsect2info> <title> Outputs @@ -136,9 +138,6 @@ createlang [ connection options ] - - - 1999-12-05 - Description @@ -171,15 +170,17 @@ createlang [ connection options ] - - - Usage - - - To install pltcl: - -$ createlang pltcl dbname - - + Usage + + + + To install pltcl into the database + template1: + +$ createlang pltcl template1 + + + diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index bcecbe1fa8..5f3db58159 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -1,36 +1,32 @@ + + 2000-11-11 + + - - createuser - + createuser + 1 Application - - - createuser - - - Create a new Postgres user - - - - - 1999-11-07 - - -createuser [ options ] [ username ] - + + createuser + Create a new Postgres user + + + + + createuser + options + username + - - 1999-11-07 - Inputs @@ -159,9 +155,6 @@ createuser [ options ] [ - - 1999-11-07 - Outputs @@ -195,9 +188,6 @@ createuser [ options ] [ - - 1998-11-07 - Description @@ -226,35 +216,33 @@ createuser [ options ] [ - - 1999-11-07 - - - Usage - - - To create a user joe - on the default database server: + Usage - -$ createuser joe -Is the new user allowed to create databases? (y/n) n -Shall the new user be allowed to create more new users? (y/n) n -CREATE USER - - + + + To create a user joe on the default database + server: + +$ createuser joe +Is the new user allowed to create databases? (y/n) n +Shall the new user be allowed to create more new users? (y/n) n +CREATE USER + + + - - To create the same user joe - using the postmaster on host eden, port 5000, avoiding - the prompts and taking a look at the underlying query: - - -$ createuser -p 5000 -h eden -D -A -e joe -CREATE USER "joe" NOCREATEDB NOCREATEUSER -CREATE USER - - + + + To create the same user joe using the + postmaster on host eden, port 5000, avoiding the prompts and + taking a look at the underlying query: + +$ createuser -p 5000 -h eden -D -A -e joe +CREATE USER "joe" NOCREATEDB NOCREATEUSER +CREATE USER + + + diff --git a/doc/src/sgml/ref/drop_database.sgml b/doc/src/sgml/ref/drop_database.sgml index 13007e9cb9..7f0d79f576 100644 --- a/doc/src/sgml/ref/drop_database.sgml +++ b/doc/src/sgml/ref/drop_database.sgml @@ -1,9 +1,9 @@ - + DROP DATABASE diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index b699f0b847..5e28c4d528 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -1,35 +1,32 @@ + + 2000-11-11 + + - - dropdb - + dropdb + 1 Application + - - dropdb - - - Remove an existing Postgres database - + dropdb + Remove an existing Postgres database + - - 1999-11-07 - - -dropdb [ options ] dbname - + + dropdb + options + dbname + - - 1999-11-07 - Inputs @@ -124,9 +121,6 @@ dropdb [ options ] - - 1998-10-02 - Outputs @@ -157,9 +151,6 @@ dropdb [ options ] - - 1998-10-02 - Description @@ -185,32 +176,33 @@ dropdb [ options ] - - 1999-11-07 - - - Usage - - - To destroy the database demo - on the default database server: - -$ dropdb demo -DROP DATABASE - - - - To destroy the database demo - using the postmaster on host eden, port 5000, with verification - and a peek at the underlying query: - -$ dropdb -p 5000 -h eden -i -e demo -Database "demo" will be permanently deleted. -Are you sure? (y/n) y -DROP DATABASE "demo" -DROP DATABASE - - + Usage + + + + To destroy the database demo on the default + database server: + +$ dropdb demo +DROP DATABASE + + + + + + + To destroy the database demo using the + postmaster on host eden, port 5000, with verification and a peek + at the underlying query: + +$ dropdb -p 5000 -h eden -i -e demo +Database "demo" will be permanently deleted. +Are you sure? (y/n) y +DROP DATABASE "demo" +DROP DATABASE + + + diff --git a/doc/src/sgml/ref/droplang.sgml b/doc/src/sgml/ref/droplang.sgml index a2ec00019d..48645d78a5 100644 --- a/doc/src/sgml/ref/droplang.sgml +++ b/doc/src/sgml/ref/droplang.sgml @@ -1,31 +1,36 @@ + + 2000-11-11 + + - - droplang - + droplang + 1 Application + - - droplang - - - Remove a programming language from a Postgres database - + droplang + Remove a programming language from a Postgres database + - - 1999-12-05 - - -droplang [ connection options ] [ langname [ dbname ] ] -droplang [ connection options ] --list|-l - + + droplang + connection-options + langname + dbname + + droplang + connection-options + --list-l + dbname + @@ -119,9 +124,6 @@ droplang [ <replaceable class="parameter">connection options</replaceable> ] --l </refsect2> <refsect2 id="R2-APP-DROPLANG-2"> - <refsect2info> - <date>1999-12-05</date> - </refsect2info> <title> Outputs @@ -136,9 +138,6 @@ droplang [ connection options ] --l - - 1999-12-05 - Description @@ -172,15 +171,16 @@ droplang [ connection options ] --l - - Usage - - - To remove pltcl: - -$ droplang pltcl - - + Usage + + + + To remove pltcl: + +$ droplang pltcl + + + diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index 889fd5b9a3..b72c5d865f 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -1,35 +1,32 @@ + + 2000-11-11 + + - - dropuser - + dropuser + 1 Application + - - dropuser - - - Drops (removes) a Postgres user - + dropuser + Drops (removes) a Postgres user + - - 1999-11-07 - - -dropuser [ options ] [ username ] - + + dropuser + options + username + - - 1999-11-07 - Inputs @@ -108,9 +105,6 @@ dropuser [ options ] [ - - 1999-11-07 - Outputs @@ -145,9 +139,6 @@ dropuser [ options ] [ - - 1999-11-07 - Description @@ -176,33 +167,33 @@ dropuser [ options ] [ - - 1999-11-07 - - - Usage - - - To remove user joe - from the default database server: - -$ dropuser joe -DROP USER - - + Usage - - To remove user joe - using the postmaster on host eden, port 5000, with verification - and a peek at the underlying query: - -$ dropuser -p 5000 -h eden -i -e joe -User "joe" and any owned databases will be permanently deleted. -Are you sure? (y/n) y -DROP USER "joe" -DROP USER - - + + + To remove user joe from the default database + server: + +$ dropuser joe +DROP USER + + + + + + + To remove user joe using the postmaster on host + eden, port 5000, with verification and a peek at the underlying + query: + +$ dropuser -p 5000 -h eden -i -e joe +User "joe" and any owned databases will be permanently deleted. +Are you sure? (y/n) y +DROP USER "joe" +DROP USER + + + diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index 0c2204157d..18343d3b16 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -1,50 +1,97 @@ + + 2000-11-11 + + - - initdb - + initdb + 1 Application + - - initdb - - - Create a new Postgres database installation - + initdb + Create a new Postgres database cluster + - - 1999-12-17 - - -initdb [ --pgdata|-D dbdir ] - [ --sysid|-i sysid ] - [ --pwprompt|-W ] - [ --encoding|-E encoding ] - [ --pglib|-L libdir ] - [ --noclean | -n ] [ --debug | -d ] [ --template | -t ] - + + initdb + + --pgdata + -D + dbdir + + + --sysid + -i + sysid + + --pwprompt-W + + --encoding + -E + encoding + + -L directory + --noclean-n + --debug-d + --template-t + + + + + + Description + + + initdb creates a new + Postgres database cluster or system. A + database cluster is a collection of databases that are managed by a + single postmaster. + + + Creating a database system consists of creating the directories in which + the database data will live, generating the shared catalog tables + (tables that don't belong to any particular database), and + creating the template1 + database. When you create a new database, everything in the + template1 database is copied. + It contains catalog tables filled in for things like the + built-in types. + + + + You must not execute initdb as root. This is + because you cannot run the database server as root either, but the + server needs to have access to the files initdb + creates. Furthermore, during the initialization phase, when there are no + users and no access controls installed, Postgres + will only connect with + the name of the current Unix user, so you must log in under the account + that will own the server process. + + + + Although initdb will attempt to create the respective + data directory, chances are that it won't have the permission to do so. Thus + it is a good idea to create the data directory before running initdb + and to hand over the ownership of it to the database superuser. + + + + Options - - - 1999-11-17 - - - Inputs - - --pgdata=dbdir -D dbdir - PGDATA This option specifies where in the file system the database should be @@ -64,7 +111,7 @@ initdb [ --pgdata|-D dbdir ] Selects the system id of the database superuser. This defaults to the effective user id of the user running initdb. It is really not important what the superuser's sysid is, but one might choose - to start the numbering at some number like 0 or 1. + to start the numbering at some number like 1. @@ -104,18 +151,13 @@ initdb [ --pgdata|-D dbdir ] - --pglib=libdir - -l libdir + -L directory - initdb needs a few input files to initialize the database. This option - tells where to find them. You normally don't have to worry about this - since initdb knows about the most common installation layouts and will - find the files itself. You will be told if you need to specify their - location explicitly. If that happens, one of the files is called - global1.bki.source and is traditionally installed - along with the others in the library directory (e.g., - /usr/local/pgsql/lib). + Specifies where initdb should find its input files to + initialize the database system. This is normally not + necessary. You will be told if you need to specify their + location explicitly. @@ -174,65 +216,16 @@ initdb [ --pgdata|-D dbdir ] - - - - 1999-12-17 - - - Outputs - - - initdb will create files in the specified - data area which are the system tables and framework for a complete - installation. - - - - - - - 1999-12-17 - - - Description - - - initdb creates a new - Postgres database system. - A database system is a - collection of databases that are all administered by the same Unix user - and managed by a single postmaster. - - - Creating a database system consists of creating the directories in which - the database data will live, generating the shared catalog tables - (tables that don't belong to any particular database), and - creating the template1 - database. When you create a new database, everything in the - template1 database is copied. - It contains catalog tables filled in for things like the - built-in types. - - - - You must not execute initdb as root. This is - because you cannot run the database server as root either, but the - server needs to have access to the files initdb - creates. Furthermore, during the initialization phase, when there are no - users and no access controls installed, Postgres - will only connect with - the name of the current Unix user, so you must log in under the account - that will own the server process. - - - - Although initdb will attempt to create the respective - data directory, chances are that it won't have the permission to do so. Thus - it is a good idea to create the data directory before running initdb - and to hand over the ownership of it to the database superuser. - + + + See also + + + PostgreSQL Administrator's Guide + + + + + 2000-11-11 + + - - initlocation - + initlocation + 1 Application + - - initlocation - - - Create a secondary Postgres database storage area - + initlocation + Create a secondary Postgres database storage area + - - 2000-01-17 - - -initlocation directory - - - - - 1998-10-02 - - - Inputs - - - - - - directory - - - Where in your Unix filesystem do you want alternate databases to go? - - - - - - - - - - - 1998-09-26 - - - Outputs - - - initlocation will create directories in - the specified place. - - + + initlocation + directory + - - 1998-09-26 - - - Description - + Description initlocation creates a new Postgres secondary database storage area. @@ -85,33 +43,34 @@ initlocation directory - - 1998-09-26 - - - Usage - - - To create a database in an alternate location, using an environment variable: - -$ export PGDATA2=/opt/postgres/data - -Start and stop postmaster so it sees the $PGDATA2 environment variable. -The system must be configured so the postmaster sees $PGDATA2 every time it -starts. - -$ initlocation PGDATA2 -$ createdb -D 'PGDATA2' 'testdb' - - + Usage - - Alternatively, if you allow absolute paths you could write: - -$ initlocation /opt/postgres/data -$ createdb -D '/opt/postgres/data/testdb' testdb - - + + + To create a database in an alternate location, using an + environment variable: + +$ export PGDATA2=/opt/postgres/data + + Stop and start postmaster so it sees the PGDATA2 + environment variable. The system must be configured so the + postmaster sees PGDATA2 every time it starts. Finally: + +$ initlocation PGDATA2 +$ createdb -D PGDATA2 testdb + + + + + + + Alternatively, if you allow absolute paths you could write: + +$ initlocation /opt/postgres/data +$ createdb -D /opt/postgres/data/testdb testdb + + + diff --git a/doc/src/sgml/ref/ipcclean.sgml b/doc/src/sgml/ref/ipcclean.sgml index 22e94a85de..006bf50ac0 100644 --- a/doc/src/sgml/ref/ipcclean.sgml +++ b/doc/src/sgml/ref/ipcclean.sgml @@ -1,63 +1,32 @@ + + 2000-11-11 + + - - ipcclean - + ipcclean + 1 Application + - - ipcclean - - - Clean up shared memory and semaphores from aborted backends - + ipcclean + Clean up shared memory and semaphores from aborted backends + - - 1999-07-20 - - -ipcclean - - - - - 1999-07-20 - - - Inputs - - - None. - - - - - - 1999-07-30 - - - Outputs - - - None. - - + + ipcclean + - - 1999-07-20 - - - Description - + Description ipcclean cleans up shared memory and semaphore space from aborted backends by diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml index d94bcc095f..defe2e1c02 100644 --- a/doc/src/sgml/ref/pg_config-ref.sgml +++ b/doc/src/sgml/ref/pg_config-ref.sgml @@ -1,20 +1,32 @@ - + + + 2000-11-11 + + - pg_config - Application + pg_config + 1 + Application - pg_config - Provides information about the installed version of PostgreSQL + pg_config + Provides information about the installed version of PostgreSQL - -pg_config --bindir | --includedir | --libdir | --configure | --version - + + pg_config + + --bindir + --includedir + --libdir + --configure + --version + + diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index f6aae0d949..1417ac55f9 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -1,37 +1,44 @@ + + 2000-11-11 + + - - vacuumdb - + vacuumdb + 1 Application + - - vacuumdb - - - Clean and analyze a Postgres database - + vacuumdb + Clean and analyze a Postgres database + - - 1999-12-04 - - -vacuumdb [ options ] [ --analyze | -z ] - [ --alldb | -a ] [ --verbose | -v ] - [ --table 'table [ ( column [,...] ) ]' ] [ [-d] dbname ] - + + vacuumdb + connection-options + -d dbname + --analyze-z + --verbose-v + + --table 'table + ( column [,...] )' + + + vacuumdb + connection-options + --all-a + --analyze-z + --verbose-v + - - 1999-12-04 - Inputs @@ -174,9 +181,6 @@ vacuumdb [ options ] [ --analyze | - - 1999-12-04 - Outputs @@ -213,9 +217,6 @@ vacuumdb [ options ] [ --analyze | - - 1999-12-04 - Description @@ -243,34 +244,37 @@ vacuumdb [ options ] [ --analyze | - - 1998-10-04 - - - Usage - + Usage - - To clean the database test: - -$ vacuumdb test - - + + + To clean the database test: + +$ vacuumdb test + + + - - To analyze a database named bigdb for the optimizer: - -$ vacuumdb --analyze bigdb - - + + + To analyze for the optimzer a database named + bigdb: + +$ vacuumdb --analyze bigdb + + + - - To analyze a single column bar in table foo - in a database named xyzzy for the optimizer: - -$ vacuumdb --analyze --verbose --table 'foo(bar)' xyzzy - - + + + To analyze a single column bar in table + foo in a database named + xyzzy for the optimizer: + +$ vacuumdb --analyze --verbose --table 'foo(bar)' xyzzy + + +