- programmers. It is divided into three parts.
- distributed separately and contain their own documentation.
- language that the interface uses.
- first few chapters thereof.
- documentation that accompanies that release.
-
- &info;
- ¬ation;
- &problems;
-]]>
-
-
-
Client Interfaces
-
- This part of the manual is the description of the client-side
- programming interfaces and support libraries for various
- languages.
-
-
-
- &libpq;
- &lobj;
- &libpgtcl;
- &ecpg;
- &jdbc;
- &pygresql;
-
-
-
Server Programming
-
- This second part of the manual explains the
-
PostgreSQL approach to extensibility
- and describe how users can extend
-
PostgreSQL by adding user-defined
- types, operators, aggregates, and both query language and
- programming language functions. After a discussion of the
-
PostgreSQL rule system, we discuss the
- trigger and SPI interfaces.
-
-
-
- &arch-pg;
- &extend;
- &xfunc;
- &xtypes;
- &xoper;
- &xaggr;
- &rules;
- &xindex;
- &indexcost;
- &trigger;
- &spi;
-
-
-
Procedural Languages
-
- This part documents the procedural languages available in the
-
PostgreSQL distribution as well as
- general issues concerning procedural languages.
-
-
-
- &xplang;
- &plsql;
- &pltcl;
- &plperl;
- &plpython;
-
-
-
- &biblio;
- &bookindex;
-]]>
-
-
-
-
where the file name for the source file must be available to the
backend server machine, not the client, since the backend server
reads the file directly. You can read more about the
- COPY command in the &cite-reference;.
+ COPY command in .
The LIKE operator does pattern matching and
- is explained in the &cite-user;.
+ is explained in .
- See and the
- &cite-admin; for more information about allowed variable names
+ See and
+ for more information about allowed variable names
and values.
Refer to CREATE TABLE for a further description
- of valid arguments. The &cite-user; has further information on
+ of valid arguments. has further information on
inheritance.
- See and the
- &cite-admin; for more information about allowed variable names
+ See and
+ for more information about allowed variable names
and values.
ANALYZE deems them uninteresting (for example, in
a unique-key column, there are no common values) or if the column
data type does not support the appropriate operators. There is more
- information about the statistics in the &cite-user;.
+ information about the statistics in .
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
just after BEGIN if you need more rigorous transaction
isolation. (Alternatively, you can change the default transaction
- isolation level; see the &cite-admin; for details.)
+ isolation level; see for details.)
In SERIALIZABLE mode queries will see only changes committed before
the entire
transaction began (actually, before execution of the first
DML> statement
-
+
A checkpoint is a point in the transaction log sequence at which
all data files have been updated to reflect the information in the
log. All data files will be flushed to disk. Refer to the
- &cite-admin; for more information about the WAL system.
+ for more information about the WAL system.
-
-
See Also
-
- &cite-admin;
-
-
-
Compatibility
When a table is being clustered, an ACCESS
EXCLUSIVE lock is acquired on it. This prevents any other
database operations (both reads and writes) from preceding on the
- table until the CLUSTER is finished. See the
- &cite-user; for more information on database locking.
+ table until the CLUSTER is finished. See
+ for more information on database locking.
-
- Usage
-
+
Examples
+
- Refer to the chapter on aggregate functions in the
- &cite-programmer; for complete examples of usage.
+ See .
-
+
,
,
- ,
- &cite-programmer;
+
-
+
,
- ,
- &cite-programmer;
+
specified with absolute path names, and by default
only an environment variable known to the backend may be
specified for an alternate location.
- See the Administrator's Guide for more information.
+ See for more information.
The underlying data type of the domain. This may include array
specifiers.
- Refer to the &cite-user; for further
- information about data types and arrays.
- &cite-programmer;
Notes
- Refer to the chapter in the &cite-programmer;
- on the topic of extending
-
PostgreSQL via functions
- for further information on writing external functions.
+ Refer to for further information on writing
+ external functions.
,
,
,
- ,
- &cite-programmer;
+
CREATE GROUP will create a new group in the
- database installation. Refer to the &cite-admin; for information
- about using groups for authentication. You must be a database
+ database installation. You must be a database
superuser to use this command.
CREATE LANGUAGE effectively associates the
language name with a call handler that is responsible for executing
- functions written in the language. Refer to the &cite-programmer;
+ functions written in the language. Refer to
for more information about language call handlers.
- &cite-programmer;
- Refer to the chapter on interfacing extensions to indexes in the
- &cite-programmer; for further information.
+ Refer to for further information.
Notes
- Refer to the chapter on operators in the &cite-user;
- for further information.
- Refer to DROP OPERATOR to delete
+ Refer to for further information.
+ Use DROP OPERATOR to delete
user-defined operators from a database.
currval and
setval
to operate on the sequence. These functions are documented in
- the &cite-user;.
+ .
The data type of the column. This may include array specifiers.
- Refer to the &cite-user; for further information about data
- types and arrays.
- Refer to the chapters on SPI and Triggers in the &cite-programmer;
- for more information.
+ Refer to for more information.
- &cite-programmer;
CREATE USER will add a new user to an instance
- of
PostgreSQL. Refer to
the &cite-admin;
+ of
PostgreSQL. Refer to
for information about managing users and authentication. You must
be a database superuser to use this command.
- See the chapter on client authentication in the &cite-admin;
+ See
for details on how to set up authentication mechanisms. Note
that older clients may lack support for the MD5 authentication
mechanism that is needed to work with passwords that are
The input data type of the aggregate function,
or * if the function accepts any input type.
- (Refer to the &cite-user; for further information about data types.)
This reference page does not describe the embedded SQL language.
- See the &cite-programmer; for more information on that topic.
+ See for more information on that topic.
-
-
-
See Also
-
- &cite-programmer; for a more detailed description of the embedded
- SQL interface
-
-
-
There is only sparse documentation on the optimizer's use of cost
information in
PostgreSQL.
- Refer to the &cite-user; and &cite-programmer; for more information.
+ Refer to for more information.
-
-
See Also
-
-
- &cite-admin;
-
-
-
- Insert into arrays (refer to the &cite-user; for further
- information about arrays):
+ Insert into arrays:
-- Create an empty 3x3 gameboard for noughts-and-crosses
The file name is specified in the same way as for shared library
names in ; in particular, one
may rely on a search path and automatic addition of the system's standard
- shared library file name extension. See the &cite-programmer; for
+ shared library file name extension. See for
more information on this topic.
See Also
- ,
- &cite-programmer;
+
-
+
-
-
-
-
See Also
-
- &cite-programmer;
-
-
See Also
- , &cite-admin;
+
- &cite-programmer; (description of libpgtcl)
+ (description of libpgtcl)
tclsh 1
- &cite-programmer; (description of libpgtcl)
+ (description of libpgtcl)
tclsh 1
You can avoid having to type these options by setting up a
- configuration file. See the &cite-admin; for details. Some
+ configuration file. See for details. Some
(safe) options can also be set from the connecting client in an
application-dependent way. For example, if the environment
variable PGOPTIONS is set, then
means that the day before month
(rather than
month before day) rule is used to interpret ambiguous date
input, and that the day is printed before the month in certain
- date output formats. See the &cite-user; for more information.
+ date output formats. See for more information.
postmaster accepts the following
command line arguments. For a detailed discussion of the options
- consult the &cite-admin;. You can also save typing most of these
+ consult . You can also save typing most of these
options by setting up a configuration file.
- Sets a named run-time parameter. Consult the &cite-admin; for
+ Sets a named run-time parameter. Consult for
a list and descriptions. Most of the other command line
options are in fact short forms of such a parameter
assignment.
default, this value is 32, but it can be set as high as your
system will support. (Note that
is required to be at least twice
- . See the &cite-admin; for a discussion of
+ . See for a discussion of
system resource requirements for large numbers of client
connections.)
Other environment variables may be used to designate alternative
- data storage locations. See the &cite-admin; for more
+ data storage locations. See for more
information.
If you see this message, you probably need to configure
- your kernel for shared memory and semaphores as described in the &cite-admin;.
+ your kernel for shared memory and semaphores as described in .
If you run multiple instances of
postmaster
on a single host, or have a kernel with particularly small shared memory
Examples
-
- This section only shows a few examples specific to
-
psql. If you want to learn
-
SQL or get familiar with
-
PostgreSQL, you might wish to read the
- &cite-tutorial;.
-
-
-
The first example shows how to spread a command over several lines of
input. Notice the changing prompt:
under certain access patterns. REINDEX
provides a way to reduce the space consumption of the index by
writing a new version of the index without the dead pages. See
- the Routine Reindexing
section in the
- &cite-admin; for more information. The rest of this section
+ for more information. The rest of this reference page
mostly discusses how to use REINDEX to
recover from index corruption.
have had, had no SET> ever been issued for it in the
current session. The actual source of this value might be a
compiled-in default, the postmaster's configuration file or command-line
- switches, or per-database or per-user default settings. See the
- &cite-admin; for details.
+ switches, or per-database or per-user default settings. See
+ for details.
already locked a selected row or rows, SELECT FOR
UPDATE will wait for the other transaction to complete,
and will then lock and return the updated row (or no row, if the
- row was deleted). For further discussion see the concurrency
- chapter of the &cite-user;.
+ row was deleted). For further discussion see .
The SET command changes run-time configuration
parameters. Many of the run-time parameters listed in the
- &cite-admin; can be changed on-the-fly with SET.
+ can be changed on-the-fly with SET.
(But some require superuser privileges to change, and others cannot
be changed after server or session start.) Note that
SET only affects the value used by the current
Even with autocommit> set to off>, SET>
does not start a new transaction block. See the
- autocommit> section of the &cite-admin; for details.
+ autocommit> section in for details.
+
+
Notes
+
+ The function set_config provides the equivalent
+ capability. See .
+
+
Examples
,
-
- The function set_config provides the equivalent
- capability. See Miscellaneous Functions in
- the &cite-user;.
-
-
+
2000-11-24
SET default_transaction_isolation = 'value'
- and in the configuration file. Consult the &cite-admin; for more
+ and in the configuration file. Consult for more
information.
not provide the isolation levels
and . Because of multiversion
concurrency control, the level is not
- truly serializable. See the &cite-user; for details.
+ truly serializable. See for details.
Even with autocommit> set to off>, SHOW>
does not start a new transaction block. See the
- autocommit> section of the &cite-admin; for details.
+ autocommit> section in for details.
+
+
Notes
+
+ The function current_setting produces
+ equivalent output. See .
+
+
+
Examples
-
-
-
See Also
-
- The function current_setting produces equivalent
- output. See Miscellaneous Functions in the
- &cite-user;.
-
-
intended usage is in connection with preparation of user-defined template
databases, or other databases that are completely read-only and will not
receive routine maintenance VACUUM> operations.
- See the &cite-admin; for details.
+ See for details.
-
-
-
PostgreSQL &version; Reference Manual
-
- The PostgreSQL Global Development Group
- &legal;
-
-
-
Preface
+
Reference
- The entries in this Reference Manual are
- meant to provide in reasonable length an authoritative, complete, and
- formal summary about their respective subjects. More information
- about the use of
PostgreSQL, in
- narrative, tutorial, or example form, may be found in other parts
- of the
PostgreSQL documentation set.
- See the cross-references listed on each reference page.
+ The entries in this Reference are meant to provide in reasonable
+ length an authoritative, complete, and formal summary about their
+ respective subjects. More information about the use of
+
PostgreSQL, in narrative, tutorial, or
+ example form, may be found in other parts of this book. See the
+ cross-references listed on each reference page.
- The Reference Manual entries are also
- available as traditional man
pages.
+ The reference entries are also available as traditional
+ man
pages.
- reface>
+ artintro>
SQL Commands
-book>
+part>
The database cluster will be initialized with locale de_DE.
This locale setting will prevent the use of indexes for pattern matching
operations. If that is a concern, rerun initdb with the collation order
-set to "C". For more information see the Administrator's Guide.
+set to "C". For more information see the documentation.
This is intended to warn you that the currently selected locale
will cause indexes to be sorted in an order that prevents them from
visible to the superuser, so it should not represent a
security risk. This data can be accessed via the
pg_stat_activity system view; refer
- to the &cite-admin; for more information.
+ to for more information.
default. This data can be accessed via the
pg_stat and
pg_statio family of system views;
- refer to the &cite-admin; for more information.
+ refer to for more information.
- Consult the &cite-user; and
- the command SET TRANSACTION for more
+ Consult and for more
information.
- For more information on schema handling, see the &cite-user;.
+ For more information on schema handling, see .
not included in versions prior to 7.1. If you need the old
behavior you can set this variable to off, but in the long run
you are encouraged to change your applications to use the
- ONLY key word to exclude subtables. See the
- SQL language reference and the &cite-user; for more information about inheritance.
+ ONLY key word to exclude subtables. See
+ for more information about inheritance.
- Refer to the &cite-user; for related information.
+ Refer to for related information.
If you are installing
PostgreSQL
- yourself, then refer to the &cite-admin;
+ yourself, then refer to
for instructions on installation, and return to
this guide when the installation is complete. Be sure to follow
closely the section about setting up the appropriate environment
Writing a custom application, using one of the several
available language bindings. These possibilities are discussed
- further in the &cite-programmer;.
+ further in .
command shell. (For more internal commands, type
\? at the psql prompt.) The
full capabilities of psql are documented in
-
the &cite-reference;. If
PostgreSQL> is
installed correctly you can also type man psql
at the operating system shell prompt to see the documentation. In
this tutorial we will not use these features explicitly, but you
-
+
;; Returns the depth of auto TOC that should be made at the nd-level
(define (toc-depth nd)
- (cond ((string=? (gi nd) (normalize "book")) 3)
+ (cond ((string=? (gi nd) (normalize "book")) 2)
((string=? (gi nd) (normalize "set")) 2)
((string=? (gi nd) (normalize "part")) 2)
((string=? (gi nd) (normalize "chapter")) 2)
a SET token to appear in a certain position, and
this particular variation of INSERT also
requires a VALUES in order to be complete. The
- precise syntax rules for each command are described in the
- &cite-reference;.
+ precise syntax rules for each command are described in .
- The syntax for creating triggers is described in &cite-reference;.
+ The syntax for creating triggers is described in .
+++ /dev/null
-
-
-
-
-
PostgreSQL &version; Tutorial
-
- The PostgreSQL Global Development Group
- &legal;
-
-
-
Preface
-
-
- &intro;
- &history;
-]]>
-
-
-
What's In This Book
-
- Welcome to
PostgreSQL and the
- PostgreSQL Tutorial. The following few
- chapters are intended to give a simple introduction to
-
PostgreSQL, relational database
- concepts, and the SQL language to those who are new to any one of
- these aspects. We only assume some general knowledge about how to
- use computers. No particular Unix or programming experience is
- required. This book is mainly intended to give you a hands-on
- experience with important aspects of the
-
PostgreSQL system. It makes no attempt
- to be a complete or thorough treatment of the topics it covers.
-
-
- After you have worked through this tutorial you might want to move
- on to reading the &cite-user; to gain a more formal knowledge of
- the SQL language, or the &cite-programmer; for information about
- developing applications for
PostgreSQL.
- Those who set up and manage their own server should also read the
- &cite-admin;.
-
-
-
-
- &info;
- ¬ation;
- &problems;
-]]>
-
-
- &start;
- &query;
- &advanced;
-
- &biblio;
- &bookindex;
-]]>
-
-
-
-
operators.
-The &cite-programmer; has more details on the exact algorithms used for
-implicit type conversion and conversion.
-
-
Overview
This chapter describes how to create and manage users and introduces
the privilege system. More information about the various types of
- database objects and the effects of privileges can be found in the
- &cite-user;.
+ database objects and the effects of privileges can be found in .
Privileges
- Being moved to User's Guide. Will eventually disappear here.
+ Being moved to the DDL chapter. Will eventually disappear here.
When a database object is created, it is assigned an owner. The
USAGE>, and ALL PRIVILEGES>. For more
information on the different types of privileges support by
- GRANT page in the &cite-reference;. The right to modify or
+ GRANT page in . The right to modify or
destroy an object is always the privilege of the owner only. To
assign privileges, the GRANT command is
used. So, if joe is an existing user, and
+++ /dev/null
-
-
-
-
-
-
-
PostgreSQL &version; User's Guide
-
-
- The PostgreSQL Global Development Group
- &legal;
-
-
-
Preface
-
- &intro;
- &history;
-
-
-
What's In This Book
-
- This book describes the use of the
SQL language
- in
PostgreSQL. We start with
- describing the general syntax of
SQL, then
- explain how to create the structures to hold data, how to populate
- the database, and how to query it. The middle part lists the
- available data types and functions for use in
-
SQL data commands. The rest of the book treats
- several aspects that are important for tuning a database for
- optimal performance.
-
-
- The information in this book is arranged so that a novice user can
- follow it start to end to gain a full understanding of the topics
- without having to refer forward too many times. The chapters are
- intended to be self-contained, so that advanced users can read the
- chapters individually as they choose. The information in this
- book is presented in a narrative fashion in topical units.
- Readers looking for a complete description of a particular command
- should look into the &cite-reference;.
-
-
- Readers of this book should know how to connect to a
PostgreSQL>
- database and issue
SQL commands. Readers that are unfamiliar with
- these issues are encouraged to read the &cite-tutorial; first.
SQL
- commands are typically entered using the
PostgreSQL> interactive
- terminal
psql, but other programs that
- have similar functionality can be used as well.
-
-
- This book covers
PostgreSQL &version;
- only. For information on other versions, please read the
- documentation that accompanies that release.
-
-
-
- &info;
- ¬ation;
- &problems;
-
-
- &syntax;
- &ddl;
- &dml;
- &queries;
- &datatype;
- &func;
- &typeconv;
- &indices;
- &mvcc;
- &perform;
-
-
-
- &datetime;
- &keywords;
- &features;
-
- &biblio;
-
-
- &bookindex;
- ]]>
-
-
-
-
For further details see the description of the CREATE
- AGGREGATE command in the &cite-reference;.
+ AGGREGATE command in .
it is not immediately clear which function would be called with
some trivial input like test(1, 1.5). The
currently implemented resolution rules are described in the
- &cite-user;, but it is unwise to design a system that subtly
+ , but it is unwise to design a system that subtly
relies on this behavior.
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.4 2002/09/04 20:31:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/port/sysv_sema.c,v 1.5 2003/03/25 16:15:44 petere Exp $
*
*-------------------------------------------------------------------------
*/
"consumption of semaphores by reducing its max_connections parameter\n"
"(currently %d).\n"
"\n"
- "The PostgreSQL Administrator's Guide contains more information about\n"
+ "The PostgreSQL documentation contains more information about\n"
"configuring your system for PostgreSQL.\n\n",
MaxBackends);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.4 2002/09/04 20:31:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.5 2003/03/25 16:15:44 petere Exp $
*
*-------------------------------------------------------------------------
*/
"\nThis error usually means that PostgreSQL's request for a shared memory\n"
"segment exceeded your kernel's SHMMAX parameter. You can either\n"
"reduce the request size or reconfigure the kernel with larger SHMMAX.\n"
- "To reduce the request size (currently %u bytes), reduce\n"
+ "To reduce the request size (currently %u bytes), reduce\n"
"PostgreSQL's shared_buffers parameter (currently %d) and/or\n"
"its max_connections parameter (currently %d).\n"
"\n"
"your kernel's SHMMIN parameter, in which case raising the request size or\n"
"reconfiguring SHMMIN is called for.\n"
"\n"
- "The PostgreSQL Administrator's Guide contains more information about\n"
- "shared memory configuration.\n\n",
+ "The PostgreSQL documentation contains more information about shared\n"
+ "memory configuration.\n\n",
size, NBuffers, MaxBackends);
else if (errno == ENOMEM)
fprintf(stderr,
"\nThis error usually means that PostgreSQL's request for a shared\n"
- "memory segment exceeded available memory or swap space.\n"
- "To reduce the request size (currently %u bytes), reduce\n"
+ "memory segment exceeded available memory or swap space.\n"
+ "To reduce the request size (currently %u bytes), reduce\n"
"PostgreSQL's shared_buffers parameter (currently %d) and/or\n"
"its max_connections parameter (currently %d).\n"
"\n"
- "The PostgreSQL Administrator's Guide contains more information about\n"
- "shared memory configuration.\n\n",
+ "The PostgreSQL documentation contains more information about shared\n"
+ "memory configuration.\n\n",
size, NBuffers, MaxBackends);
else if (errno == ENOSPC)
"by reducing its shared_buffers parameter (currently %d) and/or\n"
"its max_connections parameter (currently %d).\n"
"\n"
- "The PostgreSQL Administrator's Guide contains more information about\n"
- "shared memory configuration.\n\n",
+ "The PostgreSQL documentation contains more information about shared\n"
+ "memory configuration.\n\n",
size, NBuffers, MaxBackends);
proc_exit(1);
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.186 2003/03/20 03:34:56 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.187 2003/03/25 16:15:44 petere Exp $
#
#-------------------------------------------------------------------------
if test x`pg_getlocale COLLATE` != xC && test x`pg_getlocale COLLATE` != xPOSIX; then
echo "This locale setting will prevent the use of indexes for pattern matching"
echo "operations. If that is a concern, rerun $CMDNAME with the collation order"
- echo "set to \"C\". For more information see the Administrator's Guide."
+ echo "set to \"C\". For more information see the documentation."
fi
echo