-
+
Documentation
+
+
+
Style Guide
+
+
+
Reference Pages
+
+ Reference pages should follow a standard layout. This allows
+ users to find the desired information more quickly, and it also
+ encourages writers to document all relevant aspects of a command.
+ Consistency is not only desired among
+
PostgreSQL reference pages, but also
+ with reference pages provided by the operating system and other
+ packages. Hence the following guidelines have been developed.
+ They are for the most part consistent with similar guidelines
+ established by various operating systems.
+
+
+ Reference pages that describe executable commands should contain
+ the following sections, in this order. Sections that do not apply
+ may be omitted. Additional top-level sections should only be used
+ in special circumstances; often that information belongs in the
+ Usage
section.
+
+
+
+ Name
+
+ This section is generated automatically. It contains the
+ command name and a half-sentence summary of its functionality.
+
+
+
+
+
+ Synopsis
+
+ This section contains the syntax diagram of the command. The
+ synopsis should normally not list each command-line option;
+ that is done below. Instead, list the major components of the
+ command line, such as where input and output files go.
+
+
+
+
+
+ Description
+
+ Several paragraphs explaining what the command does.
+
+
+
+
+
+ Options
+
+ A list describing each command-line option. If there are a
+ lot of options, subsections may be used.
+
+
+
+
+
+ Exit Status
+
+ If the program uses 0 for success and non-zero for failure,
+ then you don't need to document it. If there is a meaning
+ behind the different non-zero exit codes, list them here.
+
+
+
+
+
+ Usage
+
+ Describe any sublanguage or run-time interface of the program.
+ If the program is not interactive, this section can usually be
+ omitted. Otherwise, this section is a catch-all for
+ describing run-time features. Use subsections if appropriate.
+
+
+
+
+
+ Environment
+
+ List all environment variables that the program might use.
+ Try to be complete; even seemingly trivial variables like
+ SHELL might be of interest to the user.
+
+
+
+
+
+ Files
+
+ List any files that the program might access implicitly. That
+ is, do not list input and output files that were specified on
+ the command line, but list configuration files, etc.
+
+
+
+
+
+ Diagnostics
+
+ Explain any unusual output that the program might create.
+ Refrain from listing every possible error message. This is a
+ lot of work and has little use in practice. But if, say, the
+ error messages have a standard format that the user can parse,
+ this would be the place to explain it.
+
+
+
+
+
+ Notes
+
+ Anything that doesn't fit elsewhere, but in particular bugs,
+ implementation flaws, security considerations, compatibility
+ issues.
+
+
+
+
+
+ Examples
+
+ Examples
+
+
+
+
+
+ History
+
+ If there were some major milestones in the history of the
+ program, they might be listed here. Usually, this section can
+ be omitted.
+
+
+
+
+
+ See Also
+
+ Cross-references, listed in the following order: other
+
PostgreSQL command reference pages,
+
PostgreSQL SQL command reference
+ pages, citation of
PostgreSQL
+ manuals, other reference pages (e.g., operating system, other
+ packages), other documentation. Items in the same group are
+ listed alphabetically.
+
+
+
+
+
+
+
+ Reference pages describing SQL commands should contain the
+ following sections: Name, Synopsis, Description, Parameters,
+ Usage, Diagnostics, Notes, Examples, Compatibility, History, See
+ Also. The Parameters section is like the Options section, but
+ there is more freedom about which clauses of the command can be
+ listed. The Compatibility section should explain to what extent
+ this command conforms to the SQL standard(s), or to which other
+ database system it is compatible. The See Also section of SQL
+ commands should list SQL commands before cross-references to
+ programs.
+
+
+
+
+
-
-
- Inputs
-
+
+
+
+ Description
+
+
createdb creates a new
PostgreSQL
+ database.
+
+
+ Normally, the database user who executes this command becomes the owner of
+ the new database.
+ However a different owner can be specified via the
+ option, if the executing user has appropriate privileges.
+
+
+
createdb is a shell script wrapper around the
+ via
+ the
PostgreSQL interactive terminal
+ . Thus, there is nothing
+ special about creating databases via this or other methods. This means
+ that the
psql program must be found by the script and that
+ a database server must be running at the targeted port. Also, any default
+ settings and environment variables available to
psql
+ and the
libpq front-end library will apply.
+
+
+
+
+
+
Options
The options , , ,
, and are passed on literally to
.
endterm="SQL-CREATEDATABASE-title">; see there for more information
about them.
-
+
+
+
+
+
Diagnostics
-
-
- Outputs
-
CREATE DATABASE
If there is an error condition, the backend error message will be displayed.
See
and for possibilities.
-
-
+
-
-
- Description
-
-
createdb creates a new
PostgreSQL
- database.
-
- Normally, the database user who executes this command becomes the owner of
- the new database.
- However a different owner can be specified via the
- option, if the executing user has appropriate privileges.
-
+
+
Environment
-
createdb is a shell script wrapper around the
- via
- the
PostgreSQL interactive terminal
- . Thus, there is nothing
- special about creating databases via this or other methods. This means
- that the
psql program must be found by the script and that
- a database server must be running at the targeted port. Also, any default
- settings and environment variables available to
psql
- and the
libpq front-end library will apply.
-
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters. PGUSER also
+ determines the name of the database to create, if it is not
+ specified in the command line.
+
+
+
+
+
-
Usage
+
Examples
+
+
+
+
See Also
+
+
+
+
+
+
+
- id="createlang">createlang
+ createlang
define a new PostgreSQL procedural language
+
+
+
+
+
Description
+
+
createlang is a utility for adding a new
+ programming language to a
PostgreSQL database.
+
createlang can handle all the languages
+ supplied in the default
PostgreSQL> distribution, but
+ not languages provided by other parties.
+
+ Although backend programming languages can be added directly using
+ several
SQL commands, it is recommended to use
+
createlang because it performs a number
+ of checks and is much easier to use. See
+
+ for more.
+
+
+
+
+
+
Options
-
-
- Inputs
-
createlang accepts the following command line arguments:
-
+
+
+
+
+
Environment
+
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters.
+
+
+
+
+
+
+
+
+
Diagnostics
-
-
- Outputs
-
Most error messages are self-explanatory. If not, run
createlang with the
for details. Check also under
for more possibilities.
-
-
-
-
-
- Description
-
-
-
createlang is a utility for adding a new
- programming language to a
PostgreSQL database.
-
createlang can handle all the languages
- supplied in the default
PostgreSQL> distribution, but
- not languages provided by other parties.
-
- Although backend programming languages can be added directly using
- several
SQL commands, it is recommended to use
-
createlang because it performs a number
- of checks and is much easier to use. See
-
- for more.
-
-
- >
- Notes
-
+
+ >
+
Notes
+
Use to remove a language.
-
-
Usage
+
+
+
Examples
+
+
+
See Also
+
+
+
+
+
+
+
+
+
-
-
- Inputs
-
+
+
Description
+ Only superusers (users with usesuper set in
+ the pg_shadow table) can create
+ invoked by someone who is a
PostgreSQL
+ superuser.
+
+
+ Being a superuser also implies the ability to bypass access permission
+ checks within the database, so superuser-dom should not be granted lightly.
+
+
+
createuser is a shell script wrapper around the
+ via
+ the
PostgreSQL interactive terminal
+ . Thus, there is nothing
+ special about creating users via this or other methods. This means
+ that the
psql application must be found by the
+ script and that
+ a database server must be running at the targeted host. Also, any default
+ settings and environment variables used by
psql
+ and the
libpq front-end library will apply.
+
+
+
+
+
+
+
Options
You will be prompted for a name and other missing information if it is not
specified on the command line.
are available as well, but their use can be confusing in this context.
-
+
+
+
+
+
Environment
+
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters
+
+
+
+
+
+
+
+
+
Diagnostics
-
-
- Outputs
-
CREATE USER
If there is an error condition, the backend error message will be displayed.
See
and for possibilities.
-
-
-
-
-
- Description
-
- Only superusers (users with usesuper set in
- the pg_shadow table) can create
- invoked by someone who is a
PostgreSQL
- superuser.
-
-
- Being a superuser also implies the ability to bypass access permission
- checks within the database, so superuser-dom should not be granted lightly.
-
-
-
createuser is a shell script wrapper around the
- via
- the
PostgreSQL interactive terminal
- . Thus, there is nothing
- special about creating users via this or other methods. This means
- that the
psql application must be found by the
- script and that
- a database server must be running at the targeted host. Also, any default
- settings and environment variables used by
psql
- and the
libpq front-end library will apply.
-
-
- id="R1-APP-CREATEUSER-2">
-
Usage
+
+
Examples
+
+
+
See Also
+
+
+
+
+
+
+
+
-
-
- Inputs
-
+
+
+
Description
+
+
dropdb destroys an existing
+ The user who executes this command must be a database
+ superuser or the owner of the database.
+
+
+
dropdb is a shell script wrapper around the
+ via
+ the
PostgreSQL interactive terminal
+ . Thus, there is nothing
+ special about dropping databases via this or other methods. This means
+ that the
psql must be found by the script and that
+ a database server is running at the targeted host. Also, any default
+ settings and environment variables available to
psql
+ and the
libpq front-end library do apply.
+
+
+
+
+
+
Options
The options -h, -p, -U,
-W, and -e are passed on literally to
.
- >
+ >
-
-
- Outputs
-
+
+
Diagnostics
If there is an error condition, the backend error message will be displayed.
See
and for possibilities.
-
-
+
-
-
- Description
-
-
dropdb destroys an existing
- The user who executes this command must be a database
- superuser or the owner of the database.
-
+
+
Environment
-
dropdb is a shell script wrapper around the
- via
- the
PostgreSQL interactive terminal
- . Thus, there is nothing
- special about dropping databases via this or other methods. This means
- that the
psql must be found by the script and that
- a database server is running at the targeted host. Also, any default
- settings and environment variables available to
psql
- and the
libpq front-end library do apply.
-
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters
+
+
+
+
+
-
Usage
+
Examples
+
+
+
+
See Also
+
+
+
+
+
+
+
- id="droplang">droplang
+ droplang
remove a PostgreSQL procedural language
+
+
+
+
+ Description
+
+
+
droplang is a utility for removing an
+ existing programming language from a
+
droplang can drop any procedural language,
+ even those not supplied by the
PostgreSQL> distribution.
+
+ Although backend programming languages can be removed directly using
+ several
SQL commands, it is recommended to use
+
droplang because it performs a number
+ of checks and is much easier to use. See
+
+ for more.
+
+
+
+
+
+
Options
-
-
- Inputs
-
droplang accepts the following command line arguments:
-
+
+
+
+
+
Environment
+
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters.
+
+
+
+
+
+
+
+
+
Diagnostics
-
-
- Outputs
-
Most error messages are self-explanatory. If not, run
for details. Check also under
for more possibilities.
-
-
-
-
-
- Description
-
-
-
droplang is a utility for removing an
- existing programming language from a
-
droplang can drop any procedural language,
- even those not supplied by the
PostgreSQL> distribution.
-
- Although backend programming languages can be removed directly using
- several
SQL commands, it is recommended to use
-
droplang because it performs a number
- of checks and is much easier to use. See
-
- for more.
-
-
-
- Notes
-
+
+
+
Notes
Use to add a language.
-
-
Usage
+
+
+
Examples
+
+
+
See Also
+
+
+
+
+
+
+
+
-
-
- Inputs
-
+
+
+
Description
+
+
dropuser removes an existing
+ and the databases which that user owned.
+ Only users with usesuper set in
+ the pg_shadow table can destroy
+
+
+
dropuser is a shell script wrapper around the
+ via
+ the
PostgreSQL interactive terminal
+ . Thus, there is nothing
+ special about removing users via this or other methods. This means
+ that the
psql must be found by the script and that
+ a database server is running at the targeted host. Also, any default
+ settings and environment variables available to
psql
+ and the
libpq front-end library do apply.
+
+
+
+
+
+
Options
-
The options -h, -p, and -e,
are available as well, but they can be confusing in this context.
- >
+ >
-
-
- Outputs
-
+
+
Environment
+
+
+
+ PGHOST
+ PGPORT
+ PGUSER
+
+
+ Default connection parameters
+
+
+
+
+
+
+
+
+
Diagnostics
+
DROP USER
If there is an error condition, the backend error message will be displayed.
See
and for possibilities.
-
-
-
-
-
- Description
-
-
dropuser removes an existing
- and the databases which that user owned.
- Only users with usesuper set in
- the pg_shadow table can destroy
-
-
-
dropuser is a shell script wrapper around the
- via
- the
PostgreSQL interactive terminal
- . Thus, there is nothing
- special about removing users via this or other methods. This means
- that the
psql must be found by the script and that
- a database server is running at the targeted host. Also, any default
- settings and environment variables available to
psql
- and the
libpq front-end library do apply.
-
-
-
-
Usage
+
+
+
Examples
+
+
+
See Also
+
+
+
+
+
+
+
1
Application
+
embedded SQL C preprocessor
+
1999-07-20
+
+
+
+
Description
+
+ is an embedded SQL preprocessor for the C language and the
+ enables development of C programs with embedded SQL code.
+
+
+ original author of
ecpg (up to version 0.2).
+ is the current author and maintainer of
ecpg.
+ is the author of the last revision of the
ecpg man page, on which
+ this document is based.
+
+
+
+
+
+
Options
-
-
- 1999-07-20
-
-
- Inputs
-
ecpg accepts the following command
line arguments:
-
-
-
-
- 1998-11-05
-
-
- Outputs
-
-
ecpg will create a file or
- write to stdout.
+
-
-
- Return value
-
-
ecpg returns 0 to the shell on successful completion, non-zero
- for errors.
-
-
-
-
-
-
-
-
-
Description
- is an embedded SQL preprocessor for the C language and the
- enables development of C programs with embedded SQL code.
-
+
+
Exit Status
- original author of
ecpg (up to version 0.2).
- is the current author and maintainer of
ecpg.
- is the author of the last revision of the
ecpg man page, on which
- this document is based.
+
ecpg returns 0 to the shell on
+ successful completion, non-zero for errors.
-
+
+
Usage
- R2-APP-ECPG-preprocessing">
+
Preprocessing for Compilation
- R2-APP-ECPG-compiling">
+
Compiling and Linking
- R1-APP-ECPG-grammar">
+
Grammar
- R2-APP-ECPG-library">
+
Libraries
- R2-APP-declaration">
+ APP-ecpg-declaration">
Variable Declaration
- R2-APP-ECPG-errors">
+
Error Handling
- R2-APP-ECPG-connecting">
+
Connecting to the Database Server
- R2-APP-ECPG-queries">
+
Queries
- R1-APP-ECPG-notes">
+
Notes
The complete structure definition MUST be listed
+
+
+
+
See Also
+
+ PostgreSQL Programmer's Guide for a more
+ detailed description of the embedded SQL interface.
+
+
+
-
Usage
+
Examples
+
+
+
See Also
+
+
+ PostgreSQL Administrator's Guide
+
+
+
+
+
+
+
+
Environment
-
-
Files
+
+
+ PGDATA
+
+
+ Default data direction location
+
+
+
+
+
+ For others, see .
+
+
+
+
+
+
Files
If the file postmaster.opts.default exists in
options to the
postmaster, unless
overridden by the option.
-
+
+
+
+
Notes
+
+ Waiting for complete start is not a well-defined operation and may
+ fail if access control is set up so that a local client cannot
+ connect without manual interaction. It should be avoided.
+
-
-
Bugs
-
- Waiting for complete start is not a well-defined operation and may
- fail if access control is set up so that a local client cannot
- connect without manual interaction. It should be avoided.
-
-
See Also