This patch fixes a few missed GUC variables that were still upper case,
makes a few more small improvements to runtime.sgml, and makes some SGML conventions more consistent. Neil Conway
This commit is contained in:
parent
3d48045ae1
commit
2a5b6a7c9b
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.44 2003/06/06 14:17:08 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.45 2003/09/11 21:42:19 momjian Exp $ -->
|
||||||
|
|
||||||
<appendix id="docguide">
|
<appendix id="docguide">
|
||||||
<title>Documentation</title>
|
<title>Documentation</title>
|
||||||
@ -497,8 +497,9 @@ CATALOG "docbook-dsssl--1.<replaceable>xx</>/catalog
|
|||||||
<para>
|
<para>
|
||||||
Before you can build the documentation you need to run the
|
Before you can build the documentation you need to run the
|
||||||
<filename>configure</filename> script as you would when building
|
<filename>configure</filename> script as you would when building
|
||||||
the PostgreSQL programs themselves. Check the output near the end
|
the <productname>PostgreSQL</productname> programs themselves.
|
||||||
of the run, it should look something like this:
|
Check the output near the end of the run, it should look something
|
||||||
|
like this:
|
||||||
<screen>
|
<screen>
|
||||||
<computeroutput>
|
<computeroutput>
|
||||||
checking for onsgmls... onsgmls
|
checking for onsgmls... onsgmls
|
||||||
@ -640,7 +641,7 @@ gmake man.tar.gz
|
|||||||
<title>Print Output via <acronym>RTF</acronym></title>
|
<title>Print Output via <acronym>RTF</acronym></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can also create a printable version of the PostgreSQL
|
You can also create a printable version of the <productname>PostgreSQL</productname>
|
||||||
documentation by converting it to <acronym>RTF</acronym> and
|
documentation by converting it to <acronym>RTF</acronym> and
|
||||||
applying minor formatting corrections using an office suite.
|
applying minor formatting corrections using an office suite.
|
||||||
Depending on the capabilities of the particular office suite, you
|
Depending on the capabilities of the particular office suite, you
|
||||||
@ -651,7 +652,7 @@ gmake man.tar.gz
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
It appears that current versions of the PostgreSQL documentation
|
It appears that current versions of the <productname>PostgreSQL</productname> documentation
|
||||||
trigger some bug in or exceed the size limit of OpenJade. If the
|
trigger some bug in or exceed the size limit of OpenJade. If the
|
||||||
build process of the <acronym>RTF</acronym> version hangs for a
|
build process of the <acronym>RTF</acronym> version hangs for a
|
||||||
long time and the output file still has size 0, then you may have
|
long time and the output file still has size 0, then you may have
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.50 2003/09/09 10:54:44 meskes Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.51 2003/09/11 21:42:19 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="ecpg">
|
<chapter id="ecpg">
|
||||||
@ -1153,10 +1153,11 @@ struct
|
|||||||
condition. A successful state is indicated by the code
|
condition. A successful state is indicated by the code
|
||||||
<literal>00000</literal>. Further information about the codes can
|
<literal>00000</literal>. Further information about the codes can
|
||||||
be found XXX. The <literal>SQLSTATE</literal> codes are for the
|
be found XXX. The <literal>SQLSTATE</literal> codes are for the
|
||||||
most part defined in the SQL standard. The PostgreSQL server
|
most part defined in the SQL standard. The
|
||||||
natively supports <literal>SQLSTATE</literal> error codes;
|
<productname>PostgreSQL</productname> server natively supports
|
||||||
therefore a high degree of consistency can be achieved by using
|
<literal>SQLSTATE</literal> error codes; therefore a high degree
|
||||||
this error code scheme throughout all applications.
|
of consistency can be achieved by using this error code scheme
|
||||||
|
throughout all applications.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1168,11 +1169,11 @@ struct
|
|||||||
affected zero rows, and no specific negative values. Therefore,
|
affected zero rows, and no specific negative values. Therefore,
|
||||||
this scheme can only achieve poor portability and does not have a
|
this scheme can only achieve poor portability and does not have a
|
||||||
hierarchical code assignment. Historically, the embedded SQL
|
hierarchical code assignment. Historically, the embedded SQL
|
||||||
processor for PostgreSQL has assigned some specific
|
processor for <productname>PostgreSQL</productname> has assigned
|
||||||
<literal>SQLCODE</literal> values for its use, which are listed
|
some specific <literal>SQLCODE</literal> values for its use, which
|
||||||
below with their numeric value and their symbolic name. Remember
|
are listed below with their numeric value and their symbolic name.
|
||||||
that these are not portable to other SQL implementations. To
|
Remember that these are not portable to other SQL implementations.
|
||||||
simplify the porting of applications to the
|
To simplify the porting of applications to the
|
||||||
<literal>SQLSTATE</literal> scheme, the corresponding
|
<literal>SQLSTATE</literal> scheme, the corresponding
|
||||||
<literal>SQLSTATE</literal> is also listed. There is, however, no
|
<literal>SQLSTATE</literal> is also listed. There is, however, no
|
||||||
one-to-one or one-to-many mapping between the two schemes (indeed
|
one-to-one or one-to-many mapping between the two schemes (indeed
|
||||||
@ -1291,9 +1292,10 @@ struct
|
|||||||
<term>-208 (<symbol>ECPG_EMPTY</symbol>)</term>
|
<term>-208 (<symbol>ECPG_EMPTY</symbol>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The statement sent to the PostgreSQL server was empty. (This
|
The statement sent to the <productname>PostgreSQL</productname>
|
||||||
cannot normally happen in an embedded SQL program, so it may
|
server was empty. (This cannot normally happen in an embedded
|
||||||
point to an internal error.) (SQLSTATE YE002)
|
SQL program, so it may point to an internal error.) (SQLSTATE
|
||||||
|
YE002)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.24 2003/08/31 17:32:18 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.25 2003/09/11 21:42:19 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="extend">
|
<chapter id="extend">
|
||||||
@ -69,14 +69,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.24 2003/08/31 17:32:18 pete
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The PostgreSQL server can moreover incorporate user-written code into
|
The <productname>PostgreSQL</productname> server can moreover
|
||||||
itself through dynamic loading. That is, the user can
|
incorporate user-written code into itself through dynamic loading.
|
||||||
specify an object code file (e.g., a shared library) that implements a new type or function,
|
That is, the user can specify an object code file (e.g., a shared
|
||||||
and <productname>PostgreSQL</productname> will load it as required. Code written
|
library) that implements a new type or function, and
|
||||||
in <acronym>SQL</acronym> is even more trivial to add to the server.
|
<productname>PostgreSQL</productname> will load it as required.
|
||||||
This ability to modify its operation <quote>on the fly</quote> makes
|
Code written in <acronym>SQL</acronym> is even more trivial to add
|
||||||
<productname>PostgreSQL</productname> uniquely suited for rapid prototyping of new
|
to the server. This ability to modify its operation <quote>on the
|
||||||
applications and storage structures.
|
fly</quote> makes <productname>PostgreSQL</productname> uniquely
|
||||||
|
suited for rapid prototyping of new applications and storage
|
||||||
|
structures.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.18 2003/03/13 01:30:28 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.19 2003/09/11 21:42:19 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="features">
|
<appendix id="features">
|
||||||
@ -63,11 +63,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.18 2003/03/13 01:30:28 pe
|
|||||||
In the following two sections, we provide a list of those features
|
In the following two sections, we provide a list of those features
|
||||||
that <productname>PostgreSQL</productname> supports, followed by a
|
that <productname>PostgreSQL</productname> supports, followed by a
|
||||||
list of the features defined in SQL99 which are not yet supported in
|
list of the features defined in SQL99 which are not yet supported in
|
||||||
PostgreSQL. Both of these lists are approximate: There may be minor
|
<productname>PostgreSQL</productname>. Both of these lists are
|
||||||
details that are nonconforming for a feature that is listed as
|
approximate: There may be minor details that are nonconforming for a
|
||||||
supported, and large parts of an unsupported feature may in fact be
|
feature that is listed as supported, and large parts of an
|
||||||
implemented. The main body of the documentation always contains the
|
unsupported feature may in fact be implemented. The main body of
|
||||||
most accurate information about what does and does not work.
|
the documentation always contains the most accurate information
|
||||||
|
about what does and does not work.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.21 2003/09/08 23:02:28 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.22 2003/09/11 21:42:19 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<sect1 id="history">
|
<sect1 id="history">
|
||||||
@ -206,8 +206,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.21 2003/09/08 23:02:28 pet
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Details about what has happened in PostgreSQL since then can be
|
Details about what has happened in <productname>PostgreSQL</> since
|
||||||
found in <xref linkend="release">.
|
then can be found in <xref linkend="release">.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.43 2003/08/31 17:32:19 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.44 2003/09/11 21:42:19 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="indexes">
|
<chapter id="indexes">
|
||||||
<title id="indexes-title">Indexes</title>
|
<title id="indexes-title">Indexes</title>
|
||||||
@ -194,11 +194,11 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
|
|||||||
</synopsis>
|
</synopsis>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
Testing has shown PostgreSQL's hash indexes to be similar or slower
|
Testing has shown <productname>PostgreSQL</productname>'s hash
|
||||||
than B-tree indexes, and the index size and build time for hash
|
indexes to be similar or slower than B-tree indexes, and the
|
||||||
indexes is much worse. Hash indexes also suffer poor performance
|
index size and build time for hash indexes is much worse. Hash
|
||||||
under high concurrency. For these reasons, hash index use is
|
indexes also suffer poor performance under high concurrency. For
|
||||||
presently discouraged.
|
these reasons, hash index use is presently discouraged.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/information_schema.sgml,v 1.6 2003/06/29 15:14:41 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/information_schema.sgml,v 1.7 2003/09/11 21:42:19 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="information-schema">
|
<chapter id="information-schema">
|
||||||
<title>The Information Schema</title>
|
<title>The Information Schema</title>
|
||||||
@ -12,11 +12,13 @@
|
|||||||
information about the objects defined in the current database. The
|
information about the objects defined in the current database. The
|
||||||
information schema is defined in the SQL standard and can therefore
|
information schema is defined in the SQL standard and can therefore
|
||||||
be expected to be portable and remain stable --- unlike the system
|
be expected to be portable and remain stable --- unlike the system
|
||||||
catalogs, which are specific to PostgreSQL and are modelled after
|
catalogs, which are specific to
|
||||||
|
<productname>PostgreSQL</productname> and are modelled after
|
||||||
implementation concerns. The information schema views do not,
|
implementation concerns. The information schema views do not,
|
||||||
however, contain information about PostgreSQL-specific features; to
|
however, contain information about
|
||||||
inquire about those you need to query the system catalogs or other
|
<productname>PostgreSQL</productname>-specific features; to inquire
|
||||||
PostgreSQL-specific views.
|
about those you need to query the system catalogs or other
|
||||||
|
<productname>PostgreSQL</productname>-specific views.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1 id="infoschema-schema">
|
<sect1 id="infoschema-schema">
|
||||||
@ -319,12 +321,13 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In PostgreSQL, you can only grant privileges on entire tables, not
|
In <productname>PostgreSQL</productname>, you can only grant
|
||||||
individual columns. Therefore, this view contains the same
|
privileges on entire tables, not individual columns. Therefore,
|
||||||
information as <literal>table_privileges</literal>, just
|
this view contains the same information as
|
||||||
represented through one row for each column in each appropriate
|
<literal>table_privileges</literal>, just represented through one
|
||||||
table, but it only convers privilege types where column granularity
|
row for each column in each appropriate table, but it only convers
|
||||||
is possible: <literal>SELECT</literal>, <literal>INSERT</literal>,
|
privilege types where column granularity is possible:
|
||||||
|
<literal>SELECT</literal>, <literal>INSERT</literal>,
|
||||||
<literal>UPDATE</literal>, <literal>REFERENCES</literal>. If you
|
<literal>UPDATE</literal>, <literal>REFERENCES</literal>. If you
|
||||||
want to make your applications fit for possible future
|
want to make your applications fit for possible future
|
||||||
developements, it is generally the right choice to use this view
|
developements, it is generally the right choice to use this view
|
||||||
@ -404,8 +407,8 @@
|
|||||||
Note that the column <literal>grantee</literal> makes no
|
Note that the column <literal>grantee</literal> makes no
|
||||||
distinction between users and groups. If you have users and groups
|
distinction between users and groups. If you have users and groups
|
||||||
with the same name, there is unfortunately no way to distinguish
|
with the same name, there is unfortunately no way to distinguish
|
||||||
them. A future version of PostgreSQL will possibly prohibit having
|
them. A future version of <productname>PostgreSQL</productname>
|
||||||
users and groups with the same name.
|
will possibly prohibit having users and groups with the same name.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -415,9 +418,9 @@
|
|||||||
<para>
|
<para>
|
||||||
The view <literal>column_udt_usage</literal> identifies all columns
|
The view <literal>column_udt_usage</literal> identifies all columns
|
||||||
that use data types owned by the current user. Note that in
|
that use data types owned by the current user. Note that in
|
||||||
PostgreSQL, built-in data types behave like user-defined types, so
|
<productname>PostgreSQL</productname>, built-in data types behave
|
||||||
they are included here as well. See also <xref
|
like user-defined types, so they are included here as well. See
|
||||||
linkend="infoschema-columns"> for details.
|
also <xref linkend="infoschema-columns"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -595,7 +598,7 @@
|
|||||||
<entry>
|
<entry>
|
||||||
If <literal>data_type</literal> identifies a character type,
|
If <literal>data_type</literal> identifies a character type,
|
||||||
the maximum possible length in octets (bytes) of a datum (this
|
the maximum possible length in octets (bytes) of a datum (this
|
||||||
should not be of concern to PostgreSQL users); null for all
|
should not be of concern to <productname>PostgreSQL</productname> users); null for all
|
||||||
other data types.
|
other data types.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
@ -800,24 +803,26 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Since data types can be defined in a variety of ways in SQL, and
|
Since data types can be defined in a variety of ways in SQL, and
|
||||||
PostgreSQL contains additional ways to define data types, their
|
<productname>PostgreSQL</productname> contains additional ways to
|
||||||
representation in the information schema can be somewhat difficult.
|
define data types, their representation in the information schema
|
||||||
The column <literal>data_type</literal> is supposed to identify the
|
can be somewhat difficult. The column <literal>data_type</literal>
|
||||||
underlying built-in type of the column. In PostgreSQL, this means
|
is supposed to identify the underlying built-in type of the column.
|
||||||
that the type is defined in the system catalog schema
|
In <productname>PostgreSQL</productname>, this means that the type
|
||||||
|
is defined in the system catalog schema
|
||||||
<literal>pg_catalog</literal>. This column may be useful if the
|
<literal>pg_catalog</literal>. This column may be useful if the
|
||||||
application can handle the well-known built-in types specially (for
|
application can handle the well-known built-in types specially (for
|
||||||
example, format the numeric types differently or use the data in
|
example, format the numeric types differently or use the data in
|
||||||
the precision columns). The columns <literal>udt_name</literal>,
|
the precision columns). The columns <literal>udt_name</literal>,
|
||||||
<literal>udt_schema</literal>, and <literal>udt_catalog</literal>
|
<literal>udt_schema</literal>, and <literal>udt_catalog</literal>
|
||||||
always identify the underlying data type of the column, even if the
|
always identify the underlying data type of the column, even if the
|
||||||
column is based on a domain. (Since PostgreSQL treats built-in
|
column is based on a domain. (Since
|
||||||
types like user-defined types, built-in types appear here as well.
|
<productname>PostgreSQL</productname> treats built-in types like
|
||||||
This is an extension of the SQL standard.) These columns should be
|
user-defined types, built-in types appear here as well. This is an
|
||||||
used if an application wants to process data differently according
|
extension of the SQL standard.) These columns should be used if an
|
||||||
to the type, because in that case it wouldn't matter if the column
|
application wants to process data differently according to the
|
||||||
is really based on a domain. If the column is based on a domain,
|
type, because in that case it wouldn't matter if the column is
|
||||||
the identity of the domain is stored in the columns
|
really based on a domain. If the column is based on a domain, the
|
||||||
|
identity of the domain is stored in the columns
|
||||||
<literal>domain_name</literal>, <literal>domain_schema</literal>,
|
<literal>domain_name</literal>, <literal>domain_schema</literal>,
|
||||||
and <literal>domain_catalog</literal>. If you want to pair up
|
and <literal>domain_catalog</literal>. If you want to pair up
|
||||||
columns with their associated data types and treat domains as
|
columns with their associated data types and treat domains as
|
||||||
@ -1141,8 +1146,8 @@
|
|||||||
<para>
|
<para>
|
||||||
The view <literal>domain_udt_usage</literal> identifies all columns
|
The view <literal>domain_udt_usage</literal> identifies all columns
|
||||||
that use data types owned by the current user. Note that in
|
that use data types owned by the current user. Note that in
|
||||||
PostgreSQL, built-in data types behave like user-defined types, so
|
<productname>PostgreSQL</productname>, built-in data types behave
|
||||||
they are included here as well.
|
like user-defined types, so they are included here as well.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -1266,7 +1271,8 @@
|
|||||||
<entry>
|
<entry>
|
||||||
If the domain has a character type, the maximum possible length
|
If the domain has a character type, the maximum possible length
|
||||||
in octets (bytes) of a datum (this should not be of concern to
|
in octets (bytes) of a datum (this should not be of concern to
|
||||||
PostgreSQL users); null for all other data types.
|
<productname>PostgreSQL</productname> users); null for all
|
||||||
|
other data types.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -2416,11 +2422,11 @@ ORDER BY c.ordinal_position;
|
|||||||
The view <literal>role_usage_grants</literal> is meant to identify
|
The view <literal>role_usage_grants</literal> is meant to identify
|
||||||
<literal>USAGE</literal> privileges granted on various kinds of
|
<literal>USAGE</literal> privileges granted on various kinds of
|
||||||
objects to a group that the current user is a member of. In
|
objects to a group that the current user is a member of. In
|
||||||
PostgreSQL, this currently only applies to domains, and since
|
<productname>PostgreSQL</productname>, this currently only applies
|
||||||
domains do not have real privileges in PostgreSQL, this view is
|
to domains, and since domains do not have real privileges in
|
||||||
empty. Futher information can be found under
|
<productname>PostgreSQL</productname>, this view is empty. Futher
|
||||||
<literal>usage_privileges</literal>. In the future, this view may
|
information can be found under <literal>usage_privileges</literal>.
|
||||||
contain more useful information.
|
In the future, this view may contain more useful information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -2582,8 +2588,8 @@ ORDER BY c.ordinal_position;
|
|||||||
Note that the column <literal>grantee</literal> makes no
|
Note that the column <literal>grantee</literal> makes no
|
||||||
distinction between users and groups. If you have users and groups
|
distinction between users and groups. If you have users and groups
|
||||||
with the same name, there is unfortunately no way to distinguish
|
with the same name, there is unfortunately no way to distinguish
|
||||||
them. A future version of PostgreSQL will possibly prohibit having
|
them. A future version of <productname>PostgreSQL</productname>
|
||||||
users and groups with the same name.
|
will possibly prohibit having users and groups with the same name.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -2874,8 +2880,9 @@ ORDER BY c.ordinal_position;
|
|||||||
not the owner of the function). (According to the SQL
|
not the owner of the function). (According to the SQL
|
||||||
standard, this column is only applicable if
|
standard, this column is only applicable if
|
||||||
<literal>routine_body</literal> is <literal>SQL</literal>, but
|
<literal>routine_body</literal> is <literal>SQL</literal>, but
|
||||||
in PostgreSQL it will contain whatever source text was
|
in <productname>PostgreSQL</productname> it will contain
|
||||||
specified when the function was created.)
|
whatever source text was specified when the function was
|
||||||
|
created.)
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
@ -3082,9 +3089,9 @@ ORDER BY c.ordinal_position;
|
|||||||
<para>
|
<para>
|
||||||
The table <literal>sql_features</literal> contains information
|
The table <literal>sql_features</literal> contains information
|
||||||
about which formal features defined in the SQL standard are
|
about which formal features defined in the SQL standard are
|
||||||
supported by PostgreSQL. This is the same information that is
|
supported by <productname>PostgreSQL</productname>. This is the
|
||||||
presented in <xref linkend="features">. There you can also find
|
same information that is presented in <xref linkend="features">.
|
||||||
some additional background information.
|
There you can also find some additional background information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -3226,9 +3233,10 @@ ORDER BY c.ordinal_position;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The table <literal>sql_languages</literal> contains one row for
|
The table <literal>sql_languages</literal> contains one row for
|
||||||
each SQL language binding that is supported by PostgreSQL.
|
each SQL language binding that is supported by
|
||||||
PostgreSQL supports direct SQL and embedded SQL in C; that is all
|
<productname>PostgreSQL</productname>.
|
||||||
you will learn from this table.
|
<productname>PostgreSQL</productname> supports direct SQL and
|
||||||
|
embedded SQL in C; that is all you will learn from this table.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -3313,8 +3321,8 @@ ORDER BY c.ordinal_position;
|
|||||||
<para>
|
<para>
|
||||||
The table <literal>sql_packages</literal> contains information
|
The table <literal>sql_packages</literal> contains information
|
||||||
about which features packages defined in the SQL standard are
|
about which features packages defined in the SQL standard are
|
||||||
supported by PostgreSQL. Refer to <xref linkend="features"> for
|
supported by <productname>PostgreSQL</productname>. Refer to <xref
|
||||||
background information on feature packages.
|
linkend="features"> for background information on feature packages.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -3375,12 +3383,13 @@ ORDER BY c.ordinal_position;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The table <literal>sql_sizing</literal> contains information about
|
The table <literal>sql_sizing</literal> contains information about
|
||||||
various size limits and maximum values in PostgreSQL. This
|
various size limits and maximum values in
|
||||||
information is primarily intended for use in the context of the
|
<productname>PostgreSQL</productname>. This information is
|
||||||
ODBC interface; users of other interfaces will probably find this
|
primarily intended for use in the context of the ODBC interface;
|
||||||
information to be of little use. For this reason, the individual
|
users of other interfaces will probably find this information to be
|
||||||
sizing items are not described here; you will find them in the
|
of little use. For this reason, the individual sizing items are
|
||||||
description of the ODBC interface.
|
not described here; you will find them in the description of the
|
||||||
|
ODBC interface.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -3657,8 +3666,8 @@ ORDER BY c.ordinal_position;
|
|||||||
Note that the column <literal>grantee</literal> makes no
|
Note that the column <literal>grantee</literal> makes no
|
||||||
distinction between users and groups. If you have users and groups
|
distinction between users and groups. If you have users and groups
|
||||||
with the same name, there is unfortunately no way to distinguish
|
with the same name, there is unfortunately no way to distinguish
|
||||||
them. A future version of PostgreSQL will possibly prohibit having
|
them. A future version of <productname>PostgreSQL</productname>
|
||||||
users and groups with the same name.
|
will possibly prohibit having users and groups with the same name.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -3875,21 +3884,23 @@ ORDER BY c.ordinal_position;
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Triggers in PostgreSQL have two incompatibilities with the SQL
|
Triggers in <productname>PostgreSQL</productname> have two
|
||||||
standard that affect the representation in the information schema.
|
incompatibilities with the SQL standard that affect the
|
||||||
First, trigger names are local to the table in PostgreSQL, rather
|
representation in the information schema. First, trigger names are
|
||||||
|
local to the table in <productname>PostgreSQL</productname>, rather
|
||||||
than independent schema objects. Therefore there may be duplicate
|
than independent schema objects. Therefore there may be duplicate
|
||||||
trigger names defined in one schema, as long as they belong to
|
trigger names defined in one schema, as long as they belong to
|
||||||
different tables. (<literal>trigger_catalog</literal> and
|
different tables. (<literal>trigger_catalog</literal> and
|
||||||
<literal>trigger_schema</literal> are really the values pertaining
|
<literal>trigger_schema</literal> are really the values pertaining
|
||||||
to the table that the trigger is defined on.) Second, triggers can
|
to the table that the trigger is defined on.) Second, triggers can
|
||||||
be defined to fire on multiple events in PostgreSQL (e.g.,
|
be defined to fire on multiple events in
|
||||||
<literal>ON INSERT OR UPDATE</literal>), whereas the SQL standard
|
<productname>PostgreSQL</productname> (e.g., <literal>ON INSERT OR
|
||||||
only allows one. If a trigger is defined to fire on multiple
|
UPDATE</literal>), whereas the SQL standard only allows one. If a
|
||||||
events, it is represented as multiple rows in the information
|
trigger is defined to fire on multiple events, it is represented as
|
||||||
schema, one for each type of event. As a consequence of these two
|
multiple rows in the information schema, one for each type of
|
||||||
issues, the primary key of the view <literal>triggers</literal> is
|
event. As a consequence of these two issues, the primary key of
|
||||||
really <literal>(trigger_catalog, trigger_schema, trigger_name,
|
the view <literal>triggers</literal> is really
|
||||||
|
<literal>(trigger_catalog, trigger_schema, trigger_name,
|
||||||
event_object_name, event_manipulation)</literal> instead of
|
event_object_name, event_manipulation)</literal> instead of
|
||||||
<literal>(trigger_catalog, trigger_schema, trigger_name)</literal>,
|
<literal>(trigger_catalog, trigger_schema, trigger_name)</literal>,
|
||||||
which is what the SQL standard specifies. Nonetheless, if you
|
which is what the SQL standard specifies. Nonetheless, if you
|
||||||
@ -3905,9 +3916,10 @@ ORDER BY c.ordinal_position;
|
|||||||
<para>
|
<para>
|
||||||
The view <literal>usage_privileges</literal> is meant to identify
|
The view <literal>usage_privileges</literal> is meant to identify
|
||||||
<literal>USAGE</literal> privileges granted on various kinds of
|
<literal>USAGE</literal> privileges granted on various kinds of
|
||||||
objects to the current user or by the current user. In PostgreSQL,
|
objects to the current user or by the current user. In
|
||||||
this currently only applies to domains, and since domains do not
|
<productname>PostgreSQL</productname>, this currently only applies
|
||||||
have real privileges in PostgreSQL, this view shows implicit
|
to domains, and since domains do not have real privileges in
|
||||||
|
<productname>PostgreSQL</productname>, this view shows implicit
|
||||||
<literal>USAGE</literal> privileges granted to
|
<literal>USAGE</literal> privileges granted to
|
||||||
<literal>PUBLIC</literal> for all domains. In the future, this
|
<literal>PUBLIC</literal> for all domains. In the future, this
|
||||||
view may contain more useful information.
|
view may contain more useful information.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.140 2003/09/01 23:01:49 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.141 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="installation">
|
<chapter id="installation">
|
||||||
<title><![%standalone-include[<productname>PostgreSQL</>]]>
|
<title><![%standalone-include[<productname>PostgreSQL</>]]>
|
||||||
@ -406,13 +406,14 @@ JAVACMD=$JAVA_HOME/bin/java
|
|||||||
To make the backup, you can use the <command>pg_dumpall</command>
|
To make the backup, you can use the <command>pg_dumpall</command>
|
||||||
command from the version you are currently running. For best
|
command from the version you are currently running. For best
|
||||||
results, however, try to use the <command>pg_dumpall</command>
|
results, however, try to use the <command>pg_dumpall</command>
|
||||||
command from PostgreSQL &version;, since this version contains
|
command from <productname>PostgreSQL</productname> &version;,
|
||||||
bug fixes and improvements over older versions. While this
|
since this version contains bug fixes and improvements over older
|
||||||
advice might seem idiosyncratic since you haven't installed the
|
versions. While this advice might seem idiosyncratic since you
|
||||||
new version yet, it is advisable to follow it if you plan to
|
haven't installed the new version yet, it is advisable to follow
|
||||||
install the new version in parallel with the old version. In
|
it if you plan to install the new version in parallel with the
|
||||||
that case you can complete the installation normally and transfer
|
old version. In that case you can complete the installation
|
||||||
the data later. This will also decrease the downtime.
|
normally and transfer the data later. This will also decrease
|
||||||
|
the downtime.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.21 2003/09/08 23:02:28 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.22 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<preface id="preface">
|
<preface id="preface">
|
||||||
<title>Preface</title>
|
<title>Preface</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This book is the official documentation of PostgreSQL. It is being
|
This book is the official documentation of
|
||||||
written by the PostgreSQL developers and other volunteers in
|
<productname>PostgreSQL</productname>. It is being written by the
|
||||||
parallel to the development of the PostgreSQL software. It
|
<productname>PostgreSQL</productname> developers and other
|
||||||
describes all the functionality that the current version of
|
volunteers in parallel to the development of the
|
||||||
PostgreSQL officially supports.
|
<productname>PostgreSQL</productname> software. It describes all
|
||||||
|
the functionality that the current version of
|
||||||
|
<productname>PostgreSQL</productname> officially supports.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To make the large amount of information about PostgreSQL manageable,
|
To make the large amount of information about
|
||||||
this book has been organized in several parts. Each part is
|
<productname>PostgreSQL</productname> manageable, this book has been
|
||||||
targeted at a different class of users, or at users in different
|
organized in several parts. Each part is targeted at a different
|
||||||
stages of their PostgreSQL experience:
|
class of users, or at users in different stages of their
|
||||||
|
<productname>PostgreSQL</productname> experience:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -38,16 +41,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.21 2003/09/08 23:02:28 peter
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<xref linkend="admin"> describes the installation and
|
<xref linkend="admin"> describes the installation and
|
||||||
administration of the server. Everyone that runs a PostgreSQL
|
administration of the server. Everyone that runs a
|
||||||
server, be it for private use or for others, should read this
|
<productname>PostgreSQL</productname> server, be it for private
|
||||||
part.
|
use or for others, should read this part.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<xref linkend="client-interfaces"> describes the programming
|
<xref linkend="client-interfaces"> describes the programming
|
||||||
interfaces for PostgreSQL client programs.
|
interfaces for <productname>PostgreSQL</productname> client
|
||||||
|
programs.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -111,8 +115,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.21 2003/09/08 23:02:28 peter
|
|||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
Also, PostgreSQL can be extended by the user in many ways, for
|
Also, <productname>PostgreSQL</productname> can be extended by the
|
||||||
example by adding new
|
user in many ways, for example by adding new
|
||||||
|
|
||||||
<itemizedlist spacing="compact">
|
<itemizedlist spacing="compact">
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -137,9 +141,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.21 2003/09/08 23:02:28 peter
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
And because of the liberal license, PostgreSQL can be used,
|
And because of the liberal license,
|
||||||
modified, and distributed by everyone free of charge for any
|
<productname>PostgreSQL</productname> can be used, modified, and
|
||||||
purpose, be it private, commercial, or academic.
|
distributed by everyone free of charge for any purpose, be it
|
||||||
|
private, commercial, or academic.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.135 2003/09/03 22:05:01 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.136 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="libpq">
|
<chapter id="libpq">
|
||||||
@ -2049,11 +2049,13 @@ unsigned char *PQescapeBytea(const unsigned char *from,
|
|||||||
<parameter>from</parameter> parameter binary string in memory
|
<parameter>from</parameter> parameter binary string in memory
|
||||||
allocated with <function>malloc()</>. This memory must be freed
|
allocated with <function>malloc()</>. This memory must be freed
|
||||||
using <function>PQfreemem()</> when the result is no longer needed.
|
using <function>PQfreemem()</> when the result is no longer needed.
|
||||||
The return string has all special characters replaced
|
The return string has all special characters replaced so that they
|
||||||
so that they can be properly processed by the PostgreSQL string literal
|
can be properly processed by the
|
||||||
parser, and the <type>bytea</type> input function. A terminating zero
|
<productname>PostgreSQL</productname> string literal parser, and
|
||||||
byte is also added. The single quotes that must surround
|
the <type>bytea</type> input function. A terminating zero byte is
|
||||||
PostgreSQL string literals are not part of the result string.
|
also added. The single quotes that must surround
|
||||||
|
<productname>PostgreSQL</productname> string literals are not part
|
||||||
|
of the result string.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.24 2003/09/11 18:30:38 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.25 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="plpgsql">
|
<chapter id="plpgsql">
|
||||||
@ -2056,9 +2056,10 @@ RAISE <replaceable class="parameter">level</replaceable> '<replaceable class="pa
|
|||||||
(raise an error and abort the current transaction). Whether
|
(raise an error and abort the current transaction). Whether
|
||||||
messages of a particular priority are reported to the client,
|
messages of a particular priority are reported to the client,
|
||||||
written to the server log, or both is controlled by the
|
written to the server log, or both is controlled by the
|
||||||
<option>log_min_messages</option> and
|
<varname>log_min_messages</varname> and
|
||||||
<option>client_min_messages</option> configuration variables. See
|
<varname>client_min_messages</varname> configuration
|
||||||
<xref linkend="runtime-config"> for more information.
|
variables. See <xref linkend="runtime-config"> for more
|
||||||
|
information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -2448,7 +2449,8 @@ show errors;
|
|||||||
<para>
|
<para>
|
||||||
The <literal>RETURN</literal> key word in the function
|
The <literal>RETURN</literal> key word in the function
|
||||||
prototype (not the function body) becomes
|
prototype (not the function body) becomes
|
||||||
<literal>RETURNS</literal> in PostgreSQL.
|
<literal>RETURNS</literal> in
|
||||||
|
<productname>PostgreSQL</productname>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -2805,7 +2807,8 @@ END;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This section explains a few other things to watch for when porting
|
This section explains a few other things to watch for when porting
|
||||||
Oracle <application>PL/SQL</> functions to PostgreSQL.
|
Oracle <application>PL/SQL</> functions to
|
||||||
|
<productname>PostgreSQL</productname>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.43 2003/09/03 22:05:07 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.44 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="protocol">
|
<chapter id="protocol">
|
||||||
<title>Frontend/Backend Protocol</title>
|
<title>Frontend/Backend Protocol</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<application>PostgreSQL</application> uses a message-based protocol
|
<productname>PostgreSQL</productname> uses a message-based protocol
|
||||||
for communication between frontends and backends (clients and servers).
|
for communication between frontends and backends (clients and servers).
|
||||||
The protocol is supported over <acronym>TCP/IP</acronym> and also over
|
The protocol is supported over <acronym>TCP/IP</acronym> and also over
|
||||||
Unix-domain sockets. Port number 5432 has been registered with IANA as
|
Unix-domain sockets. Port number 5432 has been registered with IANA as
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This document describes version 3.0 of the protocol, implemented in
|
This document describes version 3.0 of the protocol, implemented in
|
||||||
<application>PostgreSQL</application> 7.4 and later. For descriptions
|
<productname>PostgreSQL</productname> 7.4 and later. For descriptions
|
||||||
of the earlier protocol versions, see previous releases of the
|
of the earlier protocol versions, see previous releases of the
|
||||||
<productname>PostgreSQL</productname> documentation. A single server
|
<productname>PostgreSQL</productname> documentation. A single server
|
||||||
can support multiple protocol versions. The initial
|
can support multiple protocol versions. The initial
|
||||||
@ -165,7 +165,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Data of a particular datatype might be transmitted in any of several
|
Data of a particular datatype might be transmitted in any of several
|
||||||
different <firstterm>formats</>. As of <application>PostgreSQL</> 7.4
|
different <firstterm>formats</>. As of <productname>PostgreSQL</> 7.4
|
||||||
the only supported formats are <quote>text</> and <quote>binary</>,
|
the only supported formats are <quote>text</> and <quote>binary</>,
|
||||||
but the protocol makes provision for future extensions. The desired
|
but the protocol makes provision for future extensions. The desired
|
||||||
format for any value is specified by a <firstterm>format code</>.
|
format for any value is specified by a <firstterm>format code</>.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.49 2003/09/09 18:28:52 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.50 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
|
|||||||
directly by the server, not by the client application. Therefore,
|
directly by the server, not by the client application. Therefore,
|
||||||
they must reside on or be accessible to the database server machine,
|
they must reside on or be accessible to the database server machine,
|
||||||
not the client. They must be accessible to and readable or writable
|
not the client. They must be accessible to and readable or writable
|
||||||
by the <application>PostgreSQL</application> user (the user ID the
|
by the <productname>PostgreSQL</productname> user (the user ID the
|
||||||
server runs as), not the client. <command>COPY</command> naming a
|
server runs as), not the client. <command>COPY</command> naming a
|
||||||
file is only allowed to database superusers, since it allows reading
|
file is only allowed to database superusers, since it allows reading
|
||||||
or writing any file that the server has privileges to access.
|
or writing any file that the server has privileges to access.
|
||||||
@ -367,7 +367,7 @@ COPY <replaceable class="parameter">table</replaceable> [ ( <replaceable class="
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The file format used for <command>COPY BINARY</command> changed in
|
The file format used for <command>COPY BINARY</command> changed in
|
||||||
<application>PostgreSQL</application> 7.4. The new format consists
|
<productname>PostgreSQL</productname> 7.4. The new format consists
|
||||||
of a file header, zero or more tuples containing the row data, and
|
of a file header, zero or more tuples containing the row data, and
|
||||||
a file trailer. Headers and data are now in network byte order.
|
a file trailer. Headers and data are now in network byte order.
|
||||||
</para>
|
</para>
|
||||||
@ -474,7 +474,7 @@ to be specified.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
To determine the appropriate binary format for the actual tuple data you
|
To determine the appropriate binary format for the actual tuple data you
|
||||||
should consult the <application>PostgreSQL</application> source, in
|
should consult the <productname>PostgreSQL</productname> source, in
|
||||||
particular the <function>*send</> and <function>*recv</> functions for
|
particular the <function>*send</> and <function>*recv</> functions for
|
||||||
the data type (typically found in the <filename>src/backend/utils/adt</filename>
|
the data type (typically found in the <filename>src/backend/utils/adt</filename>
|
||||||
directory). The <application>contrib/binarycopy</application> module
|
directory). The <application>contrib/binarycopy</application> module
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.51 2003/09/10 20:13:45 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.52 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="SQL-CREATEFUNCTION">
|
<refentry id="SQL-CREATEFUNCTION">
|
||||||
@ -382,7 +382,7 @@ CREATE FUNCTION add(integer, integer) RETURNS integer
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
A <command>CREATE FUNCTION</command> command is defined in SQL99.
|
A <command>CREATE FUNCTION</command> command is defined in SQL99.
|
||||||
The <application>PostgreSQL</application> version is similar but
|
The <productname>PostgreSQL</productname> version is similar but
|
||||||
not fully compatible. The attributes are not portable, neither are the
|
not fully compatible. The attributes are not portable, neither are the
|
||||||
different available languages.
|
different available languages.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.41 2003/09/09 18:28:52 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.42 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<application>PostgreSQL</application> provides the index methods
|
<productname>PostgreSQL</productname> provides the index methods
|
||||||
B-tree, R-tree, hash, and GiST. The B-tree index method is an
|
B-tree, R-tree, hash, and GiST. The B-tree index method is an
|
||||||
implementation of Lehman-Yao high-concurrency B-trees. The R-tree
|
implementation of Lehman-Yao high-concurrency B-trees. The R-tree
|
||||||
index method implements standard R-trees using Guttman's quadratic
|
index method implements standard R-trees using Guttman's quadratic
|
||||||
@ -198,7 +198,7 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
|
|||||||
Currently, only the B-tree and GiST index methods support
|
Currently, only the B-tree and GiST index methods support
|
||||||
multicolumn indexes. Up to 32 fields may be specified by default.
|
multicolumn indexes. Up to 32 fields may be specified by default.
|
||||||
(This limit can be altered when building
|
(This limit can be altered when building
|
||||||
<application>PostgreSQL</application>.) Only B-tree currently
|
<productname>PostgreSQL</productname>.) Only B-tree currently
|
||||||
supports unique indexes.
|
supports unique indexes.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.26 2003/08/31 17:32:22 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.27 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -105,9 +105,9 @@ DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INS
|
|||||||
<para>
|
<para>
|
||||||
Indicates that data retrieved from the cursor should be
|
Indicates that data retrieved from the cursor should be
|
||||||
unaffected by updates to the tables underlying the cursor while
|
unaffected by updates to the tables underlying the cursor while
|
||||||
the cursor exists. In PostgreSQL, all cursors are insensitive;
|
the cursor exists. In <productname>PostgreSQL</productname>,
|
||||||
this key word currently has no effect and is present for
|
all cursors are insensitive; this key word currently has no
|
||||||
compatibility with the SQL standard.
|
effect and is present for compatibility with the SQL standard.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/end.sgml,v 1.10 2003/08/31 17:32:23 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/end.sgml,v 1.11 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -30,9 +30,9 @@ END [ WORK | TRANSACTION ]
|
|||||||
<para>
|
<para>
|
||||||
<command>END</command> commits the current transaction. All changes
|
<command>END</command> commits the current transaction. All changes
|
||||||
made by the transaction become visible to others and are guaranteed
|
made by the transaction become visible to others and are guaranteed
|
||||||
to be durable if a crash occurs. It is a PostgreSQL extension that
|
to be durable if a crash occurs. It is a
|
||||||
is equivalent to <xref linkend="sql-commit"
|
<productname>PostgreSQL</productname> extension that is equivalent
|
||||||
endterm="sql-commit-title">.
|
to <xref linkend="sql-commit" endterm="sql-commit-title">.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.34 2003/08/31 17:32:23 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/grant.sgml,v 1.35 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -375,8 +375,8 @@ GRANT <replaceable class="PARAMETER">privileges</replaceable>
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <literal>RULE</literal> privilege, and privileges on
|
The <literal>RULE</literal> privilege, and privileges on
|
||||||
databases, schemas, languages, and sequences are PostgreSQL
|
databases, schemas, languages, and sequences are
|
||||||
extensions.
|
<productname>PostgreSQL</productname> extensions.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/load.sgml,v 1.18 2003/08/31 17:32:23 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/load.sgml,v 1.19 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="SQL-LOAD">
|
<refentry id="SQL-LOAD">
|
||||||
@ -50,7 +50,7 @@ LOAD '<replaceable class="PARAMETER">filename</replaceable>'
|
|||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>LOAD</command> is a <application>PostgreSQL</application>
|
<command>LOAD</command> is a <productname>PostgreSQL</productname>
|
||||||
extension.
|
extension.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.37 2003/09/09 18:28:53 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.38 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ COMMIT WORK;
|
|||||||
<para>
|
<para>
|
||||||
There is no <command>LOCK TABLE</command> in the SQL standard,
|
There is no <command>LOCK TABLE</command> in the SQL standard,
|
||||||
which instead uses <command>SET TRANSACTION</command> to specify
|
which instead uses <command>SET TRANSACTION</command> to specify
|
||||||
concurrency levels on transactions. PostgreSQL supports that too;
|
concurrency levels on transactions. <productname>PostgreSQL</productname> supports that too;
|
||||||
see <xref linkend="SQL-SET-TRANSACTION"
|
see <xref linkend="SQL-SET-TRANSACTION"
|
||||||
endterm="SQL-SET-TRANSACTION-TITLE"> for details.
|
endterm="SQL-SET-TRANSACTION-TITLE"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.63 2003/08/31 17:32:23 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.64 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -705,7 +705,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
|
|||||||
The <application>pg_dump</application> utility first appeared in
|
The <application>pg_dump</application> utility first appeared in
|
||||||
<application>Postgres95</application> release 0.02. The
|
<application>Postgres95</application> release 0.02. The
|
||||||
non-plain-text output formats were introduced in
|
non-plain-text output formats were introduced in
|
||||||
<application>PostgreSQL</application> release 7.1.
|
<productname>PostgreSQL</productname> release 7.1.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.41 2003/08/31 17:32:24 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.42 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
|
|
||||||
<refentry id="APP-PGRESTORE">
|
<refentry id="APP-PGRESTORE">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
@ -659,7 +659,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <application>pg_restore</application> utility first appeared in
|
The <application>pg_restore</application> utility first appeared in
|
||||||
PostgreSQL 7.1.
|
<productname>PostgreSQL</productname> 7.1.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.19 2003/09/09 18:28:53 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.20 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -46,11 +46,12 @@ REINDEX { DATABASE | TABLE | INDEX } <replaceable class="PARAMETER">name</replac
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The index in question contains a lot of dead index pages that
|
The index in question contains a lot of dead index pages that
|
||||||
are not being reclaimed. This can occur with B-tree indexes in PostgreSQL
|
are not being reclaimed. This can occur with B-tree indexes in
|
||||||
under certain access patterns. <command>REINDEX</command>
|
<productname>PostgreSQL</productname> under certain access
|
||||||
provides a way to reduce the space consumption of the index by
|
patterns. <command>REINDEX</command> provides a way to reduce
|
||||||
writing a new version of the index without the dead pages. See
|
the space consumption of the index by writing a new version of
|
||||||
<xref linkend="routine-reindex"> for more information.
|
the index without the dead pages. See <xref
|
||||||
|
linkend="routine-reindex"> for more information.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.69 2003/08/31 17:32:24 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.70 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -798,10 +798,10 @@ FOR UPDATE [ OF <replaceable class="parameter">table_name</replaceable> [, ...]
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literal>FOR UPDATE</literal> may appear before
|
<literal>FOR UPDATE</literal> may appear before
|
||||||
<literal>LIMIT</literal> for compatibility with PostgreSQL
|
<literal>LIMIT</literal> for compatibility with
|
||||||
versions before 7.3. It effectively executes after
|
<productname>PostgreSQL</productname> versions before 7.3. It
|
||||||
<literal>LIMIT</literal>, however, and so that is the recommended
|
effectively executes after <literal>LIMIT</literal>, however, and
|
||||||
place to write it.
|
so that is the recommended place to write it.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
@ -1008,11 +1008,12 @@ SELECT d.* FROM distributors d;
|
|||||||
SELECT distributors.* FROM distributors d, distributors distributors;
|
SELECT distributors.* FROM distributors d, distributors distributors;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
that he will actually get. To help detect this sort of mistake,
|
that he will actually get. To help detect this sort of mistake,
|
||||||
PostgreSQL will warn if the implicit-<literal>FROM</literal>
|
<productname>PostgreSQL</productname> will warn if the
|
||||||
feature is used in a <command>SELECT</command> statement that also
|
implicit-<literal>FROM</literal> feature is used in a
|
||||||
contains an explicit <literal>FROM</literal> clause. Also, it is
|
<command>SELECT</command> statement that also contains an explicit
|
||||||
possible to disable the implicit-<literal>FROM</literal> feature
|
<literal>FROM</literal> clause. Also, it is possible to disable
|
||||||
by setting the <varname>ADD_MISSING_FROM</> parameter to false.
|
the implicit-<literal>FROM</literal> feature by setting the
|
||||||
|
<varname>ADD_MISSING_FROM</> parameter to false.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.7 2003/08/31 17:32:24 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.8 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
<refentry id="SQL-SET-CONSTRAINTS">
|
<refentry id="SQL-SET-CONSTRAINTS">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
|
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
|
||||||
@ -77,8 +77,9 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable>
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This command complies with the behavior defined in the SQL
|
This command complies with the behavior defined in the SQL
|
||||||
standard, except for the limitation that, in PostgreSQL, it only
|
standard, except for the limitation that, in
|
||||||
applies to foreign-key constraints.
|
<productname>PostgreSQL</productname>, it only applies to
|
||||||
|
foreign-key constraints.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.10 2003/08/31 17:32:24 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.11 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
<refentry id="SQL-SET-SESSION-AUTHORIZATION">
|
<refentry id="SQL-SET-SESSION-AUTHORIZATION">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="sql-set-session-authorization-title">SET SESSION AUTHORIZATION</refentrytitle>
|
<refentrytitle id="sql-set-session-authorization-title">SET SESSION AUTHORIZATION</refentrytitle>
|
||||||
@ -89,10 +89,10 @@ SELECT SESSION_USER, CURRENT_USER;
|
|||||||
<para>
|
<para>
|
||||||
The SQL standard allows some other expressions to appear in place
|
The SQL standard allows some other expressions to appear in place
|
||||||
of the literal <replaceable>username</replaceable> which are not
|
of the literal <replaceable>username</replaceable> which are not
|
||||||
important in practice. <application>PostgreSQL</application>
|
important in practice. <productname>PostgreSQL</productname>
|
||||||
allows identifier syntax (<literal>"username"</literal>), which SQL
|
allows identifier syntax (<literal>"username"</literal>), which SQL
|
||||||
does not. SQL does not allow this command during a transaction;
|
does not. SQL does not allow this command during a transaction;
|
||||||
<application>PostgreSQL</application> does not make this
|
<productname>PostgreSQL</productname> does not make this
|
||||||
restriction because there is no reason to. The privileges
|
restriction because there is no reason to. The privileges
|
||||||
necessary to execute this command are left implementation-defined
|
necessary to execute this command are left implementation-defined
|
||||||
by the standard.
|
by the standard.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.16 2003/09/09 18:28:53 tgl Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.17 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
<refentry id="SQL-SET-TRANSACTION">
|
<refentry id="SQL-SET-TRANSACTION">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
|
<refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
|
||||||
@ -122,7 +122,7 @@ SET default_transaction_isolation = '<replaceable>value</replaceable>'
|
|||||||
<para>
|
<para>
|
||||||
Both commands are defined in the <acronym>SQL</acronym> standard.
|
Both commands are defined in the <acronym>SQL</acronym> standard.
|
||||||
<literal>SERIALIZABLE</literal> is the default transaction
|
<literal>SERIALIZABLE</literal> is the default transaction
|
||||||
isolation level in the standard; in PostgreSQL the default is
|
isolation level in the standard; in <productname>PostgreSQL</productname> the default is
|
||||||
ordinarily <literal>READ COMMITTED</literal>, but you can change it as
|
ordinarily <literal>READ COMMITTED</literal>, but you can change it as
|
||||||
described above. <productname>PostgreSQL</productname> does not
|
described above. <productname>PostgreSQL</productname> does not
|
||||||
provide the isolation levels <literal>READ UNCOMMITTED</literal>
|
provide the isolation levels <literal>READ UNCOMMITTED</literal>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.24 2003/08/31 17:32:24 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.25 2003/09/11 21:42:20 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -164,7 +164,8 @@ UPDATE weather SET temp_lo = temp_lo+1, temp_hi = temp_lo+15, prcp = DEFAULT
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This command conforms to the SQL standard. The
|
This command conforms to the SQL standard. The
|
||||||
<literal>FROM</literal> clause is a PostgreSQL extension.
|
<literal>FROM</literal> clause is a
|
||||||
|
<productname>PostgreSQL</productname> extension.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.206 2003/08/27 03:35:35 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.207 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix id="release">
|
<appendix id="release">
|
||||||
@ -10,8 +10,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.206 2003/08/27 03:35:35 mo
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Below is a subset of the changes that have gone into the
|
Below is a subset of the changes that have gone into the
|
||||||
development branch of PostgreSQL since version 7.3. For a complete
|
development branch of <productname>PostgreSQL</productname> since
|
||||||
list of changes, consult the CVS logs.
|
version 7.3. For a complete list of changes, consult the CVS logs.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.29 2003/08/31 17:32:19 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.30 2003/09/11 21:42:20 momjian Exp $ -->
|
||||||
|
|
||||||
<Chapter Id="rules">
|
<Chapter Id="rules">
|
||||||
<Title>The Rule System</Title>
|
<Title>The Rule System</Title>
|
||||||
@ -8,16 +8,17 @@
|
|||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
This chapter discusses the rule system in PostgreSQL.
|
This chapter discusses the rule system in
|
||||||
Production rule systems are conceptually simple, but
|
<productname>PostgreSQL</productname>. Production rule systems
|
||||||
there are many subtle points involved in actually using
|
are conceptually simple, but there are many subtle points
|
||||||
them.
|
involved in actually using them.
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
Some other database systems define active database rules, which
|
Some other database systems define active database rules, which
|
||||||
are usually stored procedures and triggers. In PostgreSQL, these
|
are usually stored procedures and triggers. In
|
||||||
can be implemented using functions and triggers as well.
|
<productname>PostgreSQL</productname>, these can be implemented
|
||||||
|
using functions and triggers as well.
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.206 2003/09/11 18:30:39 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.207 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -797,7 +797,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
this much time, the server breaks the connection. This prevents
|
this much time, the server breaks the connection. This prevents
|
||||||
hung clients from occupying a connection indefinitely. This
|
hung clients from occupying a connection indefinitely. This
|
||||||
option can only be set at server start or in the
|
option can only be set at server start or in the
|
||||||
<filename>postgresql.conf</filename> file.
|
<filename>postgresql.conf</filename> file. The default is 60.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1028,9 +1028,9 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
PostgreSQL procedural language libraries may be preloaded in
|
<productname>PostgreSQL</productname> procedural language
|
||||||
this way, typically by using the syntax
|
libraries may be preloaded in this way, typically by using the
|
||||||
<literal>'$libdir/plXXX:plXXX_init'</literal> where
|
syntax <literal>'$libdir/plXXX:plXXX_init'</literal> where
|
||||||
<literal>XXX</literal> is <literal>pgsql</>, <literal>perl</>,
|
<literal>XXX</literal> is <literal>pgsql</>, <literal>perl</>,
|
||||||
<literal>tcl</>, or <literal>python</>.
|
<literal>tcl</>, or <literal>python</>.
|
||||||
</para>
|
</para>
|
||||||
@ -1228,11 +1228,11 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
These configuration parameters provide a crude method for
|
These configuration parameters provide a crude method for
|
||||||
influencing the query plans chosen by the query optimizer. If
|
influencing the query plans chosen by the query optimizer. If
|
||||||
the default plan chosen by the optimizer is not optimal, a
|
the default plan chosen by the optimizer for a particular query
|
||||||
temporary solution may be found by using one of these
|
is not optimal, a temporary solution may be found by using one
|
||||||
configuration parameters to force the optimizer to choose a
|
of these configuration parameters to force the optimizer to
|
||||||
better plan. Other ways to improve the quality of the plans
|
choose a better plan. Other ways to improve the quality of the
|
||||||
chosen by the optimizer include configuring the <xref
|
plans chosen by the optimizer include configuring the <xref
|
||||||
linkend="runtime-config-query-constants"
|
linkend="runtime-config-query-constants"
|
||||||
endterm="runtime-config-query-constants-title">, running
|
endterm="runtime-config-query-constants-title">, running
|
||||||
<command>ANALYZE</command> more frequently, and increasing the
|
<command>ANALYZE</command> more frequently, and increasing the
|
||||||
@ -1370,7 +1370,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
disk cache (that is, the portion of the kernel's disk cache
|
disk cache (that is, the portion of the kernel's disk cache
|
||||||
that will be used for <productname>PostgreSQL</productname>
|
that will be used for <productname>PostgreSQL</productname>
|
||||||
data files). This is measured in disk pages, which are
|
data files). This is measured in disk pages, which are
|
||||||
normally 8192 bytes each.
|
normally 8192 bytes each. The default is 1000.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1382,8 +1382,9 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
Sets the query planner's estimate of the cost of a
|
Sets the query planner's estimate of the cost of a
|
||||||
nonsequentially fetched disk page. This is measured as a
|
nonsequentially fetched disk page. This is measured as a
|
||||||
multiple of the cost of a sequential page fetch. A higher
|
multiple of the cost of a sequential page fetch. A higher
|
||||||
value makes it more likely a sequential scan will be used,
|
value makes it more likely a sequential scan will be used, a
|
||||||
a lower value makes it more likely an index scan will be used.
|
lower value makes it more likely an index scan will be
|
||||||
|
used. The default is four.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1394,7 +1395,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
Sets the query planner's estimate of the cost of processing
|
Sets the query planner's estimate of the cost of processing
|
||||||
each tuple during a query. This is measured as a fraction of
|
each tuple during a query. This is measured as a fraction of
|
||||||
the cost of a sequential page fetch.
|
the cost of a sequential page fetch. The default is 0.01.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1405,7 +1406,8 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
Sets the query planner's estimate of the cost of processing
|
Sets the query planner's estimate of the cost of processing
|
||||||
each index tuple during an index scan. This is measured as a
|
each index tuple during an index scan. This is measured as a
|
||||||
fraction of the cost of a sequential page fetch.
|
fraction of the cost of a sequential page fetch. The default
|
||||||
|
is 0.001.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1416,7 +1418,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
Sets the planner's estimate of the cost of processing each
|
Sets the planner's estimate of the cost of processing each
|
||||||
operator in a <literal>WHERE</> clause. This is measured as a fraction of
|
operator in a <literal>WHERE</> clause. This is measured as a fraction of
|
||||||
the cost of a sequential page fetch.
|
the cost of a sequential page fetch. The default is 0.0025.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1502,7 +1504,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
had a column-specific target set via <command>ALTER TABLE SET
|
had a column-specific target set via <command>ALTER TABLE SET
|
||||||
STATISTICS</>. Larger values increase the time needed to do
|
STATISTICS</>. Larger values increase the time needed to do
|
||||||
<command>ANALYZE</>, but may improve the quality of the planner's
|
<command>ANALYZE</>, but may improve the quality of the planner's
|
||||||
estimates. The default value is 10.
|
estimates. The default is 10.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1650,8 +1652,8 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Controls the amount of detail written in the server log for each
|
Controls the amount of detail written in the server log for each
|
||||||
message that is logged. Valid values are <literal>terse</>,
|
message that is logged. Valid values are <literal>TERSE</>,
|
||||||
<literal>default</>, and <literal>verbose</>, each adding more
|
<literal>DEFAULT</>, and <literal>VERBOSE</>, each adding more
|
||||||
fields to displayed messages.
|
fields to displayed messages.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -1813,14 +1815,15 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<term><varname>debug_pretty_print</varname> (<type>boolean</type>)</term>
|
<term><varname>debug_pretty_print</varname> (<type>boolean</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
These options enable various debugging output to be sent to the
|
These options enable various debugging output to be sent to
|
||||||
client or server log. For each executed query, they print the resulting
|
the client or server log. For each executed query, they print
|
||||||
parse tree, the query rewriter output, or the execution plan.
|
the resulting parse tree, the query rewriter output, or the
|
||||||
<option>DEBUG_PRETTY_PRINT</option> indents these displays to
|
execution plan. <varname>debug_pretty_print</varname> indents
|
||||||
produce a more readable but much longer output format.
|
these displays to produce a more readable but much longer
|
||||||
<option>CLIENT_MIN_MESSAGES</option> or <option>LOG_MIN_MESSAGES</option>
|
output format. <varname>client_min_messages</varname> or
|
||||||
must be <literal>DEBUG1</literal> or lower to send output to the client
|
<varname>log_min_messages</varname> must be
|
||||||
or server logs.
|
<literal>DEBUG1</literal> or lower to send output to the
|
||||||
|
client or server logs. These options are off by default.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1845,7 +1848,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
Causes the duration of every completed statement to be logged.
|
Causes the duration of every completed statement to be logged.
|
||||||
To use this option, enable <varname>log_statement</> and
|
To use this option, enable <varname>log_statement</> and
|
||||||
<varname>log_pid</> so you can link the statement to the
|
<varname>log_pid</> so you can link the statement to the
|
||||||
duration using the process ID.
|
duration using the process ID. The default is off.
|
||||||
Only superusers can turn off this option if it is enabled by
|
Only superusers can turn off this option if it is enabled by
|
||||||
the administrator.
|
the administrator.
|
||||||
</para>
|
</para>
|
||||||
@ -1869,7 +1872,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<term><varname>log_statement</varname> (<type>boolean</type>)</term>
|
<term><varname>log_statement</varname> (<type>boolean</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Causes each SQL statement to be logged.
|
Causes each SQL statement to be logged. The default is off.
|
||||||
Only superusers can turn off this option if it is enabled by
|
Only superusers can turn off this option if it is enabled by
|
||||||
the administrator.
|
the administrator.
|
||||||
</para>
|
</para>
|
||||||
@ -1932,9 +1935,9 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<para>
|
<para>
|
||||||
For each query, write performance statistics of the respective
|
For each query, write performance statistics of the respective
|
||||||
module to the server log. This is a crude profiling
|
module to the server log. This is a crude profiling
|
||||||
instrument.
|
instrument. All of these options are disabled by default.
|
||||||
Only superusers can turn off this option if it is enabled by
|
Only superusers can turn off any of these options if they have
|
||||||
the administrator.
|
been enabled by the administrator.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2127,7 +2130,8 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Aborts any statement that takes over the specified number of
|
Aborts any statement that takes over the specified number of
|
||||||
milliseconds. A value of zero turns off the timer.
|
milliseconds. A value of zero turns off the timer, which is
|
||||||
|
the default value.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2300,8 +2304,9 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<term><varname>explain_pretty_print</varname> (<type>boolean</type>)</term>
|
<term><varname>explain_pretty_print</varname> (<type>boolean</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Determines whether <command>EXPLAIN VERBOSE</> uses the indented
|
Determines whether <command>EXPLAIN VERBOSE</> uses the
|
||||||
or non-indented format for displaying detailed query-tree dumps.
|
indented or non-indented format for displaying detailed
|
||||||
|
query-tree dumps. The default is on.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2357,9 +2362,9 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the maximum expression nesting depth of the parser. The
|
Sets the maximum expression nesting depth of the parser. The
|
||||||
default value is high enough for any normal query, but you can
|
default value of 10000 is high enough for any normal query,
|
||||||
raise it if needed. (But if you raise it too high, you run
|
but you can raise it if needed. (But if you raise it too high,
|
||||||
the risk of server crashes due to stack overflow.)
|
you run the risk of server crashes due to stack overflow.)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2409,7 +2414,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The shared lock table is sized on the assumption that at most
|
The shared lock table is sized on the assumption that at most
|
||||||
<varname>max_locks_per_transaction</> *
|
<varname>max_locks_per_transaction</varname> *
|
||||||
<varname>max_connections</varname> distinct objects will need to
|
<varname>max_connections</varname> distinct objects will need to
|
||||||
be locked at any one time. The default, 64, has historically
|
be locked at any one time. The default, 64, has historically
|
||||||
proven sufficient, but you might need to raise this value if you
|
proven sufficient, but you might need to raise this value if you
|
||||||
@ -2453,7 +2458,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<para>
|
<para>
|
||||||
The regular expression <quote>flavor</> can be set to
|
The regular expression <quote>flavor</> can be set to
|
||||||
<literal>advanced</>, <literal>extended</>, or <literal>basic</>.
|
<literal>advanced</>, <literal>extended</>, or <literal>basic</>.
|
||||||
The usual default is <literal>advanced</>. The <literal>extended</>
|
The default is <literal>advanced</>. The <literal>extended</>
|
||||||
setting may be useful for exact backwards compatibility with
|
setting may be useful for exact backwards compatibility with
|
||||||
pre-7.4 releases of <productname>PostgreSQL</>.
|
pre-7.4 releases of <productname>PostgreSQL</>.
|
||||||
</para>
|
</para>
|
||||||
@ -2533,13 +2538,13 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<title>Developer Options</title>
|
<title>Developer Options</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following options are intended for work on the PostgreSQL source,
|
The following options are intended for work on the
|
||||||
and in some cases to assist with recovery of
|
<productname>PostgreSQL</productname> source, and in some cases
|
||||||
severely damaged databases. There should be no reason to use them in
|
to assist with recovery of severely damaged databases. There
|
||||||
a production database setup. As such, they have been excluded from the
|
should be no reason to use them in a production database setup.
|
||||||
sample <filename>postgresql.conf</> file.
|
As such, they have been excluded from the sample
|
||||||
Note that many of these options require special
|
<filename>postgresql.conf</> file. Note that many of these
|
||||||
source compilation flags to work at all.
|
options require special source compilation flags to work at all.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
@ -2580,9 +2585,9 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<para>
|
<para>
|
||||||
Generates a great amount of debugging output for the
|
Generates a great amount of debugging output for the
|
||||||
<command>LISTEN</command> and <command>NOTIFY</command>
|
<command>LISTEN</command> and <command>NOTIFY</command>
|
||||||
commands.
|
commands. <varname>client_min_messages</varname> or
|
||||||
<option>CLIENT_MIN_MESSAGES</option> or <option>LOG_MIN_MESSAGES</option>
|
<varname>log_min_messages</varname> must be
|
||||||
must be <literal>DEBUG1</literal> or lower to send this output to the
|
<literal>DEBUG1</literal> or lower to send this output to the
|
||||||
client or server log, respectively.
|
client or server log, respectively.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.73 2003/08/31 17:32:20 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.74 2003/09/11 21:42:20 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<sect1 id="xfunc">
|
<sect1 id="xfunc">
|
||||||
@ -814,15 +814,15 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
To know how to write C-language functions, you need to know how
|
To know how to write C-language functions, you need to know how
|
||||||
PostgreSQL internally represents base data types and how they can
|
<productname>PostgreSQL</productname> internally represents base
|
||||||
be passed to and from functions.
|
data types and how they can be passed to and from functions.
|
||||||
Internally, <productname>PostgreSQL</productname> regards a
|
Internally, <productname>PostgreSQL</productname> regards a base
|
||||||
base type as a <quote>blob of memory</quote>. The user-defined
|
type as a <quote>blob of memory</quote>. The user-defined
|
||||||
functions that you define over a type in turn define the
|
functions that you define over a type in turn define the way that
|
||||||
way that <productname>PostgreSQL</productname> can operate
|
<productname>PostgreSQL</productname> can operate on it. That
|
||||||
on it. That is, <productname>PostgreSQL</productname> will
|
is, <productname>PostgreSQL</productname> will only store and
|
||||||
only store and retrieve the data from disk and use your
|
retrieve the data from disk and use your user-defined functions
|
||||||
user-defined functions to input, process, and output the data.
|
to input, process, and output the data.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1249,13 +1249,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here, <replaceable>DIRECTORY</replaceable> stands for the
|
Here, <replaceable>DIRECTORY</replaceable> stands for the
|
||||||
directory of the shared library file (for instance the PostgreSQL
|
directory of the shared library file (for instance the
|
||||||
tutorial directory, which contains the code for the examples used
|
<productname>PostgreSQL</productname> tutorial directory, which
|
||||||
in this section). (Better style would be to use just
|
contains the code for the examples used in this section).
|
||||||
<literal>'funcs'</> in the <literal>AS</> clause, after having
|
(Better style would be to use just <literal>'funcs'</> in the
|
||||||
added <replaceable>DIRECTORY</replaceable> to the search path.
|
<literal>AS</> clause, after having added
|
||||||
In any case, we may omit the system-specific extension for a
|
<replaceable>DIRECTORY</replaceable> to the search path. In any
|
||||||
shared library, commonly <literal>.so</literal> or
|
case, we may omit the system-specific extension for a shared
|
||||||
|
library, commonly <literal>.so</literal> or
|
||||||
<literal>.sl</literal>.)
|
<literal>.sl</literal>.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -1483,15 +1484,16 @@ concat_text(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before we turn to the more advanced topics, we should discuss
|
Before we turn to the more advanced topics, we should discuss
|
||||||
some coding rules for PostgreSQL C-language functions. While it
|
some coding rules for <productname>PostgreSQL</productname>
|
||||||
may be possible to load functions written in languages other than
|
C-language functions. While it may be possible to load functions
|
||||||
C into <productname>PostgreSQL</productname>, this is usually
|
written in languages other than C into
|
||||||
difficult (when it is possible at all) because other languages,
|
<productname>PostgreSQL</productname>, this is usually difficult
|
||||||
such as C++, FORTRAN, or Pascal often do not follow the same
|
(when it is possible at all) because other languages, such as
|
||||||
calling convention as C. That is, other languages do not pass
|
C++, FORTRAN, or Pascal often do not follow the same calling
|
||||||
argument and return values between functions in the same way.
|
convention as C. That is, other languages do not pass argument
|
||||||
For this reason, we will assume that your C-language functions
|
and return values between functions in the same way. For this
|
||||||
are actually written in C.
|
reason, we will assume that your C-language functions are
|
||||||
|
actually written in C.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user