Commit 2475e874 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Deprecate 'current' for date/time input.

Fix up references to "PostgreSQL" rather than "Postgres". Was roughly
 evenly split between the two before. ref/ files not yet done.
parent eec9511f
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.24 2001/11/19 23:17:38 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.25 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="tutorial-advanced"> <chapter id="tutorial-advanced">
...@@ -215,7 +215,7 @@ UPDATE branches SET balance = balance + 100.00 ...@@ -215,7 +215,7 @@ UPDATE branches SET balance = balance + 100.00
</para> </para>
<para> <para>
In <productname>Postgres</>, a transaction is set up by surrounding In <productname>PostgreSQL</>, a transaction is set up by surrounding
the SQL commands of the transaction with the SQL commands of the transaction with
<command>BEGIN</> and <command>COMMIT</> commands. So our banking <command>BEGIN</> and <command>COMMIT</> commands. So our banking
transaction would actually look like transaction would actually look like
...@@ -233,7 +233,7 @@ COMMIT; ...@@ -233,7 +233,7 @@ COMMIT;
</para> </para>
<para> <para>
<productname>Postgres</> actually treats every SQL statement as being <productname>PostgreSQL</> actually treats every SQL statement as being
executed within a transaction. If you don't issue a <command>BEGIN</> executed within a transaction. If you don't issue a <command>BEGIN</>
command, command,
then each individual statement has an implicit <command>BEGIN</> and then each individual statement has an implicit <command>BEGIN</> and
...@@ -316,7 +316,7 @@ CREATE TABLE capitals ( ...@@ -316,7 +316,7 @@ CREATE TABLE capitals (
<structfield>population</>, and <structfield>altitude</>) from its <structfield>population</>, and <structfield>altitude</>) from its
<firstterm>parent</firstterm>, <classname>cities</classname>. The <firstterm>parent</firstterm>, <classname>cities</classname>. The
type of the column <structfield>name</structfield> is type of the column <structfield>name</structfield> is
<type>text</type>, a native <productname>Postgres</productname> <type>text</type>, a native <productname>PostgreSQL</productname>
type for variable length character strings. State capitals have type for variable length character strings. State capitals have
an extra column, state, that shows their state. In an extra column, state, that shows their state. In
<productname>PostgreSQL</productname>, a table can inherit from <productname>PostgreSQL</productname>, a table can inherit from
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.16 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="overview"> <chapter id="overview">
...@@ -17,11 +17,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -17,11 +17,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<para> <para>
This chapter gives an overview of the internal structure of the This chapter gives an overview of the internal structure of the
backend of <productname>Postgres</productname>. backend of <productname>PostgreSQL</productname>.
After having read the following sections you After having read the following sections you
should have an idea of how a query is processed. Don't expect a should have an idea of how a query is processed. Don't expect a
detailed description here (I think such a description dealing with detailed description here (I think such a description dealing with
all data structures and functions used within <productname>Postgres</productname> all data structures and functions used within <productname>PostgreSQL</productname>
would exceed 1000 would exceed 1000
pages!). This chapter is intended to help understanding the general pages!). This chapter is intended to help understanding the general
control and data flow within the backend from receiving a query to control and data flow within the backend from receiving a query to
...@@ -39,7 +39,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -39,7 +39,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<procedure> <procedure>
<step> <step>
<para> <para>
A connection from an application program to the <productname>Postgres</productname> A connection from an application program to the <productname>PostgreSQL</productname>
server has to be established. The application program transmits a server has to be established. The application program transmits a
query to the server and receives the results sent back by the server. query to the server and receives the results sent back by the server.
</para> </para>
...@@ -109,7 +109,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -109,7 +109,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<para> <para>
In the following sections we will cover every of the above listed items In the following sections we will cover every of the above listed items
in more detail to give a better understanding on <productname>Postgres</productname>'s internal in more detail to give a better understanding on <productname>PostgreSQL</productname>'s internal
control and data structures. control and data structures.
</para> </para>
</sect1> </sect1>
...@@ -118,7 +118,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -118,7 +118,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<title>How Connections are Established</title> <title>How Connections are Established</title>
<para> <para>
<productname>Postgres</productname> is implemented using a simple "process per-user" <productname>PostgreSQL</productname> is implemented using a simple "process per-user"
client/server model. In this model there is one <firstterm>client process</firstterm> client/server model. In this model there is one <firstterm>client process</firstterm>
connected to exactly one <firstterm>server process</firstterm>. connected to exactly one <firstterm>server process</firstterm>.
As we don't know <foreignphrase>per se</foreignphrase> As we don't know <foreignphrase>per se</foreignphrase>
...@@ -142,7 +142,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -142,7 +142,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
interactive SQL queries) or any user application implemented using interactive SQL queries) or any user application implemented using
the <filename>libpg</filename> library. Note that applications implemented using the <filename>libpg</filename> library. Note that applications implemented using
<application>ecpg</application> <application>ecpg</application>
(the <productname>Postgres</productname> embedded SQL preprocessor for C) (the <productname>PostgreSQL</productname> embedded SQL preprocessor for C)
also use this library. also use this library.
</para> </para>
...@@ -236,7 +236,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -236,7 +236,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<para> <para>
The mentioned transformations and compilations are normally done The mentioned transformations and compilations are normally done
automatically using the <firstterm>makefiles</firstterm> automatically using the <firstterm>makefiles</firstterm>
shipped with the <productname>Postgres</productname> shipped with the <productname>PostgreSQL</productname>
source distribution. source distribution.
</para> </para>
</note> </note>
...@@ -255,7 +255,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe ...@@ -255,7 +255,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/arch-dev.sgml,v 2.15 2001/11/08 23:34:33 pe
<para> <para>
For a better understanding of the data structures used in For a better understanding of the data structures used in
<productname>Postgres</productname> <productname>PostgreSQL</productname>
for the processing of a query we use an example to illustrate the for the processing of a query we use an example to illustrate the
changes made to these data structures in every stage. changes made to these data structures in every stage.
This example contains the following simple query that will be used in This example contains the following simple query that will be used in
...@@ -443,13 +443,13 @@ current context are performed. ...@@ -443,13 +443,13 @@ current context are performed.
</sect1> </sect1>
<sect1 id="rule-system"> <sect1 id="rule-system">
<title>The <productname>Postgres</productname> Rule System</title> <title>The <productname>PostgreSQL</productname> Rule System</title>
<para> <para>
<productname>Postgres</productname> supports a powerful <productname>PostgreSQL</productname> supports a powerful
<firstterm>rule system</firstterm> for the specification <firstterm>rule system</firstterm> for the specification
of <firstterm>views</firstterm> and ambiguous <firstterm>view updates</firstterm>. of <firstterm>views</firstterm> and ambiguous <firstterm>view updates</firstterm>.
Originally the <productname>Postgres</productname> Originally the <productname>PostgreSQL</productname>
rule system consisted of two implementations: rule system consisted of two implementations:
<itemizedlist> <itemizedlist>
...@@ -459,7 +459,7 @@ current context are performed. ...@@ -459,7 +459,7 @@ current context are performed.
implemented deep in the <firstterm>executor</firstterm>. The rule system was implemented deep in the <firstterm>executor</firstterm>. The rule system was
called whenever an individual tuple had been accessed. This called whenever an individual tuple had been accessed. This
implementation was removed in 1995 when the last official release implementation was removed in 1995 when the last official release
of the <productname>Postgres</productname> project was transformed into of the <productname>PostgreSQL</productname> project was transformed into
<productname>Postgres95</productname>. <productname>Postgres95</productname>.
</para> </para>
</listitem> </listitem>
...@@ -478,7 +478,7 @@ current context are performed. ...@@ -478,7 +478,7 @@ current context are performed.
<para> <para>
For information on the syntax and creation of rules in the For information on the syntax and creation of rules in the
<productname>Postgres</productname> system refer to <productname>PostgreSQL</productname> system refer to
<citetitle>The PostgreSQL User's Guide</citetitle>. <citetitle>The PostgreSQL User's Guide</citetitle>.
</para> </para>
...@@ -700,7 +700,7 @@ current context are performed. ...@@ -700,7 +700,7 @@ current context are performed.
Another task performed by the planner/optimizer is fixing the Another task performed by the planner/optimizer is fixing the
<firstterm>operator ids</firstterm> in the <literal>Expr</literal> <firstterm>operator ids</firstterm> in the <literal>Expr</literal>
and <literal>Oper</literal> nodes. As and <literal>Oper</literal> nodes. As
mentioned earlier, <productname>Postgres</productname> supports a variety of different data mentioned earlier, <productname>PostgreSQL</productname> supports a variety of different data
types and even user defined types can be used. To be able to maintain types and even user defined types can be used. To be able to maintain
the huge amount of functions and operators it is necessary to store the huge amount of functions and operators it is necessary to store
them in a system table. Each function and operator gets a unique them in a system table. Each function and operator gets a unique
...@@ -1181,7 +1181,7 @@ transformInsertStmt()} above have been added here as well. ...@@ -1181,7 +1181,7 @@ transformInsertStmt()} above have been added here as well.
\subsubsection{The Rewrite System} \subsubsection{The Rewrite System}
This section describes the changes to the {\it rewrite system} of This section describes the changes to the {\it rewrite system} of
<productname>Postgres</productname> that have been necessary to support the use of {\it views} <productname>PostgreSQL</productname> that have been necessary to support the use of {\it views}
within queries using a {\it having clause} and to support the within queries using a {\it having clause} and to support the
definition of {\it views} by queries using a {\it having clause}. definition of {\it views} by queries using a {\it having clause}.
...@@ -1395,7 +1395,7 @@ items. Note that it is not necessary to understand the meaning of ...@@ -1395,7 +1395,7 @@ items. Note that it is not necessary to understand the meaning of
every single source line here and therefore we will not discuss every single source line here and therefore we will not discuss
detailed questions like "Why has the variable {\tt varno} to be detailed questions like "Why has the variable {\tt varno} to be
increased by 3?". Questions like that belong to a chapter dealing increased by 3?". Questions like that belong to a chapter dealing
with the implementation of {\it views} in <productname>Postgres</productname> and to be able to with the implementation of {\it views} in <productname>PostgreSQL</productname> and to be able to
answer them it would be necessary to know all the functions and not answer them it would be necessary to know all the functions and not
only those described here. The fact important for us is to make sure, only those described here. The fact important for us is to make sure,
that whatever is applied to the {\it targetlist} and the data that whatever is applied to the {\it targetlist} and the data
...@@ -1538,7 +1538,7 @@ examined. ...@@ -1538,7 +1538,7 @@ examined.
% %
<step> {\tt QueryRewrite()} \\ <step> {\tt QueryRewrite()} \\
This function takes the {\it parsetree} of a query and rewrites it This function takes the {\it parsetree} of a query and rewrites it
using <productname>Postgres</productname>'s {\it rewrite system}. Before the query itself can be using <productname>PostgreSQL</productname>'s {\it rewrite system}. Before the query itself can be
rewritten, subqueries that are possibly part of the query have to be rewritten, subqueries that are possibly part of the query have to be
processed. Therefore the function {\tt QueryRewriteSubLink()} is processed. Therefore the function {\tt QueryRewriteSubLink()} is
called for the {\it where clause} and for the {\it having clause}. called for the {\it where clause} and for the {\it having clause}.
...@@ -2750,7 +2750,7 @@ produced by the {\it parser stage} that can be executed by the {\it ...@@ -2750,7 +2750,7 @@ produced by the {\it parser stage} that can be executed by the {\it
executor}. In most cases there are several ways (paths) with different executor}. In most cases there are several ways (paths) with different
cost to get to the same result. It's the {\it planner/optimizer's} cost to get to the same result. It's the {\it planner/optimizer's}
task to find out which path is the cheapest and to create a {\it plan} task to find out which path is the cheapest and to create a {\it plan}
using this path. The implementation of {\it unions} in <productname>Postgres</productname> is using this path. The implementation of {\it unions} in <productname>PostgreSQL</productname> is
based on the following idea: \\ based on the following idea: \\
\\ \\
The set derived by evaluating $A \cup B$ must contain every member of The set derived by evaluating $A \cup B$ must contain every member of
...@@ -2786,7 +2786,7 @@ and the sort is just performed to make its work easier. ...@@ -2786,7 +2786,7 @@ and the sort is just performed to make its work easier.
\subsection{How Intersect, Except and Union Work Together} \subsection{How Intersect, Except and Union Work Together}
The last section showed that every stage ({\it parser stage}, {\it The last section showed that every stage ({\it parser stage}, {\it
planner/optimizer}, {\it executor}) of <productname>Postgres</productname> has to provide planner/optimizer}, {\it executor}) of <productname>PostgreSQL</productname> has to provide
features in order to support {\it union} statements. For the features in order to support {\it union} statements. For the
implementation of {\it intersect} and {\it except} statements (and implementation of {\it intersect} and {\it except} statements (and
statements involving all {\it set operators}) we choose a different approach statements involving all {\it set operators}) we choose a different approach
...@@ -3039,7 +3039,7 @@ file {\tt $\ldots$/src/backend/parser/keywords.c}: ...@@ -3039,7 +3039,7 @@ file {\tt $\ldots$/src/backend/parser/keywords.c}:
}; };
\end{verbatim} \end{verbatim}
% %
<step> <productname>Postgres</productname> contains functions to convert the internal <step> <productname>PostgreSQL</productname> contains functions to convert the internal
representation of a {\it parsetree} or {\it plantree} into an ASCII representation of a {\it parsetree} or {\it plantree} into an ASCII
representation (that can easily be printed to the screen (for representation (that can easily be printed to the screen (for
debugging purposes) or be stored in a file) and vice versa. These debugging purposes) or be stored in a file) and vice versa. These
...@@ -3629,7 +3629,7 @@ troubles in the {\it transforming logic}. ...@@ -3629,7 +3629,7 @@ troubles in the {\it transforming logic}.
\end{figure} \end{figure}
% %
<step> Transform the new {\it operator tree} into DNF (disjunctive normal <step> Transform the new {\it operator tree} into DNF (disjunctive normal
form). <productname>Postgres</productname> does not provide any function for the transformation form). <productname>PostgreSQL</productname> does not provide any function for the transformation
into DNF but it provides a function {\tt cnfify()} that performs a into DNF but it provides a function {\tt cnfify()} that performs a
transformation into CNF (conjunctive normal form). So we can easily transformation into CNF (conjunctive normal form). So we can easily
make use of this function when we exchange every {\tt OR} with an {\tt make use of this function when we exchange every {\tt OR} with an {\tt
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<TITLE>Architecture</TITLE> <TITLE>Architecture</TITLE>
<Sect1 id="arch-pg-concepts"> <Sect1 id="arch-pg-concepts">
<Title><ProductName>Postgres</ProductName> Architectural Concepts</Title> <Title><ProductName>PostgreSQL</ProductName> Architectural Concepts</Title>
<Para> <Para>
Before we begin, you should understand the basic Before we begin, you should understand the basic
<ProductName>Postgres</ProductName> system architecture. Understanding how the <ProductName>PostgreSQL</ProductName> system architecture. Understanding how the
parts of <ProductName>Postgres</ProductName> interact will make the next chapter parts of <ProductName>PostgreSQL</ProductName> interact will make the next chapter
somewhat clearer. somewhat clearer.
In database jargon, <ProductName>Postgres</ProductName> uses a simple "process In database jargon, <ProductName>PostgreSQL</ProductName> uses a simple "process
per-user" client/server model. A <ProductName>Postgres</ProductName> session per-user" client/server model. A <ProductName>PostgreSQL</ProductName> session
consists of the following cooperating Unix processes (programs): consists of the following cooperating Unix processes (programs):
<ItemizedList> <ItemizedList>
...@@ -80,15 +80,15 @@ From that point on, the frontend process and the backend ...@@ -80,15 +80,15 @@ From that point on, the frontend process and the backend
</Para> </Para>
<Para> <Para>
You should also be aware that the <Application>postmaster</Application> and You should also be aware that the <Application>postmaster</Application> and
postgres servers run with the user-id of the <ProductName>Postgres</ProductName> postgres servers run with the user-id of the <ProductName>PostgreSQL</ProductName>
<quote>superuser</>. <quote>superuser</>.
Note that the <ProductName>Postgres</ProductName> superuser does not Note that the <ProductName>PostgreSQL</ProductName> superuser does not
have to be any particular user (e.g., a user named have to be any particular user (e.g., a user named
<literal>postgres</literal>), although many systems are installed that way. <literal>postgres</literal>), although many systems are installed that way.
Furthermore, the <ProductName>Postgres</ProductName> superuser should Furthermore, the <ProductName>PostgreSQL</ProductName> superuser should
definitely not be the Unix superuser, <literal>root</literal>! definitely not be the Unix superuser, <literal>root</literal>!
It is safest if the <ProductName>Postgres</ProductName> superuser is an It is safest if the <ProductName>PostgreSQL</ProductName> superuser is an
ordinary, unprivileged user so far as the surrounding Unix system is ordinary, unprivileged user so far as the surrounding Unix system is
concerned. concerned.
In any case, all files relating to a database should belong to In any case, all files relating to a database should belong to
...@@ -96,3 +96,21 @@ concerned. ...@@ -96,3 +96,21 @@ concerned.
</Para> </Para>
</sect1> </sect1>
</Chapter> </Chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.15 2001/11/19 09:05:00 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.16 2001/11/21 05:53:40 thomas Exp $ -->
<chapter id="arrays"> <chapter id="arrays">
<title>Arrays</title> <title>Arrays</title>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> allows columns of a table to be <productname>PostgreSQL</productname> allows columns of a table to be
defined as variable-length multidimensional arrays. Arrays of any defined as variable-length multidimensional arrays. Arrays of any
built-in type or user-defined type can be created. To illustrate built-in type or user-defined type can be created. To illustrate
their use, we create this table: their use, we create this table:
...@@ -66,7 +66,7 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] &lt;&gt; pay_by_quarter[2]; ...@@ -66,7 +66,7 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] &lt;&gt; pay_by_quarter[2];
</programlisting> </programlisting>
The array subscript numbers are written within square brackets. The array subscript numbers are written within square brackets.
<productname>Postgres</productname> uses the <productname>PostgreSQL</productname> uses the
<quote>one-based</quote> numbering convention for arrays, that is, <quote>one-based</quote> numbering convention for arrays, that is,
an array of n elements starts with <literal>array[1]</literal> and an array of n elements starts with <literal>array[1]</literal> and
ends with <literal>array[n]</literal>. ends with <literal>array[n]</literal>.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.21 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="backup"> <chapter id="backup">
<title>Backup and Restore</title> <title>Backup and Restore</title>
...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl ...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl
<indexterm zone="backup"><primary>backup</></> <indexterm zone="backup"><primary>backup</></>
<para> <para>
As everything that contains valuable data, <productname>Postgres</> As everything that contains valuable data, <productname>PostgreSQL</>
databases should be backed up regularly. While the procedure is databases should be backed up regularly. While the procedure is
essentially simple, it is important to have a basic understanding of essentially simple, it is important to have a basic understanding of
the underlying techniques and assumptions. the underlying techniques and assumptions.
...@@ -15,7 +15,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl ...@@ -15,7 +15,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl
<para> <para>
There are two fundamentally different approaches to backing up There are two fundamentally different approaches to backing up
<productname>Postgres</> data: <productname>PostgreSQL</> data:
<itemizedlist> <itemizedlist>
<listitem><para><acronym>SQL</> dump</para></listitem> <listitem><para><acronym>SQL</> dump</para></listitem>
<listitem><para>File system level backup</para></listitem> <listitem><para>File system level backup</para></listitem>
...@@ -29,7 +29,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl ...@@ -29,7 +29,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.20 2001/11/18 22:27:00 tgl
The idea behind this method is to generate a text file with SQL The idea behind this method is to generate a text file with SQL
commands that, when fed back to the server, will recreate the commands that, when fed back to the server, will recreate the
database in the same state as it was at the time of the dump. database in the same state as it was at the time of the dump.
<productname>Postgres</> provides the utility program <productname>PostgreSQL</> provides the utility program
<application>pg_dump</> for this purpose. The basic usage of this <application>pg_dump</> for this purpose. The basic usage of this
command is: command is:
<synopsis> <synopsis>
...@@ -40,7 +40,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl ...@@ -40,7 +40,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
</para> </para>
<para> <para>
<application>pg_dump</> is a regular <productname>Postgres</> <application>pg_dump</> is a regular <productname>PostgreSQL</>
client application (albeit a particularly clever one). This means client application (albeit a particularly clever one). This means
that you can do this backup procedure from any remote host that has that you can do this backup procedure from any remote host that has
access to the database. But remember that <application>pg_dump</> access to the database. But remember that <application>pg_dump</>
...@@ -62,7 +62,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl ...@@ -62,7 +62,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
</para> </para>
<para> <para>
As any other <productname>Postgres</> client application, As any other <productname>PostgreSQL</> client application,
<application>pg_dump</> will by default connect with the database <application>pg_dump</> will by default connect with the database
user name that is equal to the current Unix user name. To override user name that is equal to the current Unix user name. To override
this, either specify the <option>-U</option> option or set the this, either specify the <option>-U</option> option or set the
...@@ -182,7 +182,7 @@ pg_dumpall &gt; <replaceable>outfile</> ...@@ -182,7 +182,7 @@ pg_dumpall &gt; <replaceable>outfile</>
</note> </note>
<para> <para>
Since <productname>Postgres</productname> allows tables larger Since <productname>PostgreSQL</productname> allows tables larger
than the maximum file size on your system, it can be problematic than the maximum file size on your system, it can be problematic
to dump the table to a file, since the resulting file will likely to dump the table to a file, since the resulting file will likely
be larger than the maximum size allowed by your system. As be larger than the maximum size allowed by your system. As
...@@ -242,7 +242,7 @@ cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable c ...@@ -242,7 +242,7 @@ cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable c
<formalpara> <formalpara>
<title>Use the custom dump format.</title> <title>Use the custom dump format.</title>
<para> <para>
If PostgreSQL was built on a system with the <application>zlib</> compression library If <productname>PostgreSQL</productname> was built on a system with the <application>zlib</> compression library
installed, the custom dump format will compress data as it writes it installed, the custom dump format will compress data as it writes it
to the output file. For large databases, this will produce similar dump to the output file. For large databases, this will produce similar dump
sizes to using <command>gzip</command>, but has the added advantage that the tables can be sizes to using <command>gzip</command>, but has the added advantage that the tables can be
...@@ -287,7 +287,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c ...@@ -287,7 +287,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c
either the custom or the TAR output format, and use the -b option in either the custom or the TAR output format, and use the -b option in
<application>pg_dump</>. See the reference pages for details. <application>pg_dump</>. See the reference pages for details.
The directory <filename>contrib/pg_dumplo</> of the The directory <filename>contrib/pg_dumplo</> of the
<productname>Postgres</> source tree also contains a program that can <productname>PostgreSQL</> source tree also contains a program that can
dump large objects. dump large objects.
</para> </para>
...@@ -303,7 +303,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c ...@@ -303,7 +303,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c
<para> <para>
An alternative backup strategy is to directly copy the files that An alternative backup strategy is to directly copy the files that
<productname>Postgres</> uses to store the data in the database. In <productname>PostgreSQL</> uses to store the data in the database. In
<xref linkend="creating-cluster"> it is explained where these files <xref linkend="creating-cluster"> it is explained where these files
are located, but you have probably found them already if you are are located, but you have probably found them already if you are
interested in this method. You can use whatever method you prefer interested in this method. You can use whatever method you prefer
...@@ -373,7 +373,7 @@ tar -cf backup.tar /usr/local/pgsql/data ...@@ -373,7 +373,7 @@ tar -cf backup.tar /usr/local/pgsql/data
<para> <para>
As a general rule, the internal data storage format is subject to As a general rule, the internal data storage format is subject to
change between releases of <productname>Postgres</>. This does not change between releases of <productname>PostgreSQL</>. This does not
apply to different <quote>patch levels</quote>, these always have apply to different <quote>patch levels</quote>, these always have
compatible storage formats. For example, releases 7.0.1, 7.1.2, and compatible storage formats. For example, releases 7.0.1, 7.1.2, and
7.2 are not compatible, whereas &version;.1 and &version;.2 are. When you 7.2 are not compatible, whereas &version;.1 and &version;.2 are. When you
...@@ -440,3 +440,21 @@ psql < backup ...@@ -440,3 +440,21 @@ psql < backup
</note> </note>
</sect1> </sect1>
</chapter> </chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.15 2001/11/08 23:34:33 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.16 2001/11/21 05:53:40 thomas Exp $
--> -->
<bibliography id="biblio"> <bibliography id="biblio">
...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.15 2001/11/08 23:34:33 pete ...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.15 2001/11/08 23:34:33 pete
<para> <para>
Selected references and readings for <acronym>SQL</acronym> Selected references and readings for <acronym>SQL</acronym>
and <productname>Postgres</productname>. and <productname>PostgreSQL</productname>.
</para> </para>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.8 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="bki"> <chapter id="bki">
...@@ -8,7 +8,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp ...@@ -8,7 +8,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp
<para> <para>
Backend Interface (<acronym>BKI</acronym>) files are scripts in a Backend Interface (<acronym>BKI</acronym>) files are scripts in a
special language that are input to the special language that are input to the
<productname>Postgres</productname> backend running in the special <productname>PostgreSQL</productname> backend running in the special
<quote>bootstrap</quote> mode that allows it to perform database <quote>bootstrap</quote> mode that allows it to perform database
functions without a database system already existing. functions without a database system already existing.
<acronym>BKI</acronym> files can therefore be used to create the <acronym>BKI</acronym> files can therefore be used to create the
...@@ -20,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp ...@@ -20,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp
<application>initdb</application> uses a <acronym>BKI</acronym> file <application>initdb</application> uses a <acronym>BKI</acronym> file
to do part of its job when creating a new database cluster. The to do part of its job when creating a new database cluster. The
input file used by <application>initdb</application> is created as input file used by <application>initdb</application> is created as
part of building and installing <productname>Postgres</productname> part of building and installing <productname>PostgreSQL</productname>
by a program named <filename>genbki.sh</filename> from some by a program named <filename>genbki.sh</filename> from some
specially formatted C header files in the source tree. The created specially formatted C header files in the source tree. The created
BKI file is called <filename>postgres.bki</filename> and is BKI file is called <filename>postgres.bki</filename> and is
...@@ -37,7 +37,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp ...@@ -37,7 +37,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.7 2001/06/12 05:55:48 tgl Exp
<title><acronym>BKI</acronym> File Format</title> <title><acronym>BKI</acronym> File Format</title>
<para> <para>
This section describes how the <productname>Postgres</productname> This section describes how the <productname>PostgreSQL</productname>
backend interprets <acronym>BKI</acronym> files. This description backend interprets <acronym>BKI</acronym> files. This description
will be easier to understand if the <filename>postgres.bki</filename> will be easier to understand if the <filename>postgres.bki</filename>
file is at hand as an example. You should also study the source file is at hand as an example. You should also study the source
......
<!-- <!--
Documentation of the system catalogs, directed toward PostgreSQL developers Documentation of the system catalogs, directed toward PostgreSQL developers
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.28 2001/11/08 23:44:01 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.29 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="catalogs"> <chapter id="catalogs">
...@@ -2300,7 +2300,8 @@ ...@@ -2300,7 +2300,8 @@
routines pass a value of this type by value or by reference. routines pass a value of this type by value or by reference.
Only <type>char</type>, <type>short</type>, and Only <type>char</type>, <type>short</type>, and
<type>int</type> equivalent items can be passed by value, so if <type>int</type> equivalent items can be passed by value, so if
the type is not 1, 2, or 4 bytes long, Postgres does not have the type is not 1, 2, or 4 bytes long,
<productname>PostgreSQL</> does not have
the option of passing by value and so the option of passing by value and so
<structfield>typbyval</structfield> had better be false. <structfield>typbyval</structfield> had better be false.
Variable-length types are always passed by reference. Note that Variable-length types are always passed by reference. Note that
...@@ -2415,7 +2416,8 @@ ...@@ -2415,7 +2416,8 @@
<structfield>typalign</structfield> is the alignment required <structfield>typalign</structfield> is the alignment required
when storing a value of this type. It applies to storage on when storing a value of this type. It applies to storage on
disk as well as most representations of the value inside disk as well as most representations of the value inside
Postgres. When multiple values are stored consecutively, such <productname>PostgreSQL</>.
When multiple values are stored consecutively, such
as in the representation of a complete row on disk, padding is as in the representation of a complete row on disk, padding is
inserted before a datum of this type so that it begins on the inserted before a datum of this type so that it begins on the
specified boundary. The alignment reference is the beginning specified boundary. The alignment reference is the beginning
...@@ -2493,7 +2495,23 @@ ...@@ -2493,7 +2495,23 @@
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
</sect1> </sect1>
</chapter> </chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.17 2001/11/19 03:58:24 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.18 2001/11/21 05:53:40 thomas Exp $ -->
<chapter id="charset"> <chapter id="charset">
<title>Localization</> <title>Localization</>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</abstract> </abstract>
<para> <para>
<productname>Postgres</productname> supports localization with <productname>PostgreSQL</productname> supports localization with
three approaches: three approaches:
<itemizedlist> <itemizedlist>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<listitem> <listitem>
<para> <para>
Using explicit multiple-byte character sets defined in the Using explicit multiple-byte character sets defined in the
<productname>Postgres</productname> server to support languages <productname>PostgreSQL</productname> server to support languages
that require more characters than will fit into a single byte, that require more characters than will fit into a single byte,
and to provide character set recoding between client and server. and to provide character set recoding between client and server.
The number of supported character sets is fixed at the time the The number of supported character sets is fixed at the time the
...@@ -174,7 +174,7 @@ export LANG=sv_SE ...@@ -174,7 +174,7 @@ export LANG=sv_SE
The <envar>LC_COLLATE</> and <envar>LC_CTYPE</> variables affect the The <envar>LC_COLLATE</> and <envar>LC_CTYPE</> variables affect the
sort order of indexes. Therefore, these values must be kept fixed sort order of indexes. Therefore, these values must be kept fixed
for any particular database cluster, or indexes on text columns will for any particular database cluster, or indexes on text columns will
become corrupt. <productname>Postgres</productname> enforces this become corrupt. <productname>PostgreSQL</productname> enforces this
by recording the values of <envar>LC_COLLATE</> and <envar>LC_CTYPE</> by recording the values of <envar>LC_COLLATE</> and <envar>LC_CTYPE</>
that are seen by <application>initdb</>. The server automatically adopts that are seen by <application>initdb</>. The server automatically adopts
those two values when it is started; only the other <envar>LC_</> those two values when it is started; only the other <envar>LC_</>
...@@ -316,13 +316,13 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -316,13 +316,13 @@ perl: warning: Falling back to the standard locale ("C").
<para> <para>
Multibyte (<acronym>MB</acronym>) support is intended to allow Multibyte (<acronym>MB</acronym>) support is intended to allow
<productname>Postgres</productname> to handle <productname>PostgreSQL</productname> to handle
multiple-byte character sets such as <acronym>EUC</> (Extended Unix Code), Unicode and multiple-byte character sets such as <acronym>EUC</> (Extended Unix Code), Unicode and
Mule internal code. With <acronym>MB</acronym> enabled you can use multibyte Mule internal code. With <acronym>MB</acronym> enabled you can use multibyte
character sets in regular expressions (regexp), LIKE, and some character sets in regular expressions (regexp), LIKE, and some
other functions. The default other functions. The default
encoding system is selected while initializing your encoding system is selected while initializing your
<productname>Postgres</productname> installation using <productname>PostgreSQL</productname> installation using
<application>initdb</application>. Note that this can be <application>initdb</application>. Note that this can be
overridden when you create a database using overridden when you create a database using
<application>createdb</application> or by using the SQL command <application>createdb</application> or by using the SQL command
...@@ -471,14 +471,15 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -471,14 +471,15 @@ perl: warning: Falling back to the standard locale ("C").
</para> </para>
<para> <para>
CAUTION2: Not all API supports encodings listed above. For example, CAUTION2: Not all API supports encodings listed above. For example,
PostgreSQL JDBC driver does not support MULE_INTERNAL, LATIN6, <productname>PostgreSQL</>
LATIN8 and LATIN10. JDBC driver does not support MULE_INTERNAL, LATIN6,
LATIN8 and LATIN10.
</para> </para>
<para> <para>
Here is an example of configuring Here is an example of configuring
<productname>Postgres</productname> to use a Japanese encoding by <productname>PostgreSQL</productname> to use a Japanese encoding by
default: default:
<programlisting> <programlisting>
...@@ -497,7 +498,7 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -497,7 +498,7 @@ perl: warning: Falling back to the standard locale ("C").
<para> <para>
<application>initdb</application> defines the default encoding <application>initdb</application> defines the default encoding
for a <productname>Postgres</productname> installation. For example: for a <productname>PostgreSQL</productname> installation. For example:
<programlisting> <programlisting>
% initdb -E EUC_JP % initdb -E EUC_JP
...@@ -554,7 +555,7 @@ $ psql -l ...@@ -554,7 +555,7 @@ $ psql -l
frontend</title> frontend</title>
<para> <para>
<productname>Postgres</productname> supports an automatic <productname>PostgreSQL</productname> supports an automatic
encoding translation between backend encoding translation between backend
and frontend for some encodings. and frontend for some encodings.
...@@ -727,7 +728,7 @@ $ psql -l ...@@ -727,7 +728,7 @@ $ psql -l
<para> <para>
To enable the automatic encoding translation, you have to tell To enable the automatic encoding translation, you have to tell
<productname>Postgres</productname> the encoding you would like <productname>PostgreSQL</productname> the encoding you would like
to use in frontend. There are to use in frontend. There are
several ways to accomplish this. several ways to accomplish this.
...@@ -827,8 +828,8 @@ RESET CLIENT_ENCODING; ...@@ -827,8 +828,8 @@ RESET CLIENT_ENCODING;
<para> <para>
An automatic encoding translation between Unicode and other An automatic encoding translation between Unicode and other
encodings has been supported since PostgreSQL 7.1. encodings has been supported since <productname>PostgreSQL</> 7.1.
For 7.1 it's not enabled by default. For 7.1 it was not enabled by default.
To enable this feature, run configure with the To enable this feature, run configure with the
<option>--enable-unicode-conversion</option> option. Note that this requires <option>--enable-unicode-conversion</option> option. Note that this requires
the <option>--enable-multibyte</option> option also. the <option>--enable-multibyte</option> option also.
...@@ -972,7 +973,7 @@ April 21, 1998 some enhancements/fixes ...@@ -972,7 +973,7 @@ April 21, 1998 some enhancements/fixes
* fix problem in regress/regress.sh in case of System V * fix problem in regress/regress.sh in case of System V
* fix toupper(), tolower() to handle 8bit chars * fix toupper(), tolower() to handle 8bit chars
Mar 25, 1998 MB PL2 is incorporated into PostgreSQL 6.3.1 Mar 25, 1998 MB PL2 is incorporated into <productname>PostgreSQL</> 6.3.1
Mar 10, 1998 PL2 released Mar 10, 1998 PL2 released
* add regression test for EUC_JP, EUC_CN and MULE_INTERNAL * add regression test for EUC_JP, EUC_CN and MULE_INTERNAL
...@@ -995,7 +996,7 @@ Version: 0.91 for PgSQL 6.5 ...@@ -995,7 +996,7 @@ Version: 0.91 for PgSQL 6.5
Author: Pavel Behal Author: Pavel Behal
Revised by: Tatsuo Ishii Revised by: Tatsuo Ishii
Email: behal@opf.slu.cz Email: behal@opf.slu.cz
Licence: The Same as PostgreSQL License: The Same as <productname>PostgreSQL</>
Sorry for my Eglish and C code, I'm not native :-) Sorry for my Eglish and C code, I'm not native :-)
...@@ -1003,7 +1004,7 @@ Sorry for my Eglish and C code, I'm not native :-) ...@@ -1003,7 +1004,7 @@ Sorry for my Eglish and C code, I'm not native :-)
--> -->
The WIN1250 character set on Windows client platforms can be used The WIN1250 character set on Windows client platforms can be used
with <productname>Postgres</productname> with locale support with <productname>PostgreSQL</productname> with locale support
enabled. enabled.
</para> </para>
...@@ -1080,7 +1081,7 @@ Sorry for my Eglish and C code, I'm not native :-) ...@@ -1080,7 +1081,7 @@ Sorry for my Eglish and C code, I'm not native :-)
<title>WIN1250 on Windows/ODBC</title> <title>WIN1250 on Windows/ODBC</title>
<step> <step>
<para> <para>
Compile <productname>Postgres</productname> with locale enabled Compile <productname>PostgreSQL</productname> with locale enabled
and the multibyte encoding set to <literal>LATIN2</literal>. and the multibyte encoding set to <literal>LATIN2</literal>.
</para> </para>
</step> </step>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.28 2001/11/19 03:58:24 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.29 2001/11/21 05:53:40 thomas Exp $ -->
<chapter id="client-authentication"> <chapter id="client-authentication">
<title>Client Authentication</title> <title>Client Authentication</title>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<para> <para>
When a client application connects to the database server, it specifies which When a client application connects to the database server, it specifies which
<productname>Postgres</productname> user name it wants to connect as, <productname>PostgreSQL</productname> user name it wants to connect as,
much the same way one logs into a Unix computer as a particular user. much the same way one logs into a Unix computer as a particular user.
Within the SQL environment the active Within the SQL environment the active
database user name determines access privileges to database database user name determines access privileges to database
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
</para> </para>
<para> <para>
<productname>Postgres</productname> offers a number of different <productname>PostgreSQL</productname> offers a number of different
client authentication methods. The method to be used can be selected client authentication methods. The method to be used can be selected
on the basis of (client) host and database; some authentication methods on the basis of (client) host and database; some authentication methods
allow you to restrict by user name as well. allow you to restrict by user name as well.
</para> </para>
<para> <para>
<productname>Postgres</productname> database user names are logically <productname>PostgreSQL</productname> database user names are logically
separate from user names of the operating system in which the server separate from user names of the operating system in which the server
runs. If all the users of a particular server also have accounts on runs. If all the users of a particular server also have accounts on
the server's machine, it makes sense to assign database user names the server's machine, it makes sense to assign database user names
...@@ -136,7 +136,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -136,7 +136,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
<literal>all</literal> specifies that it applies to all <literal>all</literal> specifies that it applies to all
databases, while the value <literal>sameuser</> identifies the databases, while the value <literal>sameuser</> identifies the
database with the same name as the connecting user. Otherwise, database with the same name as the connecting user. Otherwise,
this is the name of a specific <productname>Postgres</productname> this is the name of a specific <productname>PostgreSQL</productname>
database. database.
</para> </para>
</listitem> </listitem>
...@@ -152,7 +152,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -152,7 +152,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
record applies, based on their IP record applies, based on their IP
address. (Of course IP addresses can be spoofed but this address. (Of course IP addresses can be spoofed but this
consideration is beyond the scope of consideration is beyond the scope of
<productname>Postgres</productname>.) The precise logic is that <productname>PostgreSQL</productname>.) The precise logic is that
<blockquote> <blockquote>
<informalfigure> <informalfigure>
<programlisting>(<replaceable>actual-IP-address</replaceable> xor <replaceable>IP-address-field</replaceable>) and <replaceable>IP-mask-field</replaceable></programlisting> <programlisting>(<replaceable>actual-IP-address</replaceable> xor <replaceable>IP-address-field</replaceable>) and <replaceable>IP-mask-field</replaceable></programlisting>
...@@ -179,7 +179,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -179,7 +179,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
<para> <para>
The connection is allowed unconditionally. This method allows The connection is allowed unconditionally. This method allows
any user that has login access to the client host to connect as any user that has login access to the client host to connect as
any <productname>Postgres</productname> user whatsoever. any <productname>PostgreSQL</productname> user whatsoever.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -277,7 +277,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -277,7 +277,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
<listitem> <listitem>
<para> <para>
The identity of the user as determined on login to the The identity of the user as determined on login to the
operating system is used by <productname>Postgres</productname> operating system is used by <productname>PostgreSQL</productname>
to determine whether the user to determine whether the user
is allowed to connect as the requested database user. is allowed to connect as the requested database user.
For TCP/IP connections the user's identity is determined by For TCP/IP connections the user's identity is determined by
...@@ -413,7 +413,7 @@ host all 0.0.0.0 0.0.0.0 krb5 ...@@ -413,7 +413,7 @@ host all 0.0.0.0 0.0.0.0 krb5
# Allow users from 192.168.x.x hosts to connect to any database, if they # Allow users from 192.168.x.x hosts to connect to any database, if they
# pass the ident check. If, for example, ident says the user is "bryanh" # pass the ident check. If, for example, ident says the user is "bryanh"
# and he requests to connect as PostgreSQL user "guest1", the connection # and he requests to connect as <productname>PostgreSQL</> user "guest1", the connection
# is allowed if there is an entry in pg_ident.conf for map "omicron" that # is allowed if there is an entry in pg_ident.conf for map "omicron" that
# says "bryanh" is allowed to connect as "guest1": # says "bryanh" is allowed to connect as "guest1":
...@@ -451,7 +451,7 @@ local all md5 admins ...@@ -451,7 +451,7 @@ local all md5 admins
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</> database passwords are separate from <productname>PostgreSQL</productname> database passwords are separate from
operating system user passwords. Ordinarily, the password for each operating system user passwords. Ordinarily, the password for each
database user is stored in the pg_shadow system catalog table. database user is stored in the pg_shadow system catalog table.
Passwords can be managed with the query language commands Passwords can be managed with the query language commands
...@@ -486,7 +486,7 @@ local all md5 admins ...@@ -486,7 +486,7 @@ local all md5 admins
ignored. The password is expected to be encrypted using the ignored. The password is expected to be encrypted using the
system's <function>crypt()</function> function. The utility system's <function>crypt()</function> function. The utility
program <application>pg_passwd</application> that is installed program <application>pg_passwd</application> that is installed
with <productname>Postgres</productname> can be used to manage with <productname>PostgreSQL</productname> can be used to manage
these password files. these password files.
</para> </para>
...@@ -546,7 +546,7 @@ local all md5 admins ...@@ -546,7 +546,7 @@ local all md5 admins
</para> </para>
<para> <para>
<productname>Postgres</> operates like a normal Kerberos service. <productname>PostgreSQL</> operates like a normal Kerberos service.
The name of the service principal is The name of the service principal is
<replaceable>servicename/hostname@realm</>, where <replaceable>servicename/hostname@realm</>, where
<replaceable>servicename</> is <literal>postgres</literal> <replaceable>servicename</> is <literal>postgres</literal>
...@@ -558,18 +558,19 @@ local all md5 admins ...@@ -558,18 +558,19 @@ local all md5 admins
</para> </para>
<para> <para>
Client principals must have their <productname>Postgres</> username as Client principals must have their <productname>PostgreSQL</> username as
their first component, for example their first component, for example
<replaceable>pgusername/otherstuff@realm</>. <replaceable>pgusername/otherstuff@realm</>.
At present the realm of the client is not checked by At present the realm of the client is not checked by
<productname>Postgres</>; so <productname>PostgreSQL</>; so
if you have cross-realm authentication enabled, then any principal if you have cross-realm authentication enabled, then any principal
in any realm that can communicate with yours will be accepted. in any realm that can communicate with yours will be accepted.
</para> </para>
<para> <para>
Make sure that your server key file is readable (and Make sure that your server key file is readable (and
preferably only readable) by the Postgres server account (see preferably only readable) by the
<productname>PostgreSQL</productname> server account (see
<xref linkend="postgres-user">). The location of the key file <xref linkend="postgres-user">). The location of the key file
is specified with the <varname>krb_server_keyfile</> run time is specified with the <varname>krb_server_keyfile</> run time
configuration parameter. (See also <xref linkend="runtime-config">.) configuration parameter. (See also <xref linkend="runtime-config">.)
...@@ -621,7 +622,7 @@ local all md5 admins ...@@ -621,7 +622,7 @@ local all md5 admins
is to answer questions like <quote>What user initiated the is to answer questions like <quote>What user initiated the
connection that goes out of your port <replaceable>X</replaceable> connection that goes out of your port <replaceable>X</replaceable>
and connects to my port <replaceable>Y</replaceable>?</quote>. and connects to my port <replaceable>Y</replaceable>?</quote>.
Since <productname>Postgres</> knows both <replaceable>X</> and Since <productname>PostgreSQL</> knows both <replaceable>X</> and
<replaceable>Y</> when a physical connection is established, it <replaceable>Y</> when a physical connection is established, it
can interrogate the ident server on the host of the connecting can interrogate the ident server on the host of the connecting
client and could theoretically determine the operating system user client and could theoretically determine the operating system user
...@@ -657,7 +658,7 @@ local all md5 admins ...@@ -657,7 +658,7 @@ local all md5 admins
<para> <para>
When using ident-based authentication, after having determined the When using ident-based authentication, after having determined the
name of the operating system user that initiated the connection, name of the operating system user that initiated the connection,
<productname>Postgres</productname> checks whether that user is allowed <productname>PostgreSQL</productname> checks whether that user is allowed
to connect as the database user he is requesting to connect as. to connect as the database user he is requesting to connect as.
This is controlled by the ident map This is controlled by the ident map
argument that follows the <literal>ident</> keyword in the argument that follows the <literal>ident</> keyword in the
...@@ -707,7 +708,8 @@ local all md5 admins ...@@ -707,7 +708,8 @@ local all md5 admins
logged in to a machine on the 192.168 network that does not have logged in to a machine on the 192.168 network that does not have
the Unix user name <systemitem>bryanh</>, <systemitem>ann</>, or <systemitem>robert</> would not be granted access. the Unix user name <systemitem>bryanh</>, <systemitem>ann</>, or <systemitem>robert</> would not be granted access.
Unix user <systemitem>robert</> would only be allowed access when he tries to Unix user <systemitem>robert</> would only be allowed access when he tries to
connect as Postgres user <systemitem>bob</>, not as <systemitem>robert</> connect as <productname>PostgreSQL</> user <systemitem>bob</>,
not as <systemitem>robert</>
or anyone else. <systemitem>ann</> would only be allowed to connect as or anyone else. <systemitem>ann</> would only be allowed to connect as
<systemitem>ann</>. User <systemitem>bryanh</> would be allowed to connect as either <systemitem>ann</>. User <systemitem>bryanh</> would be allowed to connect as either
<systemitem>bryanh</> himself or as <systemitem>guest1</>. <systemitem>bryanh</> himself or as <systemitem>guest1</>.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- <!--
<Para> <Para>
Support for <productname>Postgres</productname> comes primarily from Support for <productname>PostgreSQL</productname> comes primarily from
this printed documentation, the web-based mailing list archives, this printed documentation, the web-based mailing list archives,
and the mailing lists themselves. and the mailing lists themselves.
</Para> </Para>
...@@ -13,7 +13,7 @@ and the mailing lists themselves. ...@@ -13,7 +13,7 @@ and the mailing lists themselves.
<Para> <Para>
Refer to the introduction in this manual or to the Refer to the introduction in this manual or to the
<ulink url="http://www.postgresql.org"><productname>Postgres</productname> web page</ulink> <ulink url="http://www.postgresql.org"><productname>PostgreSQL</productname> web page</ulink>
for subscription information to the no-cost mailing lists. for subscription information to the no-cost mailing lists.
</Para> </Para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.19 2001/10/09 18:45:59 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.20 2001/11/21 05:53:40 thomas Exp $
CVS code repository CVS code repository
Thomas Lockhart Thomas Lockhart
--> -->
...@@ -26,7 +26,7 @@ Thomas Lockhart ...@@ -26,7 +26,7 @@ Thomas Lockhart
<title>The <productname>CVS</productname> Repository</title> <title>The <productname>CVS</productname> Repository</title>
<para> <para>
The <productname>Postgres</productname> source code is stored and managed using the The <productname>PostgreSQL</productname> source code is stored and managed using the
<productname>CVS</productname> code management system. <productname>CVS</productname> code management system.
</para> </para>
...@@ -34,7 +34,7 @@ Thomas Lockhart ...@@ -34,7 +34,7 @@ Thomas Lockhart
At least two methods, At least two methods,
anonymous CVS and <productname>CVSup</productname>, anonymous CVS and <productname>CVSup</productname>,
are available to pull the <productname>CVS</productname> code tree from the are available to pull the <productname>CVS</productname> code tree from the
<productname>Postgres</productname> server to your local machine. <productname>PostgreSQL</productname> server to your local machine.
</para> </para>
<sect1 id="anoncvs"> <sect1 id="anoncvs">
...@@ -78,12 +78,12 @@ $ cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot login ...@@ -78,12 +78,12 @@ $ cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot login
<step> <step>
<para> <para>
Fetch the <productname>Postgres</productname> sources: Fetch the <productname>PostgreSQL</productname> sources:
<programlisting> <programlisting>
cvs -z3 -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P pgsql cvs -z3 -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P pgsql
</programlisting> </programlisting>
which installs the <productname>Postgres</productname> sources into a which installs the <productname>PostgreSQL</productname> sources into a
subdirectory <filename>pgsql</filename> subdirectory <filename>pgsql</filename>
of the directory you are currently in. of the directory you are currently in.
...@@ -160,7 +160,7 @@ $ chmod -R go-w pgsql ...@@ -160,7 +160,7 @@ $ chmod -R go-w pgsql
<para> <para>
<productname>CVS</productname> can do a lot of other things, <productname>CVS</productname> can do a lot of other things,
such as fetching prior revisions such as fetching prior revisions
of the <productname>Postgres</productname> sources of the <productname>PostgreSQL</productname> sources
rather than the latest development version. rather than the latest development version.
For more info consult the manual that comes with For more info consult the manual that comes with
<productname>CVS</productname>, or see the online <productname>CVS</productname>, or see the online
...@@ -292,7 +292,7 @@ cvs commit ...@@ -292,7 +292,7 @@ cvs commit
<para> <para>
An alternative to using anonymous CVS for retrieving An alternative to using anonymous CVS for retrieving
the <productname>Postgres</productname> source tree the <productname>PostgreSQL</productname> source tree
is <productname>CVSup</productname>. is <productname>CVSup</productname>.
<productname>CVSup</productname> was developed by <productname>CVSup</productname> was developed by
John Polstra (<email>jdp@polstra.com</email>) to John Polstra (<email>jdp@polstra.com</email>) to
...@@ -306,7 +306,7 @@ cvs commit ...@@ -306,7 +306,7 @@ cvs commit
replicate the <emphasis>entire</emphasis> CVS repository on your local system, replicate the <emphasis>entire</emphasis> CVS repository on your local system,
allowing fast local access to cvs operations such as <option>log</option> allowing fast local access to cvs operations such as <option>log</option>
and <option>diff</option>. Other advantages include fast synchronization to and <option>diff</option>. Other advantages include fast synchronization to
the <productname>Postgres</productname> server due to an efficient the <productname>PostgreSQL</productname> server due to an efficient
streaming transfer protocol which only sends the changes since the last update. streaming transfer protocol which only sends the changes since the last update.
</para> </para>
...@@ -327,7 +327,7 @@ cvs commit ...@@ -327,7 +327,7 @@ cvs commit
<productname>CVS</productname> repository. On one of our systems we <productname>CVS</productname> repository. On one of our systems we
recently set up a repository in <filename>/home/cvs/</filename>, recently set up a repository in <filename>/home/cvs/</filename>,
but had formerly kept it under a but had formerly kept it under a
<productname>Postgres</productname> development tree in <productname>PostgreSQL</productname> development tree in
<filename>/opt/postgres/cvs/</filename>. If you intend to keep your <filename>/opt/postgres/cvs/</filename>. If you intend to keep your
repository in <filename>/home/cvs/</filename>, then put repository in <filename>/home/cvs/</filename>, then put
...@@ -393,7 +393,7 @@ $ cvsup -L 2 <replaceable class="parameter">postgres.cvsup</replaceable> ...@@ -393,7 +393,7 @@ $ cvsup -L 2 <replaceable class="parameter">postgres.cvsup</replaceable>
<programlisting> <programlisting>
# This file represents the standard CVSup distribution file # This file represents the standard CVSup distribution file
# for the PostgreSQL ORDBMS project # for the <productname>PostgreSQL</> ORDBMS project
# Modified by lockhart@alumni.caltech.edu 1997-08-28 # Modified by lockhart@alumni.caltech.edu 1997-08-28
# - Point to my local snapshot source tree # - Point to my local snapshot source tree
# - Pull the full CVS repository, not just the latest snapshot # - Pull the full CVS repository, not just the latest snapshot
...@@ -430,12 +430,12 @@ pgsql ...@@ -430,12 +430,12 @@ pgsql
<para> <para>
The following is a suggested <productname>CVSup</productname> config file from The following is a suggested <productname>CVSup</productname> config file from
<ulink url="ftp://ftp.postgresql.org/pub/CVSup/README.cvsup">the Postgres ftp site</ulink> <ulink url="ftp://ftp.postgresql.org/pub/CVSup/README.cvsup">the <productname>PostgreSQL</> ftp site</ulink>
which will fetch the current snapshot only: which will fetch the current snapshot only:
<programlisting> <programlisting>
# This file represents the standard CVSup distribution file # This file represents the standard CVSup distribution file
# for the PostgreSQL ORDBMS project # for the <productname>PostgreSQL</> ORDBMS project
# #
# Defaults that apply to all the collections # Defaults that apply to all the collections
*default host=cvsup.postgresql.org *default host=cvsup.postgresql.org
...@@ -479,7 +479,7 @@ pgsql ...@@ -479,7 +479,7 @@ pgsql
You can use pre-built binaries You can use pre-built binaries
if you have a platform for which binaries if you have a platform for which binaries
are posted on are posted on
<ulink url="ftp://ftp.postgresql.org/pub">the <productname>Postgres</productname> ftp site</ulink>, <ulink url="ftp://ftp.postgresql.org/pub">the <productname>PostgreSQL</productname> ftp site</ulink>,
or if you are running FreeBSD, for which or if you are running FreeBSD, for which
<productname>CVSup</productname> is available as a port. <productname>CVSup</productname> is available as a port.
...@@ -520,7 +520,7 @@ pgsql ...@@ -520,7 +520,7 @@ pgsql
<step performance="optional"> <step performance="optional">
<para> <para>
If you have another platform, check for and download the appropriate binary from If you have another platform, check for and download the appropriate binary from
<ulink url="ftp://ftp.postgresql.org/pub">the <productname>Postgres</productname> ftp site</ulink>. <ulink url="ftp://ftp.postgresql.org/pub">the <productname>PostgreSQL</productname> ftp site</ulink>.
</para> </para>
</step> </step>
</substeps> </substeps>
...@@ -764,7 +764,7 @@ malloc in place, the CVSup system should be rock solid. We have ...@@ -764,7 +764,7 @@ malloc in place, the CVSup system should be rock solid. We have
servers that have been up for weeks and have served many thousands servers that have been up for weeks and have served many thousands
of clients without any observed problems. of clients without any observed problems.
> We hope to have the Postgres tree using CVSup within a month or > We hope to have the PostgreSQL tree using CVSup within a month or
> so, and hope to retire sup in September... > so, and hope to retire sup in September...
Great! I'll do my best to help make sure you don't regret it. Great! I'll do my best to help make sure you don't regret it.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.74 2001/11/21 05:53:40 thomas Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -15,9 +15,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo ...@@ -15,9 +15,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> has a rich set of native data <productname>PostgreSQL</productname> has a rich set of native data
types available to users. types available to users.
Users may add new types to <productname>Postgres</productname> using the Users may add new types to <productname>PostgreSQL</productname> using the
<command>CREATE TYPE</command> command. <command>CREATE TYPE</command> command.
</para> </para>
...@@ -26,12 +26,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo ...@@ -26,12 +26,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo
included in the standard distribution. Most of the alternative names included in the standard distribution. Most of the alternative names
listed in the listed in the
<quote>Aliases</quote> column are the names used internally by <quote>Aliases</quote> column are the names used internally by
<productname>Postgres</productname> for historical reasons. In <productname>PostgreSQL</productname> for historical reasons. In
addition, some internally used or deprecated types are available, addition, some internally used or deprecated types are available,
but they are not listed here. but they are not listed here.
</para> </para>
<para> <para>
<table id="datatype-table"> <table id="datatype-table">
<title>Data Types</title> <title>Data Types</title>
<tgroup cols="3"> <tgroup cols="3">
...@@ -264,7 +264,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo ...@@ -264,7 +264,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo
Each data type has an external representation determined by its input Each data type has an external representation determined by its input
and output functions. Many of the built-in types have and output functions. Many of the built-in types have
obvious external formats. However, several types are either unique obvious external formats. However, several types are either unique
to <productname>Postgres</productname>, such as open and closed to <productname>PostgreSQL</productname>, such as open and closed
paths, or have several possibilities for formats, such as the date paths, or have several possibilities for formats, such as the date
and time types. and time types.
Most of the input and output functions corresponding to the Most of the input and output functions corresponding to the
...@@ -486,7 +486,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo ...@@ -486,7 +486,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.73 2001/11/21 03:17:22 mo
... WHERE smallint_column = 42 ... WHERE smallint_column = 42
</programlisting> </programlisting>
will not use an index, because the system assigns type will not use an index, because the system assigns type
<type>integer</type> to the constant 42, and PostgreSQL currently <type>integer</type> to the constant 42, and
<productname>PostgreSQL</productname> currently
cannot use an index when two different data types are involved. A cannot use an index when two different data types are involved. A
workaround is to single-quote the constant, thus: workaround is to single-quote the constant, thus:
<programlisting> <programlisting>
...@@ -731,7 +732,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl ...@@ -731,7 +732,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
<para> <para>
The <type>money</type> type stores U.S.-style currency with fixed The <type>money</type> type stores U.S.-style currency with fixed
decimal point representation. If decimal point representation. If
<productname>Postgres</productname> is compiled with locale <productname>PostgreSQL</productname> is compiled with locale
support then the <type>money</type> type uses locale-specific support then the <type>money</type> type uses locale-specific
output formatting. output formatting.
</para> </para>
...@@ -831,7 +832,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl ...@@ -831,7 +832,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
<note> <note>
<para> <para>
Prior to PostgreSQL 7.2, strings that were too long were silently Prior to <productname>PostgreSQL</> 7.2, strings that were too long were silently
truncated, no error was raised. truncated, no error was raised.
</para> </para>
</note> </note>
...@@ -844,7 +845,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl ...@@ -844,7 +845,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
respectively. <type>character</type> without length specifier is respectively. <type>character</type> without length specifier is
equivalent to <type>character(1)</type>; if <type>character equivalent to <type>character(1)</type>; if <type>character
varying</type> is used without length specifier, the type accepts varying</type> is used without length specifier, the type accepts
strings of any size. The latter is a PostgreSQL extension. strings of any size. The latter is a <productname>PostgreSQL</> extension.
</para> </para>
<para> <para>
...@@ -924,7 +925,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -924,7 +925,7 @@ SELECT b, char_length(b) FROM test2;
<para> <para>
There are two other fixed-length character types in There are two other fixed-length character types in
<productname>Postgres</productname>. The <type>name</type> type <productname>PostgreSQL</productname>. The <type>name</type> type
exists <emphasis>only</emphasis> for storage of internal catalog exists <emphasis>only</emphasis> for storage of internal catalog
names and is not intended for use by the general user. Its length names and is not intended for use by the general user. Its length
is currently defined as 32 bytes (31 usable characters plus terminator) is currently defined as 32 bytes (31 usable characters plus terminator)
...@@ -1262,7 +1263,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1262,7 +1263,7 @@ SELECT b, char_length(b) FROM test2;
<title>Date/Time Types</title> <title>Date/Time Types</title>
<para> <para>
<productname>Postgres</productname> supports the full set of <productname>PostgreSQL</productname> supports the full set of
<acronym>SQL</acronym> date and time types. <acronym>SQL</acronym> date and time types.
</para> </para>
...@@ -1352,7 +1353,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1352,7 +1353,7 @@ SELECT b, char_length(b) FROM test2;
</para> </para>
<para> <para>
To ensure compatibility to earlier versions of <productname>Postgres</productname> To ensure compatibility to earlier versions of <productname>PostgreSQL</productname>
we also continue to provide <type>datetime</type> we also continue to provide <type>datetime</type>
(equivalent to <type>timestamp</type>) and (equivalent to <type>timestamp</type>) and
<type>timespan</type> (equivalent to <type>interval</type>), <type>timespan</type> (equivalent to <type>interval</type>),
...@@ -1373,7 +1374,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1373,7 +1374,7 @@ SELECT b, char_length(b) FROM test2;
<para> <para>
Date and time input is accepted in almost any reasonable format, including Date and time input is accepted in almost any reasonable format, including
<acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible, <acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible,
traditional <productname>Postgres</productname>, and others. traditional <productname>PostgreSQL</productname>, and others.
The ordering of month and day in date input can be ambiguous, therefore a setting The ordering of month and day in date input can be ambiguous, therefore a setting
exists to specify how it should be interpreted in ambiguous cases. The command exists to specify how it should be interpreted in ambiguous cases. The command
<literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal> <literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal>
...@@ -1396,7 +1397,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -1396,7 +1397,7 @@ SELECT b, char_length(b) FROM test2;
<synopsis> <synopsis>
<replaceable>type</replaceable> '<replaceable>value</replaceable>' <replaceable>type</replaceable> '<replaceable>value</replaceable>'
</synopsis> </synopsis>
but <productname>Postgres</productname> is more flexible. but <productname>PostgreSQL</productname> is more flexible.
</para> </para>
<sect3> <sect3>
...@@ -1848,79 +1849,93 @@ January 8 04:05:06 1999 PST ...@@ -1848,79 +1849,93 @@ January 8 04:05:06 1999 PST
<indexterm> <indexterm>
<primary>time</primary> <primary>time</primary>
<secondary>current</secondary> <secondary>constants</secondary>
</indexterm> </indexterm>
<indexterm> <indexterm>
<primary>date</primary> <primary>date</primary>
<secondary>current</secondary> <secondary>constants</secondary>
</indexterm> </indexterm>
<para> <para>
The following <acronym>SQL</acronym>-compatible functions can be used as date or time The following <acronym>SQL</acronym>-compatible functions can be
used as date or time
input for the corresponding data type: <literal>CURRENT_DATE</literal>, input for the corresponding data type: <literal>CURRENT_DATE</literal>,
<literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>. <literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
</para> </para>
<para> <para>
<productname>Postgres</productname> also supports several special constants for <productname>PostgreSQL</productname> also supports several
convenience. special constants for convenience.
<table tocentry="1"> <table tocentry="1">
<title>Special Date/Time Constants</title> <title>Special Date/Time Constants</title>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
<row> <row>
<entry>Constant</entry> <entry>Constant</entry>
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<!-- <row>
<row> <entry>epoch</entry>
<entry>current</entry> <entry>1970-01-01 00:00:00+00 (Unix system time zero)</entry>
<entry>Current transaction time, deferred</entry> </row>
</row> <row>
--> <entry>infinity</entry>
<row> <entry>Later than other valid times</entry>
<entry>epoch</entry> </row>
<entry>1970-01-01 00:00:00+00 (Unix system time zero)</entry> <row>
</row> <entry>-infinity</entry>
<row> <entry>Earlier than other valid times</entry>
<entry>infinity</entry> </row>
<entry>Later than other valid times</entry> <row>
</row> <entry>invalid</entry>
<row> <entry>Illegal entry</entry>
<entry>-infinity</entry> </row>
<entry>Earlier than other valid times</entry> <row>
</row> <entry>now</entry>
<row> <entry>Current transaction time</entry>
<entry>invalid</entry> </row>
<entry>Illegal entry</entry> <row>
</row> <entry>today</entry>
<row> <entry>Midnight today</entry>
<entry>now</entry> </row>
<entry>Current transaction time</entry> <row>
</row> <entry>tomorrow</entry>
<row> <entry>Midnight tomorrow</entry>
<entry>today</entry> </row>
<entry>Midnight today</entry> <row>
</row> <entry>yesterday</entry>
<row> <entry>Midnight yesterday</entry>
<entry>tomorrow</entry> </row>
<entry>Midnight tomorrow</entry> <row>
</row> <entry>zulu, allballs, z</entry>
<row> <entry>00:00:00.00 GMT</entry>
<entry>yesterday</entry> </row>
<entry>Midnight yesterday</entry> </tbody>
</row> </tgroup>
</tbody> </table>
</tgroup>
</table>
</para>
</sect3>
</sect2> <literal>'now'</literal> is
evaluated when the value is first interpreted.
<caution>
<para>
As of <productname>PostgreSQL</> version 7.2,
<literal>'current'</literal> is no longer supported as a
date/time constant.
Previously,
<literal>'current'</literal> was stored as a special value,
and evaluated to <literal>'now'</literal> only when
used in a math operation or type
conversion.
</para>
</caution>
</para>
</sect3>
</sect2>
<sect2 id="datatype-datetime-output"> <sect2 id="datatype-datetime-output">
<title>Date/Time Output</title> <title>Date/Time Output</title>
...@@ -1940,7 +1955,7 @@ January 8 04:05:06 1999 PST ...@@ -1940,7 +1955,7 @@ January 8 04:05:06 1999 PST
<para> <para>
Output formats can be set to one of the four styles Output formats can be set to one of the four styles
ISO-8601, <acronym>SQL</acronym> (Ingres), traditional ISO-8601, <acronym>SQL</acronym> (Ingres), traditional
Postgres, and German, using the <command>SET DateStyle</command>. PostgreSQL, and German, using the <command>SET DateStyle</command>.
The default is the <acronym>ISO</acronym> format. The default is the <acronym>ISO</acronym> format.
<table tocentry="1"> <table tocentry="1">
...@@ -1965,7 +1980,7 @@ January 8 04:05:06 1999 PST ...@@ -1965,7 +1980,7 @@ January 8 04:05:06 1999 PST
<entry>12/17/1997 07:37:16.00 PST</entry> <entry>12/17/1997 07:37:16.00 PST</entry>
</row> </row>
<row> <row>
<entry>'Postgres'</entry> <entry>'PostgreSQL'</entry>
<entry>Original style</entry> <entry>Original style</entry>
<entry>Wed Dec 17 07:37:16 1997 PST</entry> <entry>Wed Dec 17 07:37:16 1997 PST</entry>
</row> </row>
...@@ -1980,14 +1995,18 @@ January 8 04:05:06 1999 PST ...@@ -1980,14 +1995,18 @@ January 8 04:05:06 1999 PST
</para> </para>
<para> <para>
The output of the <type>date</type> and <type>time</type> types is of course The output of the <type>date</type> and <type>time</type> styles
is of course
only the date or time part in accordance with the above examples. only the date or time part in accordance with the above examples.
</para> </para>
<para> <para>
The <acronym>SQL</acronym> style has European and non-European (US) variants, The <acronym>SQL</acronym> style has European and non-European
which determines whether month follows day or vice versa. (See also above (US) variants,
at Date/Time Input, how this setting affects interpretation of input values.) which determines whether month follows day or vice versa. (See
also <xref linkend="datatype-datetime-input">
for how this setting affects interpretation of
input values.)
<table tocentry="1"> <table tocentry="1">
<title>Date Order Conventions</title> <title>Date Order Conventions</title>
...@@ -2059,7 +2078,7 @@ January 8 04:05:06 1999 PST ...@@ -2059,7 +2078,7 @@ January 8 04:05:06 1999 PST
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> endeavors to be compatible with <productname>PostgreSQL</productname> endeavors to be compatible with
<acronym>SQL92</acronym> definitions for typical usage. <acronym>SQL92</acronym> definitions for typical usage.
However, the <acronym>SQL92</acronym> standard has an odd mix of date and However, the <acronym>SQL92</acronym> standard has an odd mix of date and
time types and capabilities. Two obvious problems are: time types and capabilities. Two obvious problems are:
...@@ -2094,9 +2113,9 @@ January 8 04:05:06 1999 PST ...@@ -2094,9 +2113,9 @@ January 8 04:05:06 1999 PST
types that contain both date and time when using time zones. We types that contain both date and time when using time zones. We
recommend <emphasis>not</emphasis> using the SQL92 type TIME recommend <emphasis>not</emphasis> using the SQL92 type TIME
WITH TIME ZONE (though it is supported by WITH TIME ZONE (though it is supported by
<productname>Postgres</productname> for legacy applications and <productname>PostgreSQL</productname> for legacy applications and
for compatibility with other RDBMS implementations). for compatibility with other RDBMS implementations).
<productname>Postgres</productname> <productname>PostgreSQL</productname>
assumes local time for any type containing only assumes local time for any type containing only
date or time. Further, time zone support is derived from date or time. Further, time zone support is derived from
the underlying operating system the underlying operating system
...@@ -2105,7 +2124,7 @@ January 8 04:05:06 1999 PST ...@@ -2105,7 +2124,7 @@ January 8 04:05:06 1999 PST
</para> </para>
<para> <para>
<productname>Postgres</productname> obtains time zone support <productname>PostgreSQL</productname> obtains time zone support
from the underlying operating system for dates between 1902 and from the underlying operating system for dates between 1902 and
2038 (near the typical date limits for Unix-style 2038 (near the typical date limits for Unix-style
systems). Outside of this range, all dates are assumed to be systems). Outside of this range, all dates are assumed to be
...@@ -2178,7 +2197,7 @@ January 8 04:05:06 1999 PST ...@@ -2178,7 +2197,7 @@ January 8 04:05:06 1999 PST
<title>Internals</title> <title>Internals</title>
<para> <para>
<productname>Postgres</productname> uses Julian dates <productname>PostgreSQL</productname> uses Julian dates
for all date/time calculations. They have the nice property of correctly for all date/time calculations. They have the nice property of correctly
predicting/calculating any date more recent than 4713BC predicting/calculating any date more recent than 4713BC
to far into the future, using the assumption that the length of the to far into the future, using the assumption that the length of the
...@@ -2210,7 +2229,7 @@ January 8 04:05:06 1999 PST ...@@ -2210,7 +2229,7 @@ January 8 04:05:06 1999 PST
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> provides the <productname>PostgreSQL</productname> provides the
<acronym>SQL99</acronym> type <type>boolean</type>. <acronym>SQL99</acronym> type <type>boolean</type>.
<type>boolean</type> can have one of only two states: <type>boolean</type> can have one of only two states:
<quote>true</quote> or <quote>false</quote>. A third state, <quote>true</quote> or <quote>false</quote>. A third state,
...@@ -2649,7 +2668,7 @@ SELECT * FROM test1 WHERE a; ...@@ -2649,7 +2668,7 @@ SELECT * FROM test1 WHERE a;
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</> offers data types to store IP and MAC <productname>PostgreSQL</> offers data types to store IP and MAC
addresses. It is preferable to use these types over plain text addresses. It is preferable to use these types over plain text
types, because these types offer input error checking and several types, because these types offer input error checking and several
specialized operators and functions. specialized operators and functions.
...@@ -2914,7 +2933,7 @@ SELECT * FROM test1 WHERE a; ...@@ -2914,7 +2933,7 @@ SELECT * FROM test1 WHERE a;
<note> <note>
<para> <para>
Prior to PostgreSQL 7.2, <type>BIT</type> type data was Prior to <productname>PostgreSQL</> 7.2, <type>BIT</type> type data was
zero-padded on the right. This was changed to comply with the zero-padded on the right. This was changed to comply with the
SQL standard. To implement zero-padded bit strings, a SQL standard. To implement zero-padded bit strings, a
combination of the concatenation operator and the combination of the concatenation operator and the
...@@ -2956,11 +2975,12 @@ sgml-shorttag:t ...@@ -2956,11 +2975,12 @@ sgml-shorttag:t
sgml-minimize-attributes:nil sgml-minimize-attributes:nil
sgml-always-quote-attributes:t sgml-always-quote-attributes:t
sgml-indent-step:1 sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t sgml-indent-data:t
sgml-parent-document:nil sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced" sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog") sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil sgml-local-ecat-files:nil
End: End:
--> -->
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.22 2001/09/28 08:15:35 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.23 2001/11/21 05:53:41 thomas Exp $
Date/time details Date/time details
--> -->
<appendix id="datetime-appendix"> <appendix id="datetime-appendix">
<title id="datetime-appendix-title">Date/Time Support</title> <title id="datetime-appendix-title">Date/Time Support</title>
<sect1 id="timezones"> <sect1 id="timezones">
<title>Time Zones</title> <title>Time Zones</title>
<indexterm zone="timezones"> <indexterm zone="timezones">
<primary>time zones</primary> <primary>time zones</primary>
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> contains internal tabular <productname>PostgreSQL</productname> contains internal tabular
information for time zone decoding, since there is no *nix standard information for time zone decoding, since there is no *nix standard
system interface to provide access to general, cross-timezone system interface to provide access to general, cross-timezone
information. The underlying OS <emphasis>is</emphasis> used to information. The underlying OS <emphasis>is</emphasis> used to
provide time zone information for <emphasis>output</emphasis>, however. provide time zone information for <emphasis>output</emphasis>, however.
<table tocentry="1"> <table tocentry="1">
<title><productname>Postgres</productname> Recognized Time Zones</title> <title><productname>PostgreSQL</productname> Recognized Time Zones</title>
<titleabbrev>Time Zones</titleabbrev> <titleabbrev>Time Zones</titleabbrev>
<tgroup cols="3"> <tgroup cols="3">
<thead> <thead>
<row> <row>
<entry>Time Zone</entry> <entry>Time Zone</entry>
<entry>Offset from UTC</entry> <entry>Offset from UTC</entry>
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry>NZDT</entry> <entry>NZDT</entry>
<entry>+13:00</entry> <entry>+13:00</entry>
<entry>New Zealand Daylight Time</entry> <entry>New Zealand Daylight Time</entry>
</row> </row>
<row> <row>
<entry>IDLE</entry> <entry>IDLE</entry>
<entry>+12:00</entry> <entry>+12:00</entry>
<entry>International Date Line, East</entry> <entry>International Date Line, East</entry>
</row> </row>
<row> <row>
<entry>NZST</entry> <entry>NZST</entry>
<entry>+12:00</entry> <entry>+12:00</entry>
<entry>New Zealand Standard Time</entry> <entry>New Zealand Standard Time</entry>
</row> </row>
<row> <row>
<entry>NZT</entry> <entry>NZT</entry>
<entry>+12:00</entry> <entry>+12:00</entry>
<entry>New Zealand Time</entry> <entry>New Zealand Time</entry>
</row> </row>
<row> <row>
<entry>AESST</entry> <entry>AESST</entry>
<entry>+11:00 </entry> <entry>+11:00 </entry>
<entry>Australia Eastern Summer Standard Time</entry> <entry>Australia Eastern Summer Standard Time</entry>
</row> </row>
<row> <row>
<entry>ACSST</entry> <entry>ACSST</entry>
<entry>+10:30 </entry> <entry>+10:30 </entry>
<entry>Central Australia Summer Standard Time</entry> <entry>Central Australia Summer Standard Time</entry>
</row> </row>
<row> <row>
<entry>CADT</entry> <entry>CADT</entry>
<entry>+10:30 </entry> <entry>+10:30 </entry>
<entry>Central Australia Daylight Savings Time</entry> <entry>Central Australia Daylight Savings Time</entry>
</row> </row>
<row> <row>
<entry>SADT</entry> <entry>SADT</entry>
<entry>+10:30</entry> <entry>+10:30</entry>
<entry>South Australian Daylight Time</entry> <entry>South Australian Daylight Time</entry>
</row> </row>
<row> <row>
<entry>AEST</entry> <entry>AEST</entry>
<entry>+10:00 </entry> <entry>+10:00 </entry>
<entry>Australia Eastern Standard Time</entry> <entry>Australia Eastern Standard Time</entry>
</row> </row>
<row> <row>
<entry>EAST</entry> <entry>EAST</entry>
<entry>+10:00 </entry> <entry>+10:00 </entry>
<entry>East Australian Standard Time</entry> <entry>East Australian Standard Time</entry>
</row> </row>
<row> <row>
<entry>GST</entry> <entry>GST</entry>
<entry>+10:00</entry> <entry>+10:00</entry>
<entry>Guam Standard Time, USSR Zone 9</entry> <entry>Guam Standard Time, USSR Zone 9</entry>
</row> </row>
<row> <row>
<entry>LIGT</entry> <entry>LIGT</entry>
<entry>+10:00</entry> <entry>+10:00</entry>
<entry>Melbourne, Australia</entry> <entry>Melbourne, Australia</entry>
</row> </row>
<row> <row>
<entry>ACST</entry> <entry>ACST</entry>
<entry>+09:30 </entry> <entry>+09:30 </entry>
<entry>Central Australia Standard Time</entry> <entry>Central Australia Standard Time</entry>
</row> </row>
<row> <row>
<entry>SAST</entry> <entry>SAST</entry>
<entry>+09:30 </entry> <entry>+09:30 </entry>
<entry>South Australia Standard Time</entry> <entry>South Australia Standard Time</entry>
</row> </row>
<row> <row>
<entry>CAST</entry> <entry>CAST</entry>
<entry>+09:30 </entry> <entry>+09:30 </entry>
<entry>Central Australia Standard Time</entry> <entry>Central Australia Standard Time</entry>
</row> </row>
<row> <row>
<entry>AWSST</entry> <entry>AWSST</entry>
<entry>+9:00 </entry> <entry>+9:00 </entry>
<entry>Australia Western Summer Standard Time</entry> <entry>Australia Western Summer Standard Time</entry>
</row> </row>
<row> <row>
<entry>JST</entry> <entry>JST</entry>
<entry>+9:00</entry> <entry>+9:00</entry>
<entry>Japan Standard Time,USSR Zone 8</entry> <entry>Japan Standard Time,USSR Zone 8</entry>
</row> </row>
<row> <row>
<entry>KST</entry> <entry>KST</entry>
<entry>+9:00</entry> <entry>+9:00</entry>
<entry>Korea Standard Time</entry> <entry>Korea Standard Time</entry>
</row> </row>
<row> <row>
<entry>WDT</entry> <entry>WDT</entry>
<entry>+9:00</entry> <entry>+9:00</entry>
<entry>West Australian Daylight Time</entry> <entry>West Australian Daylight Time</entry>
</row> </row>
<row> <row>
<entry>MT</entry> <entry>MT</entry>
<entry>+8:30</entry> <entry>+8:30</entry>
<entry>Moluccas Time</entry> <entry>Moluccas Time</entry>
</row> </row>
<row> <row>
<entry>AWST</entry> <entry>AWST</entry>
<entry>+8:00 </entry> <entry>+8:00 </entry>
<entry>Australia Western Standard Time</entry> <entry>Australia Western Standard Time</entry>
</row> </row>
<row> <row>
<entry>CCT</entry> <entry>CCT</entry>
<entry>+8:00 </entry> <entry>+8:00 </entry>
<entry>China Coastal Time</entry> <entry>China Coastal Time</entry>
</row> </row>
<row> <row>
<entry>WADT</entry> <entry>WADT</entry>
<entry>+8:00</entry> <entry>+8:00</entry>
<entry>West Australian Daylight Time</entry> <entry>West Australian Daylight Time</entry>
</row> </row>
<row> <row>
<entry>WST</entry> <entry>WST</entry>
<entry>+8:00</entry> <entry>+8:00</entry>
<entry>West Australian Standard Time</entry> <entry>West Australian Standard Time</entry>
</row> </row>
<row> <row>
<entry>JT</entry> <entry>JT</entry>
<entry>+7:30</entry> <entry>+7:30</entry>
<entry>Java Time</entry> <entry>Java Time</entry>
</row> </row>
<row> <row>
<entry>WAST</entry> <entry>WAST</entry>
<entry>+7:00</entry> <entry>+7:00</entry>
<entry>West Australian Standard Time</entry> <entry>West Australian Standard Time</entry>
</row> </row>
<row> <row>
<entry>IT</entry> <entry>CXT</entry>
<entry>+3:30</entry> <entry>+7:00</entry>
<entry>Iran Time</entry> <entry>Christmas (Island) Time</entry>
</row> </row>
<row>
<entry>BT</entry>
<entry>+3:00 </entry>
<entry>Baghdad Time</entry>
</row>
<row>
<entry>EETDST</entry>
<entry>+3:00 </entry>
<entry>Eastern Europe Daylight Savings Time</entry>
</row>
<row>
<entry>CETDST</entry>
<entry>+2:00 </entry>
<entry>Central European Daylight Savings Time</entry>
</row>
<row>
<entry>EET</entry>
<entry>+2:00 </entry>
<entry>Eastern Europe, USSR Zone 1</entry>
</row>
<row>
<entry>FWT</entry>
<entry>+2:00</entry>
<entry>French Winter Time</entry>
</row>
<row>
<entry>IST</entry>
<entry>+2:00</entry>
<entry>Israel Standard Time</entry>
</row>
<row>
<entry>MEST</entry>
<entry>+2:00</entry>
<entry>Middle Europe Summer Time</entry>
</row>
<row>
<entry>METDST</entry>
<entry>+2:00</entry>
<entry>Middle Europe Daylight Time</entry>
</row>
<row>
<entry>SST</entry>
<entry>+2:00</entry>
<entry>Swedish Summer Time</entry>
</row>
<row>
<entry>BST</entry>
<entry>+1:00 </entry>
<entry>British Summer Time</entry>
</row>
<row>
<entry>CET</entry>
<entry>+1:00 </entry>
<entry>Central European Time</entry>
</row>
<row>
<entry>DNT</entry>
<entry>+1:00 </entry>
<entry><foreignphrase>Dansk Normal Tid</foreignphrase></entry>
</row>
<row>
<entry>FST</entry>
<entry>+1:00 </entry>
<entry>French Summer Time</entry>
</row>
<row>
<entry>MET</entry>
<entry>+1:00</entry>
<entry>Middle Europe Time</entry>
</row>
<row>
<entry>MEWT</entry>
<entry>+1:00</entry>
<entry>Middle Europe Winter Time</entry>
</row>
<row>
<entry>MEZ</entry>
<entry>+1:00</entry>
<entry>Middle Europe Zone</entry>
</row>
<row>
<entry>NOR</entry>
<entry>+1:00</entry>
<entry>Norway Standard Time</entry>
</row>
<row>
<entry>SET</entry>
<entry>+1:00</entry>
<entry>Seychelles Time</entry>
</row>
<row>
<entry>SWT</entry>
<entry>+1:00</entry>
<entry>Swedish Winter Time</entry>
</row>
<row>
<entry>WETDST</entry>
<entry>+1:00</entry>
<entry>Western Europe Daylight Savings Time</entry>
</row>
<row>
<entry>GMT</entry>
<entry>0:00</entry>
<entry>Greenwich Mean Time</entry>
</row>
<row>
<entry>WET</entry>
<entry>0:00</entry>
<entry>Western Europe</entry>
</row>
<row>
<entry>WAT</entry>
<entry>-1:00</entry>
<entry>West Africa Time</entry>
</row>
<row>
<entry>NDT</entry>
<entry>-2:30</entry>
<entry>Newfoundland Daylight Time</entry>
</row>
<row>
<entry>ADT</entry>
<entry>-03:00 </entry>
<entry>Atlantic Daylight Time</entry>
</row>
<row>
<entry>NFT</entry>
<entry>-3:30</entry>
<entry>Newfoundland Standard Time</entry>
</row>
<row>
<entry>NST</entry>
<entry>-3:30</entry>
<entry>Newfoundland Standard Time</entry>
</row>
<row>
<entry>AST</entry>
<entry>-4:00 </entry>
<entry>Atlantic Standard Time (Canada)</entry>
</row>
<row>
<entry>EDT</entry>
<entry>-4:00 </entry>
<entry>Eastern Daylight Time</entry>
</row>
<!--
<row>
<entry>ZP4</entry>
<entry>-4:00</entry>
<entry>GMT +4 hours</entry>
</row>
-->
<row>
<entry>CDT</entry>
<entry>-5:00 </entry>
<entry>Central Daylight Time</entry>
</row>
<row>
<entry>EST</entry>
<entry>-5:00 </entry>
<entry>Eastern Standard Time</entry>
</row>
<!--
<row>
<entry>ZP5</entry>
<entry>-5:00</entry>
<entry>GMT +5 hours</entry>
</row>
-->
<row>
<entry>CST</entry>
<entry>-6:00 </entry>
<entry>Central Standard Time</entry>
</row>
<row>
<entry>MDT</entry>
<entry>-6:00</entry>
<entry>Mountain Daylight Time</entry>
</row>
<!-- <!--
<row> Conflicts with China Coastal Time
<entry>ZP6</entry> <row>
<entry>-6:00</entry> <entry>CCT</entry>
<entry>GMT +6 hours</entry> <entry>+6:30 </entry>
</row> <entry>Cocos Island Time</entry>
</row>
--> -->
<row>
<entry>IOT</entry>
<entry>+5:00</entry>
<entry>Indian Chagos Time</entry>
</row>
<row>
<entry>MVT</entry>
<entry>+5:00</entry>
<entry>Maldives Island Time</entry>
</row>
<row>
<entry>TFT</entry>
<entry>+5:00</entry>
<entry>Kerguelen Time</entry>
</row>
<row>
<entry>EAST</entry>
<entry>+4:00</entry>
<entry>Antananarivo Savings Time</entry>
</row>
<row>
<entry>MUT</entry>
<entry>+4:00</entry>
<entry>Mauritius Island Time</entry>
</row>
<row>
<entry>RET</entry>
<entry>+4:00</entry>
<entry>Reunion Island Time</entry>
</row>
<row>
<entry>SCT</entry>
<entry>+4:00</entry>
<entry>Mahe Island Time</entry>
</row>
<row>
<entry>IT</entry>
<entry>+3:30</entry>
<entry>Iran Time</entry>
</row>
<row>
<entry>EAT</entry>
<entry>+3:00</entry>
<entry>Antananarivo, Comoro Time</entry>
</row>
<row>
<entry>BT</entry>
<entry>+3:00 </entry>
<entry>Baghdad Time</entry>
</row>
<row>
<entry>EETDST</entry>
<entry>+3:00 </entry>
<entry>Eastern Europe Daylight Savings Time</entry>
</row>
<row>
<entry>BDST</entry>
<entry>+2:00 </entry>
<entry>British Double Standard Time</entry>
</row>
<row>
<entry>CEST</entry>
<entry>+2:00 </entry>
<entry>Central European Savings Time</entry>
</row>
<row>
<entry>CETDST</entry>
<entry>+2:00 </entry>
<entry>Central European Daylight Savings Time</entry>
</row>
<row>
<entry>EET</entry>
<entry>+2:00 </entry>
<entry>Eastern Europe, USSR Zone 1</entry>
</row>
<row>
<entry>FWT</entry>
<entry>+2:00</entry>
<entry>French Winter Time</entry>
</row>
<row>
<entry>IST</entry>
<entry>+2:00</entry>
<entry>Israel Standard Time</entry>
</row>
<row>
<entry>MEST</entry>
<entry>+2:00</entry>
<entry>Middle Europe Summer Time</entry>
</row>
<row>
<entry>METDST</entry>
<entry>+2:00</entry>
<entry>Middle Europe Daylight Time</entry>
</row>
<row>
<entry>SST</entry>
<entry>+2:00</entry>
<entry>Swedish Summer Time</entry>
</row>
<row>
<entry>BST</entry>
<entry>+1:00 </entry>
<entry>British Summer Time</entry>
</row>
<row>
<entry>CET</entry>
<entry>+1:00 </entry>
<entry>Central European Time</entry>
</row>
<row>
<entry>DNT</entry>
<entry>+1:00 </entry>
<entry><foreignphrase>Dansk Normal Tid</foreignphrase></entry>
</row>
<row>
<entry>FST</entry>
<entry>+1:00 </entry>
<entry>French Summer Time</entry>
</row>
<row>
<entry>MET</entry>
<entry>+1:00</entry>
<entry>Middle Europe Time</entry>
</row>
<row>
<entry>MEWT</entry>
<entry>+1:00</entry>
<entry>Middle Europe Winter Time</entry>
</row>
<row>
<entry>MEZ</entry>
<entry>+1:00</entry>
<entry>Middle Europe Zone</entry>
</row>
<row>
<entry>NOR</entry>
<entry>+1:00</entry>
<entry>Norway Standard Time</entry>
</row>
<row>
<entry>SET</entry>
<entry>+1:00</entry>
<entry>Seychelles Time</entry>
</row>
<row>
<entry>SWT</entry>
<entry>+1:00</entry>
<entry>Swedish Winter Time</entry>
</row>
<row>
<entry>WETDST</entry>
<entry>+1:00</entry>
<entry>Western Europe Daylight Savings Time</entry>
</row>
<row>
<entry>GMT</entry>
<entry>0:00</entry>
<entry>Greenwich Mean Time</entry>
</row>
<row>
<entry>WET</entry>
<entry>0:00</entry>
<entry>Western Europe</entry>
</row>
<row>
<entry>WAT</entry>
<entry>-1:00</entry>
<entry>West Africa Time</entry>
</row>
<row>
<entry>NDT</entry>
<entry>-2:30</entry>
<entry>Newfoundland Daylight Time</entry>
</row>
<row>
<entry>ADT</entry>
<entry>-03:00 </entry>
<entry>Atlantic Daylight Time</entry>
</row>
<row>
<entry>NFT</entry>
<entry>-3:30</entry>
<entry>Newfoundland Standard Time</entry>
</row>
<row>
<entry>NST</entry>
<entry>-3:30</entry>
<entry>Newfoundland Standard Time</entry>
</row>
<row>
<entry>AST</entry>
<entry>-4:00 </entry>
<entry>Atlantic Standard Time (Canada)</entry>
</row>
<row>
<entry>EDT</entry>
<entry>-4:00 </entry>
<entry>Eastern Daylight Time</entry>
</row>
<!--
<row> <row>
<entry>MST</entry> <entry>ZP4</entry>
<entry>-7:00</entry> <entry>-4:00</entry>
<entry>Mountain Standard Time</entry> <entry>GMT +4 hours</entry>
</row>
<row>
<entry>PDT</entry>
<entry>-7:00</entry>
<entry>Pacific Daylight Time</entry>
</row>
<row>
<entry>PST</entry>
<entry>-8:00</entry>
<entry>Pacific Standard Time</entry>
</row>
<row>
<entry>YDT</entry>
<entry>-8:00</entry>
<entry>Yukon Daylight Time</entry>
</row>
<row>
<entry>HDT</entry>
<entry>-9:00</entry>
<entry>Hawaii/Alaska Daylight Time</entry>
</row>
<row>
<entry>YST</entry>
<entry>-9:00</entry>
<entry>Yukon Standard Time</entry>
</row>
<row>
<entry>AHST</entry>
<entry>-10:00 </entry>
<entry>Alaska-Hawaii Standard Time</entry>
</row>
<row>
<entry>CAT</entry>
<entry>-10:00 </entry>
<entry>Central Alaska Time</entry>
</row> </row>
-->
<row>
<entry>CDT</entry>
<entry>-5:00 </entry>
<entry>Central Daylight Time</entry>
</row>
<row>
<entry>EST</entry>
<entry>-5:00 </entry>
<entry>Eastern Standard Time</entry>
</row>
<!--
<row> <row>
<entry>NT</entry> <entry>ZP5</entry>
<entry>-11:00</entry> <entry>-5:00</entry>
<entry>Nome Time</entry> <entry>GMT +5 hours</entry>
</row> </row>
-->
<row>
<entry>CST</entry>
<entry>-6:00 </entry>
<entry>Central Standard Time</entry>
</row>
<row>
<entry>MDT</entry>
<entry>-6:00</entry>
<entry>Mountain Daylight Time</entry>
</row>
<!--
<row> <row>
<entry>IDLW</entry> <entry>ZP6</entry>
<entry>-12:00</entry> <entry>-6:00</entry>
<entry>International Date Line, West</entry> <entry>GMT +6 hours</entry>
</row> </row>
</tbody> -->
</tgroup> <row>
</table> <entry>MST</entry>
</para> <entry>-7:00</entry>
<entry>Mountain Standard Time</entry>
</row>
<row>
<entry>PDT</entry>
<entry>-7:00</entry>
<entry>Pacific Daylight Time</entry>
</row>
<row>
<entry>PST</entry>
<entry>-8:00</entry>
<entry>Pacific Standard Time</entry>
</row>
<row>
<entry>YDT</entry>
<entry>-8:00</entry>
<entry>Yukon Daylight Time</entry>
</row>
<row>
<entry>HDT</entry>
<entry>-9:00</entry>
<entry>Hawaii/Alaska Daylight Time</entry>
</row>
<row>
<entry>YST</entry>
<entry>-9:00</entry>
<entry>Yukon Standard Time</entry>
</row>
<row>
<entry>AHST</entry>
<entry>-10:00 </entry>
<entry>Alaska-Hawaii Standard Time</entry>
</row>
<row>
<entry>CAT</entry>
<entry>-10:00 </entry>
<entry>Central Alaska Time</entry>
</row>
<row>
<entry>NT</entry>
<entry>-11:00</entry>
<entry>Nome Time</entry>
</row>
<row>
<entry>IDLW</entry>
<entry>-12:00</entry>
<entry>International Date Line, West</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<sect2> <sect2>
<title>Australian Time Zones</title> <title>Australian Time Zones</title>
...@@ -414,7 +477,7 @@ Date/time details ...@@ -414,7 +477,7 @@ Date/time details
<para> <para>
Australian time zones and their naming variants Australian time zones and their naming variants
account for fully one quarter of all time zones in the account for fully one quarter of all time zones in the
<productname>Postgres</productname> time zone lookup table. <productname>PostgreSQL</productname> time zone lookup table.
There are two naming conflicts with time zones commonly used There are two naming conflicts with time zones commonly used
in the United States, <literal>CST</literal> and <literal>EST</literal>. in the United States, <literal>CST</literal> and <literal>EST</literal>.
</para> </para>
...@@ -429,7 +492,7 @@ Date/time details ...@@ -429,7 +492,7 @@ Date/time details
noise word indicating <literal>Saturday</literal>. noise word indicating <literal>Saturday</literal>.
<table tocentry="1"> <table tocentry="1">
<title><productname>Postgres</productname> Australian Time Zones</title> <title><productname>PostgreSQL</productname> Australian Time Zones</title>
<titleabbrev>Australian Time Zones</titleabbrev> <titleabbrev>Australian Time Zones</titleabbrev>
<tgroup cols="3"> <tgroup cols="3">
<thead> <thead>
...@@ -626,7 +689,7 @@ Date/time details ...@@ -626,7 +689,7 @@ Date/time details
<para> <para>
Gregorian years 1-99AD may be entered by using 4 digits with leading Gregorian years 1-99AD may be entered by using 4 digits with leading
zeros (e.g. 0099 is 99AD). Previous versions of zeros (e.g. 0099 is 99AD). Previous versions of
<productname>Postgres</productname> accepted years with three <productname>PostgreSQL</productname> accepted years with three
digits and with single digits, but as of version 7.0 the rules have digits and with single digits, but as of version 7.0 the rules have
been tightened up to reduce the possibility of ambiguity. been tightened up to reduce the possibility of ambiguity.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.16 2001/11/12 19:19:39 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.17 2001/11/21 05:53:41 thomas Exp $
--> -->
<sect2 id="dfunc"> <sect2 id="dfunc">
...@@ -51,7 +51,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.16 2001/11/12 19:19:39 peter ...@@ -51,7 +51,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.16 2001/11/12 19:19:39 peter
<!-- <!--
Note: Reading GNU Libtool sources is generally a good way of figuring out Note: Reading GNU Libtool sources is generally a good way of figuring out
this information. The methods used within PostgreSQL source code are not this information. The methods used within
<productname>PostgreSQL</> source code are not
necessarily ideal. necessarily ideal.
--> -->
...@@ -272,7 +273,7 @@ gcc -shared -o foo.so foo.o ...@@ -272,7 +273,7 @@ gcc -shared -o foo.so foo.o
<para> <para>
The resulting shared library file can then be loaded into The resulting shared library file can then be loaded into
<productname>Postgres</productname>. When specifying the file name <productname>PostgreSQL</productname>. When specifying the file name
to the <command>CREATE FUNCTION</command> command, one must give it to the <command>CREATE FUNCTION</command> command, one must give it
the name of the shared library file, not the intermediate object file. the name of the shared library file, not the intermediate object file.
Note that the system's standard shared-library extension (usually Note that the system's standard shared-library extension (usually
...@@ -303,7 +304,8 @@ ld <other flags> -H512 -T512 -o foo.so -e _nostart \e ...@@ -303,7 +304,8 @@ ld <other flags> -H512 -T512 -o foo.so -e _nostart \e
-bI:.../lib/postgres.exp -bE:foo.exp foo.o \e -bI:.../lib/postgres.exp -bE:foo.exp foo.o \e
-lm -lc 2>/dev/null -lm -lc 2>/dev/null
.fi .fi
You should look at the Postgres User's Manual for an explanation of this You should look at the <citetitle>PostgreSQL User's Manual</>
for an explanation of this
procedure. procedure.
--> -->
...@@ -318,11 +320,12 @@ sgml-shorttag:t ...@@ -318,11 +320,12 @@ sgml-shorttag:t
sgml-minimize-attributes:nil sgml-minimize-attributes:nil
sgml-always-quote-attributes:t sgml-always-quote-attributes:t
sgml-indent-step:1 sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t sgml-indent-data:t
sgml-parent-document:nil sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced" sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog") sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil sgml-local-ecat-files:nil
End: End:
--> -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.35 2001/10/09 18:45:59 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.36 2001/11/21 05:53:41 thomas Exp $ -->
<appendix id="docguide"> <appendix id="docguide">
<title>Documentation</title> <title>Documentation</title>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<listitem> <listitem>
<para> <para>
<citetitle>Developer's Guide</citetitle>: assorted information <citetitle>Developer's Guide</citetitle>: assorted information
for developers of PostgreSQL proper for developers of <productname>PostgreSQL</> proper
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.31 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="ecpg"> <chapter id="ecpg">
...@@ -32,11 +32,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -32,11 +32,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
<para> <para>
This describes the embedded <acronym>SQL</acronym> package for This describes the embedded <acronym>SQL</acronym> package for
<productname>Postgres</productname>. It works with <productname>PostgreSQL</productname>. It works with
<acronym>C</acronym> and <acronym>C++</acronym>. It was written by <acronym>C</acronym> and <acronym>C++</acronym>. It was written by
Linus Tolke (<email>linus@epact.se</email>) and Michael Meskes Linus Tolke (<email>linus@epact.se</email>) and Michael Meskes
(<email>meskes@debian.org</email>). The package is installed with the (<email>meskes@debian.org</email>). The package is installed with the
<productname>Postgres</> distribution, and carries a similar license. <productname>PostgreSQL</> distribution, and carries a similar license.
</para> </para>
<sect1 id="ecpg-why"> <sect1 id="ecpg-why">
...@@ -55,7 +55,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -55,7 +55,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
should work. <application>ecpg</application> was designed to match should work. <application>ecpg</application> was designed to match
this standard as much as possible. It is possible to port embedded this standard as much as possible. It is possible to port embedded
<acronym>SQL</acronym> programs written for other <acronym>SQL</acronym> programs written for other
<acronym>RDBMS</acronym> to <productname>Postgres</productname>. <acronym>RDBMS</acronym> to <productname>PostgreSQL</productname>.
</para> </para>
</sect1> </sect1>
...@@ -99,7 +99,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -99,7 +99,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
<para> <para>
The preprocessor is called <application>ecpg</application>. After The preprocessor is called <application>ecpg</application>. After
installation it resides in the <productname>Postgres</productname> installation it resides in the <productname>PostgreSQL</productname>
<filename>bin/</filename> directory. <filename>bin/</filename> directory.
</para> </para>
</sect2> </sect2>
...@@ -111,7 +111,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -111,7 +111,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
<filename>libecpg.a</filename> or <filename>libecpg.so</filename>. <filename>libecpg.a</filename> or <filename>libecpg.so</filename>.
Additionally, the library uses the <filename>libpq</filename> Additionally, the library uses the <filename>libpq</filename>
library for communication to the library for communication to the
<productname>Postgres</productname> server. You will have to link <productname>PostgreSQL</productname> server. You will have to link
your program using <parameter>-lecpg -lpq</parameter>. your program using <parameter>-lecpg -lpq</parameter>.
</para> </para>
...@@ -133,7 +133,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -133,7 +133,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
The most important function , <function>ECPGdo</function>, logs The most important function , <function>ECPGdo</function>, logs
all <acronym>SQL</acronym> statements with both the expanded all <acronym>SQL</acronym> statements with both the expanded
string, i.e. the string with all the input variables inserted, string, i.e. the string with all the input variables inserted,
and the result from the <productname>Postgres</productname> and the result from the <productname>PostgreSQL</productname>
server. This can be very useful when searching for errors in server. This can be very useful when searching for errors in
your <acronym>SQL</acronym> statements. your <acronym>SQL</acronym> statements.
</para> </para>
...@@ -153,7 +153,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere ...@@ -153,7 +153,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.30 2001/11/12 19:19:39 petere
<title>Error handling</title> <title>Error handling</title>
<para> <para>
To detect errors from the <productname>Postgres</productname> To detect errors from the <productname>PostgreSQL</productname>
server, include a line like: server, include a line like:
<programlisting> <programlisting>
exec sql include sqlca; exec sql include sqlca;
...@@ -241,7 +241,7 @@ struct sqlca ...@@ -241,7 +241,7 @@ struct sqlca
<term><computeroutput>-201 (ECPG_TOO_MANY_ARGUMENTS): Too many arguments line %d.</computeroutput></term> <term><computeroutput>-201 (ECPG_TOO_MANY_ARGUMENTS): Too many arguments line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
This means that <productname>Postgres</productname> has This means that <productname>PostgreSQL</productname> has
returned more arguments than we have matching variables. returned more arguments than we have matching variables.
Perhaps you have forgotten a couple of the host variables in Perhaps you have forgotten a couple of the host variables in
the <command>INTO :var1,:var2</command>-list. the <command>INTO :var1,:var2</command>-list.
...@@ -253,7 +253,7 @@ struct sqlca ...@@ -253,7 +253,7 @@ struct sqlca
<term><computeroutput>-202 (ECPG_TOO_FEW_ARGUMENTS): Too few arguments line %d.</computeroutput></term> <term><computeroutput>-202 (ECPG_TOO_FEW_ARGUMENTS): Too few arguments line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
This means that <productname>Postgres</productname> has This means that <productname>PostgreSQL</productname> has
returned fewer arguments than we have host variables. Perhaps returned fewer arguments than we have host variables. Perhaps
you have too many host variables in the <command>INTO you have too many host variables in the <command>INTO
:var1,:var2</command>-list. :var1,:var2</command>-list.
...@@ -277,7 +277,7 @@ struct sqlca ...@@ -277,7 +277,7 @@ struct sqlca
<listitem> <listitem>
<para> <para>
This means the host variable is of type <type>int</type> and This means the host variable is of type <type>int</type> and
the field in the <productname>Postgres</productname> database the field in the <productname>PostgreSQL</productname> database
is of another type and contains a value that cannot be is of another type and contains a value that cannot be
interpreted as an <type>int</type>. The library uses interpreted as an <type>int</type>. The library uses
<function>strtol()</function> for this conversion. <function>strtol()</function> for this conversion.
...@@ -291,7 +291,7 @@ struct sqlca ...@@ -291,7 +291,7 @@ struct sqlca
<para> <para>
This means the host variable is of type <type>unsigned This means the host variable is of type <type>unsigned
int</type> and the field in the int</type> and the field in the
<productname>Postgres</productname> database is of another type <productname>PostgreSQL</productname> database is of another type
and contains a value that cannot be interpreted as an and contains a value that cannot be interpreted as an
<type>unsigned int</type>. The library uses <type>unsigned int</type>. The library uses
<function>strtoul()</function> for this conversion. <function>strtoul()</function> for this conversion.
...@@ -304,7 +304,7 @@ struct sqlca ...@@ -304,7 +304,7 @@ struct sqlca
<listitem> <listitem>
<para> <para>
This means the host variable is of type <type>float</type> and This means the host variable is of type <type>float</type> and
the field in the <productname>Postgres</productname> database the field in the <productname>PostgreSQL</productname> database
is of another type and contains a value that cannot be is of another type and contains a value that cannot be
interpreted as a <type>float</type>. The library uses interpreted as a <type>float</type>. The library uses
<function>strtod()</function> for this conversion. <function>strtod()</function> for this conversion.
...@@ -317,7 +317,7 @@ struct sqlca ...@@ -317,7 +317,7 @@ struct sqlca
<listitem> <listitem>
<para> <para>
This means the host variable is of type <type>bool</type> and This means the host variable is of type <type>bool</type> and
the field in the <productname>Postgres</productname> database the field in the <productname>PostgreSQL</productname> database
is neither <literal>'t'</> nor <literal>'f'</>. is neither <literal>'t'</> nor <literal>'f'</>.
</para> </para>
</listitem> </listitem>
...@@ -327,7 +327,7 @@ struct sqlca ...@@ -327,7 +327,7 @@ struct sqlca
<term><computeroutput>-208 (ECPG_EMPTY): Empty query line %d.</computeroutput></term> <term><computeroutput>-208 (ECPG_EMPTY): Empty query line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
<productname>Postgres</productname> returned <symbol>PGRES_EMPTY_QUERY</symbol>, probably <productname>PostgreSQL</productname> returned <symbol>PGRES_EMPTY_QUERY</symbol>, probably
because the query indeed was empty. because the query indeed was empty.
</para> </para>
</listitem> </listitem>
...@@ -337,7 +337,7 @@ struct sqlca ...@@ -337,7 +337,7 @@ struct sqlca
<term><computeroutput>-209 (ECPG_MISSING_INDICATOR): NULL value without indicator in line %d.</computeroutput></term> <term><computeroutput>-209 (ECPG_MISSING_INDICATOR): NULL value without indicator in line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
<productname>Postgres</productname> returned <symbol>ECPG_MISSING_INDICATOR</symbol> <productname>PostgreSQL</productname> returned <symbol>ECPG_MISSING_INDICATOR</symbol>
because a NULL was returned and no NULL indicator variable was supplied. because a NULL was returned and no NULL indicator variable was supplied.
</para> </para>
</listitem> </listitem>
...@@ -347,7 +347,7 @@ struct sqlca ...@@ -347,7 +347,7 @@ struct sqlca
<term><computeroutput>-210 (ECPG_NO_ARRAY): Variable is not an array in line %d.</computeroutput></term> <term><computeroutput>-210 (ECPG_NO_ARRAY): Variable is not an array in line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
<productname>Postgres</productname> returned <symbol>ECPG_NO_ARRAY</symbol> <productname>PostgreSQL</productname> returned <symbol>ECPG_NO_ARRAY</symbol>
because an ordinary variable was used in a place that requires because an ordinary variable was used in a place that requires
an array. an array.
</para> </para>
...@@ -358,7 +358,7 @@ struct sqlca ...@@ -358,7 +358,7 @@ struct sqlca
<term><computeroutput>-211 (ECPG_DATA_NOT_ARRAY): Data read from backend is not an array in line %d.</computeroutput></term> <term><computeroutput>-211 (ECPG_DATA_NOT_ARRAY): Data read from backend is not an array in line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
<productname>Postgres</productname> returned <symbol>ECPG_DATA_NOT_ARRAY</symbol> <productname>PostgreSQL</productname> returned <symbol>ECPG_DATA_NOT_ARRAY</symbol>
because the database returned an ordinary variable in a place because the database returned an ordinary variable in a place
that requires array value. that requires array value.
</para> </para>
...@@ -444,9 +444,9 @@ struct sqlca ...@@ -444,9 +444,9 @@ struct sqlca
<term><computeroutput>-400 (ECPG_PGSQL): Postgres error: %s line %d.</computeroutput></term> <term><computeroutput>-400 (ECPG_PGSQL): Postgres error: %s line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
Some <productname>Postgres</productname> error. Some <productname>PostgreSQL</productname> error.
The message contains the error message from the The message contains the error message from the
<productname>Postgres</productname> backend. <productname>PostgreSQL</productname> backend.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -455,7 +455,7 @@ struct sqlca ...@@ -455,7 +455,7 @@ struct sqlca
<term><computeroutput>-401 (ECPG_TRANS): Error in transaction processing line %d.</computeroutput></term> <term><computeroutput>-401 (ECPG_TRANS): Error in transaction processing line %d.</computeroutput></term>
<listitem> <listitem>
<para> <para>
<productname>Postgres</productname> signaled that we cannot start, <productname>PostgreSQL</productname> signaled that we cannot start,
commit or rollback the transaction. commit or rollback the transaction.
</para> </para>
</listitem> </listitem>
...@@ -506,7 +506,7 @@ struct sqlca ...@@ -506,7 +506,7 @@ struct sqlca
<para> <para>
This would require a total redesign of the This would require a total redesign of the
<productname>Postgres</productname> access model and the <productname>PostgreSQL</productname> access model and the
performance gain does not justify the effort. performance gain does not justify the effort.
</para> </para>
</listitem> </listitem>
...@@ -581,7 +581,7 @@ struct sqlca ...@@ -581,7 +581,7 @@ struct sqlca
<listitem> <listitem>
<para> <para>
to_date et al. does not exist. However, to_date et al. does not exist. However,
<productname>Postgres</productname> has some good conversion <productname>PostgreSQL</productname> has some good conversion
routines so you probably won't miss them. routines so you probably won't miss them.
</para> </para>
</listitem> </listitem>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.14 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="extend"> <chapter id="extend">
...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -7,7 +7,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
<para> <para>
In the sections that follow, we will discuss how you In the sections that follow, we will discuss how you
can extend the <productname>Postgres</productname> can extend the <productname>PostgreSQL</productname>
<acronym>SQL</acronym> query language by adding: <acronym>SQL</acronym> query language by adding:
<itemizedlist spacing="compact" mark="bullet"> <itemizedlist spacing="compact" mark="bullet">
...@@ -38,7 +38,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -38,7 +38,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
<title>How Extensibility Works</title> <title>How Extensibility Works</title>
<para> <para>
<productname>Postgres</productname> is extensible because its operation is <productname>PostgreSQL</productname> is extensible because its operation is
catalog-driven. If you are familiar with standard catalog-driven. If you are familiar with standard
relational systems, you know that they store information relational systems, you know that they store information
about databases, tables, columns, etc., in what are about databases, tables, columns, etc., in what are
...@@ -46,13 +46,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -46,13 +46,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
this the data dictionary). The catalogs appear to the this the data dictionary). The catalogs appear to the
user as tables like any other, but the <acronym>DBMS</acronym> stores user as tables like any other, but the <acronym>DBMS</acronym> stores
its internal bookkeeping in them. One key difference its internal bookkeeping in them. One key difference
between <productname>Postgres</productname> and standard relational systems is between <productname>PostgreSQL</productname> and standard relational systems is
that <productname>Postgres</productname> stores much more information in its that <productname>PostgreSQL</productname> stores much more information in its
catalogs -- not only information about tables and columns, catalogs -- not only information about tables and columns,
but also information about its types, functions, access but also information about its types, functions, access
methods, and so on. These tables can be modified by methods, and so on. These tables can be modified by
the user, and since <productname>Postgres</productname> bases its internal operation the user, and since <productname>PostgreSQL</productname> bases its internal operation
on these tables, this means that <productname>Postgres</productname> can be on these tables, this means that <productname>PostgreSQL</productname> can be
extended by users. By comparison, conventional extended by users. By comparison, conventional
database systems can only be extended by changing hardcoded database systems can only be extended by changing hardcoded
procedures within the <acronym>DBMS</acronym> or by loading modules procedures within the <acronym>DBMS</acronym> or by loading modules
...@@ -60,29 +60,29 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -60,29 +60,29 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
</para> </para>
<para> <para>
<productname>Postgres</productname> is also unlike most other data managers in <productname>PostgreSQL</productname> is also unlike most other data managers in
that the server can incorporate user-written code into that the server can incorporate user-written code into
itself through dynamic loading. That is, the user can itself through dynamic loading. That is, the user can
specify an object code file (e.g., a compiled .o file specify an object code file (e.g., a compiled .o file
or shared library) that implements a new type or function or shared library) that implements a new type or function
and <productname>Postgres</productname> will load it as required. Code written and <productname>PostgreSQL</productname> will load it as required. Code written
in <acronym>SQL</acronym> are even more trivial to add to the server. in <acronym>SQL</acronym> are even more trivial to add to the server.
This ability to modify its operation <quote>on the fly</quote> makes This ability to modify its operation <quote>on the fly</quote> makes
<productname>Postgres</productname> uniquely suited for rapid prototyping of new <productname>PostgreSQL</productname> uniquely suited for rapid prototyping of new
applications and storage structures. applications and storage structures.
</para> </para>
</sect1> </sect1>
<sect1 id="type-system"> <sect1 id="type-system">
<title>The <productname>Postgres</productname> Type System</title> <title>The <productname>PostgreSQL</productname> Type System</title>
<para> <para>
The <productname>Postgres</productname> type system The <productname>PostgreSQL</productname> type system
can be broken down in several ways. can be broken down in several ways.
Types are divided into base types and composite types. Types are divided into base types and composite types.
Base types are those, like <firstterm>int4</firstterm>, that are implemented Base types are those, like <firstterm>int4</firstterm>, that are implemented
in a language such as <productname>C</productname>. They generally correspond to in a language such as <productname>C</productname>. They generally correspond to
what are often known as <firstterm>abstract data types</firstterm>; <productname>Postgres</productname> what are often known as <firstterm>abstract data types</firstterm>; <productname>PostgreSQL</productname>
can only operate on such types through methods provided can only operate on such types through methods provided
by the user and only understands the behavior of such by the user and only understands the behavior of such
types to the extent that the user describes them. types to the extent that the user describes them.
...@@ -91,13 +91,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -91,13 +91,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
</para> </para>
<para> <para>
<productname>Postgres</productname> stores these types <productname>PostgreSQL</productname> stores these types
in only one way (within the in only one way (within the
file that stores all rows of a table) but the file that stores all rows of a table) but the
user can <quote>look inside</quote> at the attributes of these types user can <quote>look inside</quote> at the attributes of these types
from the query language and optimize their retrieval by from the query language and optimize their retrieval by
(for example) defining indexes on the attributes. (for example) defining indexes on the attributes.
<productname>Postgres</productname> base types are further <productname>PostgreSQL</productname> base types are further
divided into built-in divided into built-in
types and user-defined types. Built-in types (like types and user-defined types. Built-in types (like
<firstterm>int4</firstterm>) are those that are compiled <firstterm>int4</firstterm>) are those that are compiled
...@@ -108,7 +108,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -108,7 +108,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
</sect1> </sect1>
<sect1 id="pg-system-catalogs"> <sect1 id="pg-system-catalogs">
<title>About the <productname>Postgres</productname> System Catalogs</title> <title>About the <productname>PostgreSQL</productname> System Catalogs</title>
<para> <para>
Having introduced the basic extensibility concepts, we Having introduced the basic extensibility concepts, we
...@@ -125,7 +125,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -125,7 +125,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
them directly.) them directly.)
<table tocentry="1"> <table tocentry="1">
<title>Postgres System Catalogs</title> <title>PostgreSQL System Catalogs</title>
<titleabbrev>Catalogs</titleabbrev> <titleabbrev>Catalogs</titleabbrev>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
...@@ -190,7 +190,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -190,7 +190,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
<para> <para>
<figure float="1" id="EXTEND-CATALOGS"> <figure float="1" id="EXTEND-CATALOGS">
<title>The major <productname>Postgres</productname> system catalogs</title> <title>The major <productname>PostgreSQL</productname> system catalogs</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="catalogs" align="center"> <imagedata fileref="catalogs" align="center">
...@@ -246,7 +246,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete ...@@ -246,7 +246,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.13 2001/09/30 16:05:54 pete
Nearly every catalog contains some reference to Nearly every catalog contains some reference to
rows in one or both of these tables. For rows in one or both of these tables. For
example, <productname>Postgres</productname> frequently uses type example, <productname>PostgreSQL</productname> frequently uses type
signatures (e.g., of functions and operators) to signatures (e.g., of functions and operators) to
identify unique rows of other catalogs. identify unique rows of other catalogs.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.83 2001/11/20 15:42:44 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.84 2001/11/21 05:53:41 thomas Exp $
Postgres documentation PostgreSQL documentation
--> -->
<chapter id="functions"> <chapter id="functions">
...@@ -15,7 +15,7 @@ Postgres documentation ...@@ -15,7 +15,7 @@ Postgres documentation
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> provides a large number of <productname>PostgreSQL</productname> provides a large number of
functions and operators for the built-in data types. Users can also functions and operators for the built-in data types. Users can also
define their own functions and operators, as described in the define their own functions and operators, as described in the
<citetitle>Programmer's Guide</citetitle>. The <citetitle>Programmer's Guide</citetitle>. The
...@@ -1349,7 +1349,7 @@ Postgres documentation ...@@ -1349,7 +1349,7 @@ Postgres documentation
<para> <para>
There are two separate approaches to pattern matching provided by There are two separate approaches to pattern matching provided by
<productname>Postgres</productname>: the <acronym>SQL</acronym> <productname>PostgreSQL</productname>: the <acronym>SQL</acronym>
<function>LIKE</function> operator and <function>LIKE</function> operator and
<acronym>POSIX</acronym>-style regular expressions. <acronym>POSIX</acronym>-style regular expressions.
</para> </para>
...@@ -1446,7 +1446,7 @@ Postgres documentation ...@@ -1446,7 +1446,7 @@ Postgres documentation
The keyword <token>ILIKE</token> can be used instead of The keyword <token>ILIKE</token> can be used instead of
<token>LIKE</token> to make the match case insensitive according <token>LIKE</token> to make the match case insensitive according
to the active locale. This is not in the <acronym>SQL</acronym> standard but is a to the active locale. This is not in the <acronym>SQL</acronym> standard but is a
<productname>Postgres</productname> extension. <productname>PostgreSQL</productname> extension.
</para> </para>
<para> <para>
...@@ -1456,7 +1456,7 @@ Postgres documentation ...@@ -1456,7 +1456,7 @@ Postgres documentation
<literal>!~~</literal> and <literal>!~~*</literal> operators that <literal>!~~</literal> and <literal>!~~*</literal> operators that
represent <function>NOT LIKE</function> and <function>NOT represent <function>NOT LIKE</function> and <function>NOT
ILIKE</function>. All of these operators are ILIKE</function>. All of these operators are
<productname>Postgres</productname>-specific. <productname>PostgreSQL</productname>-specific.
</para> </para>
</sect2> </sect2>
...@@ -1537,7 +1537,7 @@ Postgres documentation ...@@ -1537,7 +1537,7 @@ Postgres documentation
<command>egrep</command>; 1003.2 calls these <command>egrep</command>; 1003.2 calls these
<quote>extended</quote> REs) and obsolete REs (roughly those of <quote>extended</quote> REs) and obsolete REs (roughly those of
<command>ed</command>; 1003.2 <quote>basic</quote> REs). <command>ed</command>; 1003.2 <quote>basic</quote> REs).
<productname>Postgres</productname> implements the modern form. <productname>PostgreSQL</productname> implements the modern form.
</para> </para>
<para> <para>
...@@ -1786,7 +1786,7 @@ Postgres documentation ...@@ -1786,7 +1786,7 @@ Postgres documentation
</note> </note>
<para> <para>
The <productname>Postgres</productname> formatting functions The <productname>PostgreSQL</productname> formatting functions
provide a powerful set of tools for converting various data types provide a powerful set of tools for converting various data types
(date/time, integer, floating point, numeric) to formatted strings (date/time, integer, floating point, numeric) to formatted strings
and for converting from formatted strings to specific data types. and for converting from formatted strings to specific data types.
...@@ -2137,7 +2137,7 @@ Postgres documentation ...@@ -2137,7 +2137,7 @@ Postgres documentation
in a string constant, a double backslash in a string constant, a double backslash
(<quote><literal>\\</literal></quote>) must be entered; for (<quote><literal>\\</literal></quote>) must be entered; for
example <literal>'\\HH\\MI\\SS'</literal>. This is true for example <literal>'\\HH\\MI\\SS'</literal>. This is true for
any string constant in <productname>Postgres</productname>. any string constant in <productname>PostgreSQL</productname>.
</para> </para>
</listitem> </listitem>
...@@ -2311,7 +2311,7 @@ Postgres documentation ...@@ -2311,7 +2311,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
<literal>PL</literal>, <literal>SG</literal>, and <literal>PL</literal>, <literal>SG</literal>, and
<literal>TH</literal> are <productname>Postgres</productname> <literal>TH</literal> are <productname>PostgreSQL</productname>
extensions. extensions.
</para> </para>
</listitem> </listitem>
...@@ -3217,7 +3217,7 @@ SELECT CURRENT_TIMESTAMP; ...@@ -3217,7 +3217,7 @@ SELECT CURRENT_TIMESTAMP;
<para> <para>
The function <function>now()</function> is the traditional The function <function>now()</function> is the traditional
<productname>Postgres</productname> equivalent to <productname>PostgreSQL</productname> equivalent to
<function>CURRENT_TIMESTAMP</function>. <function>CURRENT_TIMESTAMP</function>.
</para> </para>
...@@ -3889,7 +3889,7 @@ SELECT TIMESTAMP 'now'; ...@@ -3889,7 +3889,7 @@ SELECT TIMESTAMP 'now';
</table> </table>
<para> <para>
This section describes <productname>Postgres</productname>'s functions This section describes <productname>PostgreSQL</productname>'s functions
for operating on <firstterm>sequence objects</>. for operating on <firstterm>sequence objects</>.
Sequence objects (also called sequence generators or Sequence objects (also called sequence generators or
just sequences) are special single-row tables created with just sequences) are special single-row tables created with
...@@ -4013,7 +4013,7 @@ SELECT setval('foo', 42, false); <lineannotation>Next nextval() will return 4 ...@@ -4013,7 +4013,7 @@ SELECT setval('foo', 42, false); <lineannotation>Next nextval() will return 4
<para> <para>
This section describes the <acronym>SQL</acronym>-compliant conditional expressions This section describes the <acronym>SQL</acronym>-compliant conditional expressions
available in <productname>Postgres</productname>. available in <productname>PostgreSQL</productname>.
</para> </para>
<tip> <tip>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.19 2001/10/09 18:46:00 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.20 2001/11/21 05:53:41 thomas Exp $
Genetic Optimizer Genetic Optimizer
--> -->
...@@ -49,14 +49,14 @@ Genetic Optimizer ...@@ -49,14 +49,14 @@ Genetic Optimizer
grows exponentially with the number of joins included in it. Further grows exponentially with the number of joins included in it. Further
optimization effort is caused by the support of a variety of optimization effort is caused by the support of a variety of
<firstterm>join methods</firstterm> <firstterm>join methods</firstterm>
(e.g., nested loop, hash join, merge join in <productname>Postgres</productname>) to (e.g., nested loop, hash join, merge join in <productname>PostgreSQL</productname>) to
process individual joins and a diversity of process individual joins and a diversity of
<firstterm>indexes</firstterm> (e.g., R-tree, <firstterm>indexes</firstterm> (e.g., R-tree,
B-tree, hash in <productname>Postgres</productname>) as access paths for relations. B-tree, hash in <productname>PostgreSQL</productname>) as access paths for relations.
</para> </para>
<para> <para>
The current <productname>Postgres</productname> optimizer The current <productname>PostgreSQL</productname> optimizer
implementation performs a <firstterm>near-exhaustive search</firstterm> implementation performs a <firstterm>near-exhaustive search</firstterm>
over the space of alternative strategies. This query over the space of alternative strategies. This query
optimization technique is inadequate to support database application optimization technique is inadequate to support database application
...@@ -67,7 +67,7 @@ Genetic Optimizer ...@@ -67,7 +67,7 @@ Genetic Optimizer
<para> <para>
The Institute of Automatic Control at the University of Mining and The Institute of Automatic Control at the University of Mining and
Technology, in Freiberg, Germany, encountered the described problems as its Technology, in Freiberg, Germany, encountered the described problems as its
folks wanted to take the <productname>Postgres</productname> DBMS as the backend for a decision folks wanted to take the <productname>PostgreSQL</productname> DBMS as the backend for a decision
support knowledge based system for the maintenance of an electrical support knowledge based system for the maintenance of an electrical
power grid. The DBMS needed to handle large join queries for the power grid. The DBMS needed to handle large join queries for the
inference machine of the knowledge based system. inference machine of the knowledge based system.
...@@ -166,7 +166,7 @@ Genetic Optimizer ...@@ -166,7 +166,7 @@ Genetic Optimizer
</sect1> </sect1>
<sect1 id="geqo-pg-intro"> <sect1 id="geqo-pg-intro">
<title>Genetic Query Optimization (<acronym>GEQO</acronym>) in Postgres</title> <title>Genetic Query Optimization (<acronym>GEQO</acronym>) in PostgreSQL</title>
<para> <para>
The <acronym>GEQO</acronym> module is intended for the solution of the query The <acronym>GEQO</acronym> module is intended for the solution of the query
...@@ -183,7 +183,7 @@ Genetic Optimizer ...@@ -183,7 +183,7 @@ Genetic Optimizer
is encoded by the integer string '4-1-3-2', is encoded by the integer string '4-1-3-2',
which means, first join relation '4' and '1', then '3', and which means, first join relation '4' and '1', then '3', and
then '2', where 1, 2, 3, 4 are relids within the then '2', where 1, 2, 3, 4 are relids within the
<productname>Postgres</productname> optimizer. <productname>PostgreSQL</productname> optimizer.
</para> </para>
<para> <para>
...@@ -193,7 +193,7 @@ Genetic Optimizer ...@@ -193,7 +193,7 @@ Genetic Optimizer
<para> <para>
Specific characteristics of the <acronym>GEQO</acronym> Specific characteristics of the <acronym>GEQO</acronym>
implementation in <productname>Postgres</productname> implementation in <productname>PostgreSQL</productname>
are: are:
<itemizedlist spacing="compact" mark="bullet"> <itemizedlist spacing="compact" mark="bullet">
...@@ -226,7 +226,7 @@ Genetic Optimizer ...@@ -226,7 +226,7 @@ Genetic Optimizer
<para> <para>
The <acronym>GEQO</acronym> module allows The <acronym>GEQO</acronym> module allows
the <productname>Postgres</productname> query optimizer to the <productname>PostgreSQL</productname> query optimizer to
support large join queries effectively through support large join queries effectively through
non-exhaustive search. non-exhaustive search.
</para> </para>
......
...@@ -96,7 +96,7 @@ A few notes on the sources: ...@@ -96,7 +96,7 @@ A few notes on the sources:
</ProgramListing> </ProgramListing>
Roger that!! I thought it could be related to a number of Roger that!! I thought it could be related to a number of
<ProductName>Postgres</ProductName> versions <ProductName>PostgreSQL</ProductName> versions
back and tried the query. My system went nuts and I had to shoot down back and tried the query. My system went nuts and I had to shoot down
the postmaster in about ten minutes. the postmaster in about ten minutes.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.9 2001/09/13 15:55:22 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.10 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="indexcost"> <chapter id="indexcost">
...@@ -28,7 +28,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.9 2001/09/13 15:55 ...@@ -28,7 +28,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/indexcost.sgml,v 2.9 2001/09/13 15:55
<note> <note>
<para> <para>
Prior to Postgres 7.0, a different scheme was used for registering Prior to <productname>PostgreSQL</productname> 7.0, a different
scheme was used for registering
index-specific cost estimation functions. index-specific cost estimation functions.
</para> </para>
</note> </note>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.27 2001/11/19 09:05:01 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.28 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="indexes"> <chapter id="indexes">
<title id="indexes-title">Indexes</title> <title id="indexes-title">Indexes</title>
...@@ -105,7 +105,7 @@ CREATE INDEX test1_id_index ON test1 (id); ...@@ -105,7 +105,7 @@ CREATE INDEX test1_id_index ON test1 (id);
<title>Index Types</title> <title>Index Types</title>
<para> <para>
<productname>Postgres</productname> provides several index types: <productname>PostgreSQL</productname> provides several index types:
B-tree, R-tree, GiST, and Hash. Each index type is more appropriate for B-tree, R-tree, GiST, and Hash. Each index type is more appropriate for
a particular query type because of the algorithm it uses. a particular query type because of the algorithm it uses.
<indexterm> <indexterm>
...@@ -119,7 +119,7 @@ CREATE INDEX test1_id_index ON test1 (id); ...@@ -119,7 +119,7 @@ CREATE INDEX test1_id_index ON test1 (id);
By By
default, the <command>CREATE INDEX</command> command will create a default, the <command>CREATE INDEX</command> command will create a
B-tree index, which fits the most common situations. In B-tree index, which fits the most common situations. In
particular, the <productname>Postgres</productname> query optimizer particular, the <productname>PostgreSQL</productname> query optimizer
will consider using a B-tree index whenever an indexed column is will consider using a B-tree index whenever an indexed column is
involved in a comparison using one of these operators: involved in a comparison using one of these operators:
...@@ -146,7 +146,7 @@ CREATE INDEX test1_id_index ON test1 (id); ...@@ -146,7 +146,7 @@ CREATE INDEX test1_id_index ON test1 (id);
<synopsis> <synopsis>
CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING RTREE (<replaceable>column</replaceable>); CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING RTREE (<replaceable>column</replaceable>);
</synopsis> </synopsis>
The <productname>Postgres</productname> query optimizer will The <productname>PostgreSQL</productname> query optimizer will
consider using an R-tree index whenever an indexed column is consider using an R-tree index whenever an indexed column is
involved in a comparison using one of these operators: involved in a comparison using one of these operators:
...@@ -238,7 +238,7 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor); ...@@ -238,7 +238,7 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor);
<para> <para>
Currently, only the B-tree and GiST implementations support multicolumn Currently, only the B-tree and GiST implementations support multicolumn
indexes. Up to 16 columns may be specified. (This limit can be indexes. Up to 16 columns may be specified. (This limit can be
altered when building <productname>Postgres</productname>; see the altered when building <productname>PostgreSQL</productname>; see the
file <filename>pg_config.h</filename>.) file <filename>pg_config.h</filename>.)
</para> </para>
...@@ -546,7 +546,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE ...@@ -546,7 +546,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE
must understand that indexes are implementation-dependent. must understand that indexes are implementation-dependent.
<acronym>SQL</acronym> does not <acronym>SQL</acronym> does not
define the implementation, merely the relations between data in the define the implementation, merely the relations between data in the
database. <productname>Postgres</productname> does allow database. <productname>PostgreSQL</productname> does allow
non-unique indexes, but indexes non-unique indexes, but indexes
used to enforce <acronym>SQL</acronym> keys are always unique. used to enforce <acronym>SQL</acronym> keys are always unique.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.13 2001/11/08 23:37:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.14 2001/11/21 05:53:41 thomas Exp $
--> -->
<sect1 id="resources"> <sect1 id="resources">
...@@ -127,7 +127,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.13 2001/11/08 23:37:50 petere ...@@ -127,7 +127,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.13 2001/11/08 23:37:50 petere
answered, to share experiences with other users, and to contact answered, to share experiences with other users, and to contact
the developers. Consult the <ulink the developers. Consult the <ulink
url="http://www.postgresql.org/users-lounge/">User's url="http://www.postgresql.org/users-lounge/">User's
Lounge</ulink> section of the PostgreSQL web site for details. Lounge</ulink> section of the <productname>PostgreSQL</>
web site for details.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.16 2001/11/19 03:58:23 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.17 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="inherit"> <chapter id="inherit">
...@@ -25,11 +25,11 @@ CREATE TABLE capitals ( ...@@ -25,11 +25,11 @@ CREATE TABLE capitals (
In this case, a row of capitals <firstterm>inherits</firstterm> all In this case, a row of capitals <firstterm>inherits</firstterm> all
attributes (name, population, and altitude) from its attributes (name, population, and altitude) from its
parent, cities. The type of the attribute name is parent, cities. The type of the attribute name is
<type>text</type>, a native <productname>Postgres</productname> type for variable length <type>text</type>, a native <productname>PostgreSQL</productname> type for variable length
ASCII strings. The type of the attribute population is ASCII strings. The type of the attribute population is
<type>float</type>, a native <productname>Postgres</productname> type for double precision <type>float</type>, a native <productname>PostgreSQL</productname> type for double precision
floating point numbers. State capitals have an extra floating point numbers. State capitals have an extra
attribute, state, that shows their state. In <productname>Postgres</productname>, attribute, state, that shows their state. In <productname>PostgreSQL</productname>,
a table can inherit from zero or more other tables, a table can inherit from zero or more other tables,
and a query can reference either all rows of a and a query can reference either all rows of a
table or all rows of a table plus all of its table or all rows of a table plus all of its
...@@ -150,7 +150,7 @@ SELECT name, altitude ...@@ -150,7 +150,7 @@ SELECT name, altitude
<note> <note>
<title>Deprecated</title> <title>Deprecated</title>
<para> <para>
In previous versions of <productname>Postgres</productname>, the In previous versions of <productname>PostgreSQL</productname>, the
default was not to get access to child tables. This was found to default was not to get access to child tables. This was found to
be error prone and is also in violation of SQL99. Under the old be error prone and is also in violation of SQL99. Under the old
syntax, to get the sub-tables you append <literal>*</literal> to the table name. syntax, to get the sub-tables you append <literal>*</literal> to the table name.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.17 2001/11/21 05:53:41 thomas Exp $
--> -->
<preface id="preface"> <preface id="preface">
...@@ -44,7 +44,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 peter ...@@ -44,7 +44,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 peter
models in part because of its <quote>Spartan simplicity</quote>. models in part because of its <quote>Spartan simplicity</quote>.
However, as mentioned, this simplicity often makes the However, as mentioned, this simplicity often makes the
implementation of certain applications very difficult. implementation of certain applications very difficult.
<productname>Postgres</productname> offers substantial additional <productname>PostgreSQL</productname> offers substantial additional
power by incorporating the following additional power by incorporating the following additional
concepts in such a way that users can easily concepts in such a way that users can easily
extend the system: extend the system:
...@@ -82,16 +82,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 peter ...@@ -82,16 +82,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 peter
</para> </para>
<para> <para>
These features put <productname>Postgres</productname> into the These features put <productname>PostgreSQL</productname> into the
category of databases referred to as category of databases referred to as
<firstterm>object-relational</firstterm>. Note that this is distinct <firstterm>object-relational</firstterm>. Note that this is distinct
from those referred to as <firstterm>object-oriented</firstterm>, from those referred to as <firstterm>object-oriented</firstterm>,
which in general are not as well suited to supporting the which in general are not as well suited to supporting the
traditional relational database languages. traditional relational database languages.
So, although <productname>Postgres</productname> has some So, although <productname>PostgreSQL</productname> has some
object-oriented features, it is firmly in the relational database object-oriented features, it is firmly in the relational database
world. In fact, some commercial databases have recently world. In fact, some commercial databases have recently
incorporated features pioneered by <productname>Postgres</productname>. incorporated features pioneered by <productname>PostgreSQL</productname>.
</para> </para>
</sect1> </sect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.27 2001/10/25 22:00:31 barry Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.28 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="jdbc"> <chapter id="jdbc">
...@@ -20,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.27 2001/10/25 22:00:31 ...@@ -20,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.27 2001/10/25 22:00:31
</para> </para>
<para> <para>
<application>Postgres</application> provides a <firstterm>type <productname>PostgreSQL</> provides a <firstterm>type
4</firstterm> <acronym>JDBC</acronym> Driver. Type 4 indicates 4</firstterm> <acronym>JDBC</acronym> Driver. Type 4 indicates
that the driver is written in Pure Java, and communicates in the that the driver is written in Pure Java, and communicates in the
database system's own network protocol. Because of this, the driver database system's own network protocol. Because of this, the driver
...@@ -225,7 +225,7 @@ import java.sql.*; ...@@ -225,7 +225,7 @@ import java.sql.*;
<para> <para>
In the first method, your code implicitly loads the driver using the In the first method, your code implicitly loads the driver using the
<function>Class.forName()</function> method. <function>Class.forName()</function> method.
For <application>Postgres</application>, you would use: For <productname>PostgreSQL</>, you would use:
<programlisting> <programlisting>
Class.forName("org.postgresql.Driver"); Class.forName("org.postgresql.Driver");
...@@ -245,9 +245,9 @@ Class.forName("org.postgresql.Driver"); ...@@ -245,9 +245,9 @@ Class.forName("org.postgresql.Driver");
<para> <para>
This is the most common method to use, but restricts your code to This is the most common method to use, but restricts your code to
use just <productname>Postgres</productname>. If your code may use just <productname>PostgreSQL</productname>. If your code may
access another database system in the future, and you do not use access another database system in the future, and you do not use
any <productname>Postgres</productname>-specific extensions, then any <productname>PostgreSQL</productname>-specific extensions, then
the second method is advisable. the second method is advisable.
</para> </para>
...@@ -285,7 +285,7 @@ java -Djdbc.drivers=org.postgresql.Driver example.ImageViewer ...@@ -285,7 +285,7 @@ java -Djdbc.drivers=org.postgresql.Driver example.ImageViewer
<para> <para>
With <acronym>JDBC</acronym>, a database is represented by a With <acronym>JDBC</acronym>, a database is represented by a
<acronym>URL</acronym> (Uniform Resource Locator). With <acronym>URL</acronym> (Uniform Resource Locator). With
<application>Postgres</application>, this takes one of the <application>PostgreSQL</application>, this takes one of the
following forms: following forms:
<itemizedlist> <itemizedlist>
...@@ -329,7 +329,7 @@ jdbc:postgresql://<replaceable class="parameter">host</replaceable>:<replaceable ...@@ -329,7 +329,7 @@ jdbc:postgresql://<replaceable class="parameter">host</replaceable>:<replaceable
<listitem> <listitem>
<para> <para>
The port number the server is listening on. Defaults to the The port number the server is listening on. Defaults to the
Postgres standard port number (5432). <productname>PostgreSQL</productname> standard port number (5432).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -465,7 +465,7 @@ st.close(); ...@@ -465,7 +465,7 @@ st.close();
Under the <acronym>JDBC</acronym> specification, you should Under the <acronym>JDBC</acronym> specification, you should
access a field only once. It is safest to stick to this rule, access a field only once. It is safest to stick to this rule,
although at the current time, the although at the current time, the
<productname>Postgres</productname> driver will allow you to <productname>PostgreSQL</productname> driver will allow you to
access a field as many times as you want. access a field as many times as you want.
</para> </para>
</listitem> </listitem>
...@@ -509,7 +509,7 @@ st.executeUpdate("CREATE TABLE basic (a int, b int)"); ...@@ -509,7 +509,7 @@ st.executeUpdate("CREATE TABLE basic (a int, b int)");
<title>Using Large Objects</title> <title>Using Large Objects</title>
<para> <para>
In <application>Postgres</application>, <firstterm>Large In <application>PostgreSQL</application>, <firstterm>Large
Objects</firstterm> (also known as <acronym>BLOB</acronym>s) are Objects</firstterm> (also known as <acronym>BLOB</acronym>s) are
used to hold data in the database that cannot be stored in a normal used to hold data in the database that cannot be stored in a normal
SQL table. They are stored in a separate table in a special format, SQL table. They are stored in a separate table in a special format,
...@@ -518,7 +518,7 @@ st.executeUpdate("CREATE TABLE basic (a int, b int)"); ...@@ -518,7 +518,7 @@ st.executeUpdate("CREATE TABLE basic (a int, b int)");
<important> <important>
<para> <para>
For <productname>Postgres</productname>, you must access Large For <productname>PostgreSQL</productname>, you must access Large
Objects within an <acronym>SQL</acronym> transaction. You would Objects within an <acronym>SQL</acronym> transaction. You would
open a transaction by using the open a transaction by using the
<function>setAutoCommit()</function> method with an input <function>setAutoCommit()</function> method with an input
...@@ -631,10 +631,10 @@ ps.close(); ...@@ -631,10 +631,10 @@ ps.close();
<acronym>JDBC</acronym> <acronym>API</acronym></title> <acronym>JDBC</acronym> <acronym>API</acronym></title>
<para> <para>
<productname>Postgres</productname> is an extensible database <productname>PostgreSQL</productname> is an extensible database
system. You can add your own functions to the backend, which can system. You can add your own functions to the backend, which can
then be called from queries, or even add your own data types. As then be called from queries, or even add your own data types. As
these are facilities unique to <productname>Postgres</productname>, these are facilities unique to <productname>PostgreSQL</productname>,
we support them from Java, with a set of extension we support them from Java, with a set of extension
<acronym>API</acronym>'s. Some features within the core of the <acronym>API</acronym>'s. Some features within the core of the
standard driver actually use these extensions to implement Large standard driver actually use these extensions to implement Large
...@@ -756,7 +756,7 @@ LargeObjectManager lo = ((org.postgresql.Connection)myconn).getLargeObjectAPI(); ...@@ -756,7 +756,7 @@ LargeObjectManager lo = ((org.postgresql.Connection)myconn).getLargeObjectAPI();
public void addDataType(String type, String name) public void addDataType(String type, String name)
</synopsis> </synopsis>
This allows client code to add a handler for one of This allows client code to add a handler for one of
PostgreSQL's more unique data types. Normally, a data type not <productname>PostgreSQL</productname>'s more unique data types. Normally, a data type not
known by the driver is returned by <literal>ResultSet.getObject()</literal> as a known by the driver is returned by <literal>ResultSet.getObject()</literal> as a
<classname>PGobject</> instance. This method allows you to write a class <classname>PGobject</> instance. This method allows you to write a class
that extends <classname>PGobject</>, and tell the driver the type name, and that extends <classname>PGobject</>, and tell the driver the type name, and
...@@ -841,7 +841,7 @@ public Object fastpath(int fnid, ...@@ -841,7 +841,7 @@ public Object fastpath(int fnid,
FastpathArg args[]) throws SQLException FastpathArg args[]) throws SQLException
</synopsis> </synopsis>
<para> <para>
Send a function call to the PostgreSQL backend. Send a function call to the <productname>PostgreSQL</productname> backend.
</para> </para>
<formalpara> <formalpara>
...@@ -871,7 +871,7 @@ public Object fastpath(String name, ...@@ -871,7 +871,7 @@ public Object fastpath(String name,
FastpathArg args[]) throws SQLException FastpathArg args[]) throws SQLException
</synopsis> </synopsis>
<para> <para>
Send a function call to the PostgreSQL backend by name. Send a function call to the <productname>PostgreSQL</productname> backend by name.
</para> </para>
<note> <note>
...@@ -1005,7 +1005,7 @@ public void addFunctions(ResultSet rs) throws SQLException ...@@ -1005,7 +1005,7 @@ public void addFunctions(ResultSet rs) throws SQLException
<title>Implementation note about function name look-ups</title> <title>Implementation note about function name look-ups</title>
<para> <para>
PostgreSQL stores the function id's and their corresponding <productname>PostgreSQL</productname> stores the function id's and their corresponding
names in the <classname>pg_proc</> table. To speed things up locally, names in the <classname>pg_proc</> table. To speed things up locally,
instead of querying each function from that table when instead of querying each function from that table when
required, a <classname>Hashtable</classname> is used. Also, only the function's required, a <classname>Hashtable</classname> is used. Also, only the function's
...@@ -1227,7 +1227,7 @@ Constructors ...@@ -1227,7 +1227,7 @@ Constructors
public PGbox(String s) throws SQLException public PGbox(String s) throws SQLException
Parameters: Parameters:
s - Box definition in PostgreSQL syntax s - Box definition in <productname>PostgreSQL</productname> syntax
Throws: SQLException Throws: SQLException
if definition is invalid if definition is invalid
...@@ -1324,7 +1324,7 @@ Constructors ...@@ -1324,7 +1324,7 @@ Constructors
public PGcircle(String s) throws SQLException public PGcircle(String s) throws SQLException
Parameters: Parameters:
s - definition of the circle in PostgreSQL's syntax. s - definition of the circle in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1338,7 +1338,7 @@ Methods ...@@ -1338,7 +1338,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - definition of the circle in PostgreSQL's syntax. s - definition of the circle in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1417,7 +1417,7 @@ Constructors ...@@ -1417,7 +1417,7 @@ Constructors
public PGline(String s) throws SQLException public PGline(String s) throws SQLException
Parameters: Parameters:
s - definition of the line in PostgreSQL's syntax. s - definition of the line in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1431,7 +1431,7 @@ Methods ...@@ -1431,7 +1431,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of the line segment in PostgreSQL's s - Definition of the line segment in <productname>PostgreSQL</productname>'s
syntax syntax
Throws: SQLException Throws: SQLException
...@@ -1510,7 +1510,7 @@ Constructors ...@@ -1510,7 +1510,7 @@ Constructors
public PGlseg(String s) throws SQLException public PGlseg(String s) throws SQLException
Parameters: Parameters:
s - Definition of the line segment in PostgreSQL's syntax. s - Definition of the line segment in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1524,7 +1524,7 @@ Methods ...@@ -1524,7 +1524,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of the line segment in PostgreSQL's s - Definition of the line segment in <productname>PostgreSQL</productname>'s
syntax syntax
Throws: SQLException Throws: SQLException
...@@ -1600,7 +1600,7 @@ Constructors ...@@ -1600,7 +1600,7 @@ Constructors
public PGpath(String s) throws SQLException public PGpath(String s) throws SQLException
Parameters: Parameters:
s - definition of the path in PostgreSQL's syntax. s - definition of the path in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1610,7 +1610,7 @@ Methods ...@@ -1610,7 +1610,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of the path in PostgreSQL's syntax s - Definition of the path in <productname>PostgreSQL</productname>'s syntax
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1702,7 +1702,7 @@ Constructors ...@@ -1702,7 +1702,7 @@ Constructors
point is embedded within their definition. point is embedded within their definition.
Parameters: Parameters:
value - Definition of this point in PostgreSQL's value - Definition of this point in <productname>PostgreSQL</productname>'s
syntax syntax
public PGpoint() public PGpoint()
...@@ -1714,7 +1714,7 @@ Methods ...@@ -1714,7 +1714,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of this point in PostgreSQL's syntax s - Definition of this point in <productname>PostgreSQL</productname>'s syntax
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1820,7 +1820,7 @@ java.lang.Object ...@@ -1820,7 +1820,7 @@ java.lang.Object
public class PGpolygon extends PGobject implements Serializable, public class PGpolygon extends PGobject implements Serializable,
Cloneable Cloneable
This implements the polygon data type within PostgreSQL. This implements the polygon data type within <productname>PostgreSQL</productname>.
Variables Variables
...@@ -1840,7 +1840,7 @@ Constructors ...@@ -1840,7 +1840,7 @@ Constructors
public PGpolygon(String s) throws SQLException public PGpolygon(String s) throws SQLException
Parameters: Parameters:
s - definition of the polygon in PostgreSQL's syntax. s - definition of the polygon in <productname>PostgreSQL</productname>'s syntax.
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1854,7 +1854,7 @@ Methods ...@@ -1854,7 +1854,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of the polygon in PostgreSQL's syntax s - Definition of the polygon in <productname>PostgreSQL</productname>'s syntax
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
...@@ -1897,7 +1897,7 @@ Methods ...@@ -1897,7 +1897,7 @@ Methods
<para> <para>
Large objects are supported in the standard Large objects are supported in the standard
<acronym>JDBC</acronym> specification. However, that interface is <acronym>JDBC</acronym> specification. However, that interface is
limited, and the <acronym>API</acronym> provided by PostgreSQL allows for random limited, and the <acronym>API</acronym> provided by <productname>PostgreSQL</productname> allows for random
access to the objects contents, as if it was a local file. access to the objects contents, as if it was a local file.
</para> </para>
...@@ -2429,7 +2429,7 @@ java.lang.Object ...@@ -2429,7 +2429,7 @@ java.lang.Object
public class Serialize extends Object public class Serialize extends Object
This class uses PostgreSQL's object oriented features to store Java This class uses <productname>PostgreSQL</productname>'s object oriented features to store Java
Objects. It does this by mapping a Java Class name to a table in the Objects. It does this by mapping a Java Class name to a table in the
database. Each entry in this new table then represents a Serialized database. Each entry in this new table then represents a Serialized
instance of this class. As each entry has an OID (Object IDentifier), instance of this class. As each entry has an OID (Object IDentifier),
...@@ -2442,7 +2442,7 @@ Constructors ...@@ -2442,7 +2442,7 @@ Constructors
String type) throws SQLException String type) throws SQLException
This creates an instance that can be used to serialize This creates an instance that can be used to serialize
or deserialize a Java object from a PostgreSQL table. or deserialize a Java object from a <productname>PostgreSQL</productname> table.
Methods Methods
...@@ -2518,13 +2518,13 @@ serializing any objects. ...@@ -2518,13 +2518,13 @@ serializing any objects.
Another limitation, is that the entire class name (including Another limitation, is that the entire class name (including
packages) cannot be longer than 31 characters (a limit packages) cannot be longer than 31 characters (a limit
forced by PostgreSQL). forced by <productname>PostgreSQL</productname>).
Parameters: Parameters:
name - Class name name - Class name
Returns: Returns:
PostgreSQL table name <productname>PostgreSQL</productname> table name
Throws: SQLException Throws: SQLException
on error on error
...@@ -2535,7 +2535,7 @@ forced by PostgreSQL). ...@@ -2535,7 +2535,7 @@ forced by PostgreSQL).
replacing _ with . replacing _ with .
Parameters: Parameters:
name - PostgreSQL table name name - <productname>PostgreSQL</productname> table name
Returns: Returns:
Class name Class name
...@@ -2559,7 +2559,7 @@ java.lang.Object ...@@ -2559,7 +2559,7 @@ java.lang.Object
public class PGmoney extends PGobject implements Serializable, public class PGmoney extends PGobject implements Serializable,
Cloneable Cloneable
This implements a class that handles the PostgreSQL money type This implements a class that handles the <productname>PostgreSQL</productname> money type
Variables Variables
...@@ -2579,7 +2579,7 @@ Constructors ...@@ -2579,7 +2579,7 @@ Constructors
Create a money. Create a money.
Parameters: Parameters:
value - Definition of this money in PostgreSQL's value - Definition of this money in <productname>PostgreSQL</productname>'s
syntax syntax
public PGmoney() public PGmoney()
...@@ -2591,7 +2591,7 @@ Methods ...@@ -2591,7 +2591,7 @@ Methods
public void setValue(String s) throws SQLException public void setValue(String s) throws SQLException
Parameters: Parameters:
s - Definition of this money in PostgreSQL's syntax s - Definition of this money in <productname>PostgreSQL</productname>'s syntax
Throws: SQLException Throws: SQLException
on conversion failure on conversion failure
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/legal.sgml,v 1.12 2001/10/04 22:28:44 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/legal.sgml,v 1.13 2001/11/21 05:53:41 thomas Exp $
--> -->
<copyright> <copyright>
...@@ -56,14 +56,15 @@ There is no legal requirement to make trademark acknowledgements in ...@@ -56,14 +56,15 @@ There is no legal requirement to make trademark acknowledgements in
references to third party products that happen to have trademarked references to third party products that happen to have trademarked
names. names.
The exception would be if PostgreSQL were to license a particular The exception would be if <productname>PostgreSQL</>
were to license a particular
trademark and the trademark holder makes this requirement (as in the trademark and the trademark holder makes this requirement (as in the
case of UNIX and Java). case of UNIX and Java).
What is not allowed, however, is to use a trademark name in a way that What is not allowed, however, is to use a trademark name in a way that
could lead people to believe that they label PostgreSQL products. could lead people to believe that they label <productname>PostgreSQL</> products.
E.g., "the PostgreSQL UNIX database system" would probably be illegal, E.g., "the <productname>PostgreSQL</> UNIX database system" would probably be illegal,
whereas "PostgreSQL, which runs on many UNIX computer systems" is whereas "<productname>PostgreSQL</>, which runs on many UNIX computer systems" is
fine. This is independent of whether a trademark acknowledgement is fine. This is independent of whether a trademark acknowledgement is
made. made.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<Para> <Para>
<literal>pgtcl</literal> is a Tcl package for front-end programs <literal>pgtcl</literal> is a Tcl package for front-end programs
to interface with <ProductName>Postgres</ProductName> to interface with <ProductName>PostgreSQL</ProductName>
backends. It makes most of the functionality of <literal>libpq</literal> available to backends. It makes most of the functionality of <literal>libpq</literal> available to
Tcl scripts. Tcl scripts.
</Para> </Para>
...@@ -114,7 +114,7 @@ These commands are described further on subsequent pages. ...@@ -114,7 +114,7 @@ These commands are described further on subsequent pages.
<Para> <Para>
The pg_lo* routines are interfaces to the Large Object features of The pg_lo* routines are interfaces to the Large Object features of
<ProductName>Postgres</ProductName>. <ProductName>PostgreSQL</ProductName>.
The functions are designed to mimic the analogous file system functions in The functions are designed to mimic the analogous file system functions in
the standard Unix file system interface. the standard Unix file system interface.
The pg_lo* routines should be used within a BEGIN/END transaction The pg_lo* routines should be used within a BEGIN/END transaction
...@@ -293,7 +293,7 @@ Handles start with the prefix <literal>pgsql</literal>. ...@@ -293,7 +293,7 @@ Handles start with the prefix <literal>pgsql</literal>.
<TITLE>Description <TITLE>Description
</TITLE> </TITLE>
<PARA><FUNCTION>pg_connect</FUNCTION> opens a connection to the <PARA><FUNCTION>pg_connect</FUNCTION> opens a connection to the
<ProductName>Postgres</ProductName> backend. <ProductName>PostgreSQL</ProductName> backend.
</Para> </Para>
<para> <para>
...@@ -379,7 +379,7 @@ pg_disconnect <REPLACEABLE CLASS="PARAMETER">dbHandle</REPLACEABLE> ...@@ -379,7 +379,7 @@ pg_disconnect <REPLACEABLE CLASS="PARAMETER">dbHandle</REPLACEABLE>
</REFSECT1INFO> </REFSECT1INFO>
<TITLE>Description <TITLE>Description
</TITLE> </TITLE>
<PARA><FUNCTION>pg_disconnect</FUNCTION> closes a connection to the <ProductName>Postgres</ProductName> backend. <PARA><FUNCTION>pg_disconnect</FUNCTION> closes a connection to the <ProductName>PostgreSQL</ProductName> backend.
</PARA> </PARA>
</REFSECT1> </REFSECT1>
...@@ -553,7 +553,7 @@ to obtain the results of the query. ...@@ -553,7 +553,7 @@ to obtain the results of the query.
<TITLE>Description <TITLE>Description
</TITLE> </TITLE>
<PARA> <PARA>
<FUNCTION>pg_exec</FUNCTION> submits a query to the <ProductName>Postgres</ProductName> backend and returns a result. <FUNCTION>pg_exec</FUNCTION> submits a query to the <ProductName>PostgreSQL</ProductName> backend and returns a result.
Query result handles start with the connection handle and add a period Query result handles start with the connection handle and add a period
and a result number. and a result number.
...@@ -896,7 +896,7 @@ pg_select <REPLACEABLE CLASS="PARAMETER">dbHandle</REPLACEABLE> <REPLACEABLE CLA ...@@ -896,7 +896,7 @@ pg_select <REPLACEABLE CLASS="PARAMETER">dbHandle</REPLACEABLE> <REPLACEABLE CLA
</TITLE> </TITLE>
<PARA> <PARA>
<FUNCTION>pg_select</FUNCTION> submits a SELECT query to the <FUNCTION>pg_select</FUNCTION> submits a SELECT query to the
<ProductName>Postgres</ProductName> backend, and executes a <ProductName>PostgreSQL</ProductName> backend, and executes a
given chunk of code for each tuple in the result. given chunk of code for each tuple in the result.
The <REPLACEABLE CLASS="PARAMETER">queryString</REPLACEABLE> The <REPLACEABLE CLASS="PARAMETER">queryString</REPLACEABLE>
must be a SELECT statement. Anything else returns an error. must be a SELECT statement. Anything else returns an error.
...@@ -1015,7 +1015,7 @@ when a matching notification arrives. ...@@ -1015,7 +1015,7 @@ when a matching notification arrives.
</TITLE> </TITLE>
<PARA><FUNCTION>pg_listen</FUNCTION> creates, changes, or cancels a request <PARA><FUNCTION>pg_listen</FUNCTION> creates, changes, or cancels a request
to listen for asynchronous NOTIFY messages from the to listen for asynchronous NOTIFY messages from the
<ProductName>Postgres</ProductName> backend. With a <parameter>callbackCommand</> <ProductName>PostgreSQL</ProductName> backend. With a <parameter>callbackCommand</>
parameter, the request is established, or the command string of an already parameter, the request is established, or the command string of an already
existing request is replaced. With no <parameter>callbackCommand</> parameter, a prior existing request is replaced. With no <parameter>callbackCommand</> parameter, a prior
request is canceled. request is canceled.
...@@ -1025,7 +1025,7 @@ request is canceled. ...@@ -1025,7 +1025,7 @@ request is canceled.
After a <FUNCTION>pg_listen</FUNCTION> request is established, After a <FUNCTION>pg_listen</FUNCTION> request is established,
the specified command string is executed whenever a NOTIFY message bearing the specified command string is executed whenever a NOTIFY message bearing
the given name arrives from the backend. This occurs when any the given name arrives from the backend. This occurs when any
<ProductName>Postgres</ProductName> client application issues a NOTIFY command <ProductName>PostgreSQL</ProductName> client application issues a NOTIFY command
referencing that name. (Note that the name can be, but does not have to be, referencing that name. (Note that the name can be, but does not have to be,
that of an existing relation in the database.) that of an existing relation in the database.)
The command string is executed from the Tcl idle loop. That is the normal The command string is executed from the Tcl idle loop. That is the normal
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:24 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.35 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="libpqplusplus"> <chapter id="libpqplusplus">
...@@ -7,23 +7,23 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -7,23 +7,23 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<para> <para>
<filename>libpq++</filename> is the C++ API to <filename>libpq++</filename> is the C++ API to
<productname>Postgres</productname>. <productname>PostgreSQL</productname>.
<filename>libpq++</filename> is a set of classes that allow <filename>libpq++</filename> is a set of classes that allow
client programs to connect to the client programs to connect to the
<productname>Postgres</productname> backend server. These connections <productname>PostgreSQL</productname> backend server. These connections
come in two forms: a Database Class and a Large Object class. come in two forms: a Database Class and a Large Object class.
</para> </para>
<para> <para>
The Database Class is intended for manipulating a database. You can The Database Class is intended for manipulating a database. You can
send all sorts of SQL queries to the <productname>Postgres</productname> send all sorts of SQL queries to the <productname>PostgreSQL</productname>
backend server and retrieve the responses of the server. backend server and retrieve the responses of the server.
</para> </para>
<para> <para>
The Large Object Class is intended for manipulating a large object The Large Object Class is intended for manipulating a large object
in a database. Although a Large Object instance can send normal in a database. Although a Large Object instance can send normal
queries to the <productname>Postgres</productname> backend server queries to the <productname>PostgreSQL</productname> backend server
it is only intended for simple it is only intended for simple
queries that do not return any data. A large object should be seen queries that do not return any data. A large object should be seen
as a file stream. In the future it should behave much like the C++ file as a file stream. In the future it should behave much like the C++ file
...@@ -91,13 +91,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -91,13 +91,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<para> <para>
<envar>PGPORT</envar> sets the default TCP port number or Unix-domain <envar>PGPORT</envar> sets the default TCP port number or Unix-domain
socket file extension for communicating with the socket file extension for communicating with the
<productname>Postgres</productname> backend. <productname>PostgreSQL</productname> backend.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<envar>PGDATABASE</envar> sets the default <envar>PGDATABASE</envar> sets the default
<productname>Postgres</productname> database name. <productname>PostgreSQL</productname> database name.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -115,9 +115,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -115,9 +115,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<listitem> <listitem>
<para> <para>
<envar>PGREALM</envar> sets the Kerberos realm to use with <envar>PGREALM</envar> sets the Kerberos realm to use with
<productname>Postgres</productname>, <productname>PostgreSQL</productname>,
if it is different from the local realm. If if it is different from the local realm. If
<envar>PGREALM</envar> is set, <productname>Postgres</productname> <envar>PGREALM</envar> is set, <productname>PostgreSQL</productname>
applications will attempt applications will attempt
authentication with servers for this realm and use authentication with servers for this realm and use
separate ticket files to avoid conflicts with local separate ticket files to avoid conflicts with local
...@@ -128,7 +128,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -128,7 +128,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<listitem> <listitem>
<para> <para>
<envar>PGOPTIONS</envar> sets additional runtime options for <envar>PGOPTIONS</envar> sets additional runtime options for
the <productname>Postgres</productname> backend. the <productname>PostgreSQL</productname> backend.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -142,7 +142,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -142,7 +142,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<para> <para>
The following environment variables can be used to specify user-level default The following environment variables can be used to specify user-level default
behavior for every Postgres session: behavior for every <productname>PostgreSQL</productname> session:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -162,7 +162,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -162,7 +162,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<para> <para>
The following environment variables can be used to specify default internal The following environment variables can be used to specify default internal
behavior for every Postgres session: behavior for every <productname>PostgreSQL</productname> session:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -641,7 +641,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -641,7 +641,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<title>Asynchronous Notification</title> <title>Asynchronous Notification</title>
<para> <para>
<productname>Postgres</productname> supports asynchronous notification <productname>PostgreSQL</productname> supports asynchronous notification
via the <command>LISTEN</command> and <command>NOTIFY</command> via the <command>LISTEN</command> and <command>NOTIFY</command>
commands. A backend registers its interest in a particular semaphore commands. A backend registers its interest in a particular semaphore
with the <command>LISTEN</command> command. with the <command>LISTEN</command> command.
...@@ -706,7 +706,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58: ...@@ -706,7 +706,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.34 2001/11/19 03:58:
<title>Functions Associated with the COPY Command</title> <title>Functions Associated with the COPY Command</title>
<para> <para>
The <command>copy</command> command in <productname>Postgres</productname> The <command>copy</command> command in <productname>PostgreSQL</productname>
has options to read from or write to the network has options to read from or write to the network
connection used by <filename>libpq++</filename>. connection used by <filename>libpq++</filename>.
Therefore, functions are necessary to Therefore, functions are necessary to
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.78 2001/11/20 20:28:31 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.79 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="libpq"> <chapter id="libpq">
...@@ -892,7 +892,7 @@ undefined. A call to <function>PQescapeString</> writes an escaped ...@@ -892,7 +892,7 @@ undefined. A call to <function>PQescapeString</> writes an escaped
version of the <parameter>from</> string to the <parameter>to</> version of the <parameter>from</> string to the <parameter>to</>
buffer, replacing special characters so that they cannot cause any buffer, replacing special characters so that they cannot cause any
harm, and adding a terminating NUL character. The single quotes that harm, and adding a terminating NUL character. The single quotes that
must surround PostgreSQL string literals are not part of the result must surround <productname>PostgreSQL</> string literals are not part of the result
string. string.
</para> </para>
<para> <para>
...@@ -2152,7 +2152,7 @@ foo.c:95: `PGRES_TUPLES_OK' undeclared (first use in this function) ...@@ -2152,7 +2152,7 @@ foo.c:95: `PGRES_TUPLES_OK' undeclared (first use in this function)
<listitem> <listitem>
<para> <para>
Point your compiler to the directory where the PostgreSQL header Point your compiler to the directory where the <productname>PostgreSQL</> header
files were installed, by supplying the files were installed, by supplying the
<literal>-I<replaceable>directory</replaceable></literal> option <literal>-I<replaceable>directory</replaceable></literal> option
to your compiler. (In some cases the compiler will look into to your compiler. (In some cases the compiler will look into
...@@ -2239,7 +2239,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage' ...@@ -2239,7 +2239,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage'
<indexterm><primary>libpq-int.h</></> <indexterm><primary>libpq-int.h</></>
If your codes references the header file If your codes references the header file
<filename>libpq-int.h</filename> and you refuse to fix your code to <filename>libpq-int.h</filename> and you refuse to fix your code to
not use it, starting in PostgreSQL 7.2, this file will be found in not use it, starting in <productname>PostgreSQL</> 7.2, this file will be found in
<filename><replaceable>includedir</replaceable>/postgresql/internal/libpq-int.h</filename>, <filename><replaceable>includedir</replaceable>/postgresql/internal/libpq-int.h</filename>,
so you need to add the appropriate <option>-I</option> option to so you need to add the appropriate <option>-I</option> option to
your compiler command line. your compiler command line.
...@@ -2258,7 +2258,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage' ...@@ -2258,7 +2258,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage'
/* /*
* testlibpq.c * testlibpq.c
* *
* Test the C version of libpq, the PostgreSQL frontend * Test the C version of libpq, the <productname>PostgreSQL</> frontend
* library. * library.
*/ */
#include &lt;stdio.h&gt; #include &lt;stdio.h&gt;
...@@ -2509,7 +2509,7 @@ main() ...@@ -2509,7 +2509,7 @@ main()
<programlisting> <programlisting>
/* /*
* testlibpq3.c Test the C version of Libpq, the Postgres frontend * testlibpq3.c Test the C version of Libpq, the <productname>PostgreSQL</> frontend
* library. tests the binary cursor interface * library. tests the binary cursor interface
* *
* *
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.8 2001/11/20 04:27:49 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="maintenance"> <chapter id="maintenance">
...@@ -393,7 +393,7 @@ VACUUM ...@@ -393,7 +393,7 @@ VACUUM
<para> <para>
The simplest production-grade approach to managing log output is to send it The simplest production-grade approach to managing log output is to send it
all to <application>syslog</> and let <application>syslog</> deal with file all to <application>syslog</> and let <application>syslog</> deal with file
rotation. To do this, make sure <productname>Postgres</> was built with rotation. To do this, make sure <productname>PostgreSQL</> was built with
the <option>--enable-syslog</> configure option, and set the <option>--enable-syslog</> configure option, and set
<literal>syslog</> to 2 <literal>syslog</> to 2
(log to syslog only) in <filename>postgresql.conf</>. (log to syslog only) in <filename>postgresql.conf</>.
...@@ -415,7 +415,7 @@ VACUUM ...@@ -415,7 +415,7 @@ VACUUM
<userinput>pg_ctl start | logrotate</userinput> <userinput>pg_ctl start | logrotate</userinput>
</screen> </screen>
The <productname>Postgres</> distribution doesn't include a suitable The <productname>PostgreSQL</> distribution doesn't include a suitable
log rotation program, but there are many available on the net; log rotation program, but there are many available on the net;
one is included in the Apache distribution, for example. one is included in the Apache distribution, for example.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.18 2001/11/18 00:38:00 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.19 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="managing-databases"> <chapter id="managing-databases">
...@@ -30,7 +30,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.18 2001/11/18 00:38:00 t ...@@ -30,7 +30,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.18 2001/11/18 00:38:00 t
</note> </note>
<para> <para>
In order to create or drop databases, the <productname>Postgres</> In order to create or drop databases, the <productname>PostgreSQL</>
<application>postmaster</> must be up and running (see <xref <application>postmaster</> must be up and running (see <xref
linkend="postmaster-start">). linkend="postmaster-start">).
</para> </para>
...@@ -123,7 +123,8 @@ createdb <replaceable class="parameter">dbname</replaceable> ...@@ -123,7 +123,8 @@ createdb <replaceable class="parameter">dbname</replaceable>
There is a second standard system database named <literal>template0</>. There is a second standard system database named <literal>template0</>.
This database contains the same data as the initial contents of This database contains the same data as the initial contents of
<literal>template1</>, that is, only the standard objects predefined by <literal>template1</>, that is, only the standard objects predefined by
your version of Postgres. <literal>template0</> should never be changed your version of <productname>PostgreSQL</productname>.
<literal>template0</> should never be changed
after <literal>initdb</>. By instructing <command>CREATE DATABASE</> to after <literal>initdb</>. By instructing <command>CREATE DATABASE</> to
copy <literal>template0</> instead of <literal>template1</>, you can copy <literal>template0</> instead of <literal>template1</>, you can
create a <quote>virgin</> user database that contains none of the create a <quote>virgin</> user database that contains none of the
...@@ -283,7 +284,7 @@ CREATE DATABASE <replaceable>name</> WITH LOCATION = '<replaceable>location</>' ...@@ -283,7 +284,7 @@ CREATE DATABASE <replaceable>name</> WITH LOCATION = '<replaceable>location</>'
It can also be possible to specify absolute paths directly to the It can also be possible to specify absolute paths directly to the
<command>CREATE DATABASE</> command without defining environment <command>CREATE DATABASE</> command without defining environment
variables. This is disallowed by default because it is a security variables. This is disallowed by default because it is a security
risk. To allow it, you must compile <productname>Postgres</> with risk. To allow it, you must compile <productname>PostgreSQL</> with
the C preprocessor macro <literal>ALLOW_ABSOLUTE_DBPATHS</> the C preprocessor macro <literal>ALLOW_ABSOLUTE_DBPATHS</>
defined. One way to do this is to run the compilation step like defined. One way to do this is to run the compilation step like
this: this:
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.19 2001/11/19 03:58:24 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.20 2001/11/21 05:53:41 thomas Exp $
--> -->
<Chapter Id="manage"> <Chapter Id="manage">
...@@ -13,13 +13,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.19 2001/11/19 03:58:2 ...@@ -13,13 +13,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.19 2001/11/19 03:58:2
<Para> <Para>
Although the <FirstTerm>site administrator</FirstTerm> is responsible for overall management Although the <FirstTerm>site administrator</FirstTerm> is responsible for overall management
of the <ProductName>Postgres</ProductName> installation, some databases within the of the <ProductName>PostgreSQL</ProductName> installation, some databases within the
installation may be managed by another person, installation may be managed by another person,
designated the <FirstTerm>database administrator</FirstTerm>. designated the <FirstTerm>database administrator</FirstTerm>.
This assignment of responsibilities occurs when a database is created. This assignment of responsibilities occurs when a database is created.
A user may be assigned explicit privileges to create databases and/or to create new users. A user may be assigned explicit privileges to create databases and/or to create new users.
A user assigned both privileges can perform most administrative tasks A user assigned both privileges can perform most administrative tasks
within <ProductName>Postgres</ProductName>, but will within <ProductName>PostgreSQL</ProductName>, but will
not by default have the same operating system privileges as the site administrator. not by default have the same operating system privileges as the site administrator.
</Para> </Para>
...@@ -34,14 +34,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.19 2001/11/19 03:58:2 ...@@ -34,14 +34,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.19 2001/11/19 03:58:2
<Para> <Para>
Databases are created by the <Command>CREATE DATABASE</Command> Databases are created by the <Command>CREATE DATABASE</Command>
command issued from within command issued from within
<ProductName>Postgres</ProductName>. <Application>createdb</Application> <ProductName>PostgreSQL</ProductName>. <Application>createdb</Application>
is a shell script provided to give the same functionality from the is a shell script provided to give the same functionality from the
Unix command line. Unix command line.
</Para> </Para>
<Para> <Para>
The <ProductName>Postgres</ProductName> backend must be running for either method The <ProductName>PostgreSQL</ProductName> backend must be running for either method
to succeed, and the user issuing the command must be the <ProductName>Postgres</ProductName> to succeed, and the user issuing the command must be the <ProductName>PostgreSQL</ProductName>
<FirstTerm>superuser</FirstTerm> or have been assigned database creation privileges by the <FirstTerm>superuser</FirstTerm> or have been assigned database creation privileges by the
superuser. superuser.
</Para> </Para>
...@@ -71,7 +71,7 @@ ERROR: CREATE DATABASE: Permission denied. ...@@ -71,7 +71,7 @@ ERROR: CREATE DATABASE: Permission denied.
database administrator of the database you just created. database administrator of the database you just created.
Database names must have an alphabetic first Database names must have an alphabetic first
character and are limited to 31 characters in length. character and are limited to 31 characters in length.
<ProductName>Postgres</ProductName> allows you to create any number of <ProductName>PostgreSQL</ProductName> allows you to create any number of
databases at a given site. databases at a given site.
</Para> </Para>
...@@ -157,7 +157,7 @@ mydb=> \h ...@@ -157,7 +157,7 @@ mydb=> \h
Once you have finished entering your queries into the Once you have finished entering your queries into the
workspace, you can pass the contents of the workspace workspace, you can pass the contents of the workspace
to the <ProductName>Postgres</ProductName> server by typing: to the <ProductName>PostgreSQL</ProductName> server by typing:
<ProgramListing> <ProgramListing>
mydb=> \g mydb=> \g
</ProgramListing> </ProgramListing>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="mvcc"> <chapter id="mvcc">
...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere ...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere
is an advanced technique for improving database performance in a is an advanced technique for improving database performance in a
multi-user environment. multi-user environment.
Vadim Mikheev (<email>vadim@krs.ru</email>) provided Vadim Mikheev (<email>vadim@krs.ru</email>) provided
the implementation for <productname>Postgres</productname>. the implementation for <productname>PostgreSQL</productname>.
</para> </para>
</abstract> </abstract>
...@@ -25,7 +25,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere ...@@ -25,7 +25,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere
<para> <para>
Unlike most other database systems which use locks for concurrency control, Unlike most other database systems which use locks for concurrency control,
<productname>Postgres</productname> <productname>PostgreSQL</productname>
maintains data consistency by using a multiversion model. maintains data consistency by using a multiversion model.
This means that while querying a database each transaction sees This means that while querying a database each transaction sees
a snapshot of data (a <firstterm>database version</firstterm>) a snapshot of data (a <firstterm>database version</firstterm>)
...@@ -191,7 +191,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere ...@@ -191,7 +191,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere
</para> </para>
<para> <para>
<productname>Postgres</productname> <productname>PostgreSQL</productname>
offers the read committed and serializable isolation levels. offers the read committed and serializable isolation levels.
</para> </para>
</sect1> </sect1>
...@@ -206,7 +206,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere ...@@ -206,7 +206,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere
<para> <para>
<firstterm>Read Committed</firstterm> <firstterm>Read Committed</firstterm>
is the default isolation level in <productname>Postgres</productname>. is the default isolation level in <productname>PostgreSQL</productname>.
When a transaction runs on this isolation level, When a transaction runs on this isolation level,
a <command>SELECT</command> query sees only data committed before the a <command>SELECT</command> query sees only data committed before the
query began and never sees either uncommitted data or changes committed query began and never sees either uncommitted data or changes committed
...@@ -324,7 +324,7 @@ ERROR: Can't serialize access due to concurrent update ...@@ -324,7 +324,7 @@ ERROR: Can't serialize access due to concurrent update
<title>Data consistency checks at the application level</title> <title>Data consistency checks at the application level</title>
<para> <para>
Because readers in <productname>Postgres</productname> Because readers in <productname>PostgreSQL</productname>
don't lock data, regardless of don't lock data, regardless of
transaction isolation level, data read by one transaction can be transaction isolation level, data read by one transaction can be
overwritten by another concurrent transaction. In other words, overwritten by another concurrent transaction. In other words,
...@@ -354,15 +354,15 @@ ERROR: Can't serialize access due to concurrent update ...@@ -354,15 +354,15 @@ ERROR: Can't serialize access due to concurrent update
concurrent updates, while <command>LOCK TABLE</command> protects the concurrent updates, while <command>LOCK TABLE</command> protects the
whole table.) whole table.)
This should be taken into account when porting applications to This should be taken into account when porting applications to
<productname>Postgres</productname> from other environments. <productname>PostgreSQL</productname> from other environments.
<note> <note>
<para> <para>
Before version 6.5 <productname>Postgres</productname> Before version 6.5 <productname>PostgreSQL</productname>
used read-locks and so the used read-locks and so the
above consideration is also the case above consideration is also the case
when upgrading to 6.5 (or higher) from previous when upgrading to 6.5 (or higher) from previous
<productname>Postgres</productname> versions. <productname>PostgreSQL</productname> versions.
</para> </para>
</note> </note>
</para> </para>
...@@ -376,10 +376,10 @@ ERROR: Can't serialize access due to concurrent update ...@@ -376,10 +376,10 @@ ERROR: Can't serialize access due to concurrent update
</indexterm> </indexterm>
<para> <para>
<productname>Postgres</productname> <productname>PostgreSQL</productname>
provides various lock modes to control concurrent provides various lock modes to control concurrent
access to data in tables. Some of these lock modes are acquired by access to data in tables. Some of these lock modes are acquired by
<productname>Postgres</productname> <productname>PostgreSQL</productname>
automatically before statement execution, while others are automatically before statement execution, while others are
provided to be used by applications. All lock modes acquired in a provided to be used by applications. All lock modes acquired in a
transaction are held for the duration transaction are held for the duration
...@@ -559,7 +559,7 @@ ERROR: Can't serialize access due to concurrent update ...@@ -559,7 +559,7 @@ ERROR: Can't serialize access due to concurrent update
</para> </para>
<para> <para>
<productname>Postgres</productname> <productname>PostgreSQL</productname>
doesn't remember any information about modified rows in memory and doesn't remember any information about modified rows in memory and
so has no limit to the number of rows locked at one time. However, so has no limit to the number of rows locked at one time. However,
locking a row may cause a disk write; thus, for example, locking a row may cause a disk write; thus, for example,
...@@ -581,11 +581,11 @@ ERROR: Can't serialize access due to concurrent update ...@@ -581,11 +581,11 @@ ERROR: Can't serialize access due to concurrent update
<title>Locking and Indexes</title> <title>Locking and Indexes</title>
<para> <para>
Though <productname>Postgres</productname> Though <productname>PostgreSQL</productname>
provides nonblocking read/write access to table provides nonblocking read/write access to table
data, nonblocking read/write access is not currently offered for every data, nonblocking read/write access is not currently offered for every
index access method implemented index access method implemented
in <productname>Postgres</productname>. in <productname>PostgreSQL</productname>.
</para> </para>
<para> <para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.1 2001/06/02 18:25:16 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/nls.sgml,v 1.2 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="nls"> <chapter id="nls">
<docinfo> <docinfo>
...@@ -14,11 +14,13 @@ ...@@ -14,11 +14,13 @@
<title>For the Translator</title> <title>For the Translator</title>
<para> <para>
PostgreSQL programs (server and client) can issue their messages in <productname>PostgreSQL</>
programs (server and client) can issue their messages in
your favorite language -- if the messages have been translated. your favorite language -- if the messages have been translated.
Creating and maintaining translated message sets needs the help of Creating and maintaining translated message sets needs the help of
people who speak their own language well and want to contribute to people who speak their own language well and want to contribute to
the PostgreSQL effort. You do not have to be a programmer at all the <productname>PostgreSQL</> effort. You do not have to be a
programmer at all
to do this. This section explains how to help. to do this. This section explains how to help.
</para> </para>
...@@ -300,7 +302,8 @@ msgstr "Die Datei %2$s hat %1$u Zeichen." ...@@ -300,7 +302,8 @@ msgstr "Die Datei %2$s hat %1$u Zeichen."
<para> <para>
This section describes how to support native language support in a This section describes how to support native language support in a
program or library that is part of the PostgreSQL distribution. program or library that is part of the
<productname>PostgreSQL</> distribution.
Currently, it only applies to C programs. Currently, it only applies to C programs.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.17 2001/10/09 18:46:00 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.18 2001/11/21 05:53:41 thomas Exp $
--> -->
<sect1 id="notation"> <sect1 id="notation">
<title>Terminology and Notation</title> <title>Terminology and Notation</title>
<para> <para>
The terms <quote>Postgres</quote> and <quote>PostgreSQL</quote> will be The terms <quote>PostgreSQL</quote> and <quote>Postgres</quote> will be
used interchangeably to refer to the software that accompanies this used interchangeably to refer to the software that accompanies this
documentation. documentation.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.27 2001/11/12 19:19:39 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.28 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="odbc"> <chapter id="odbc">
...@@ -48,7 +48,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.27 2001/11/12 19:19:39 ...@@ -48,7 +48,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.27 2001/11/12 19:19:39
The <acronym>ODBC</acronym> <acronym>API</acronym> matches up The <acronym>ODBC</acronym> <acronym>API</acronym> matches up
on the backend to an <acronym>ODBC</acronym>-compatible data source. on the backend to an <acronym>ODBC</acronym>-compatible data source.
This could be anything from a text file to an Oracle or This could be anything from a text file to an Oracle or
<productname>Postgres</productname> <acronym>RDBMS</acronym>. <productname>PostgreSQL</productname> <acronym>RDBMS</acronym>.
</para> </para>
<para> <para>
...@@ -68,7 +68,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.27 2001/11/12 19:19:39 ...@@ -68,7 +68,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.27 2001/11/12 19:19:39
<para> <para>
For example. you could have <productname>MS SQL Server</productname> For example. you could have <productname>MS SQL Server</productname>
and <productname>Postgres</productname> servers that have and <productname>PostgreSQL</productname> servers that have
exactly the same data. Using <acronym>ODBC</acronym>, exactly the same data. Using <acronym>ODBC</acronym>,
your Windows application would make exactly the your Windows application would make exactly the
same calls and the back end data source would look the same (to the Windows same calls and the back end data source would look the same (to the Windows
...@@ -195,9 +195,9 @@ Port=5432 ...@@ -195,9 +195,9 @@ Port=5432
<tip> <tip>
<para> <para>
Remember that the <productname>Postgres</productname> database name is Remember that the <productname>PostgreSQL</productname> database name is
usually a single word, without path names of any sort. usually a single word, without path names of any sort.
The <productname>Postgres</productname> server manages the actual access The <productname>PostgreSQL</productname> server manages the actual access
to the database, and you need only specify the name from the client. to the database, and you need only specify the name from the client.
</para> </para>
</tip> </tip>
...@@ -287,9 +287,9 @@ InstallDir = /opt/applix/axdata/axshlib ...@@ -287,9 +287,9 @@ InstallDir = /opt/applix/axdata/axshlib
<para> <para>
<quote> <quote>
If I write an application for <productname>Postgres</productname> If I write an application for <productname>PostgreSQL</productname>
can I write it using <acronym>ODBC</acronym> calls can I write it using <acronym>ODBC</acronym> calls
to the <productname>Postgres</productname> server, to the <productname>PostgreSQL</productname> server,
or is that only when another database program or is that only when another database program
like MS SQL Server or Access needs to access the data? like MS SQL Server or Access needs to access the data?
</quote> </quote>
...@@ -335,9 +335,9 @@ InstallDir = /opt/applix/axdata/axshlib ...@@ -335,9 +335,9 @@ InstallDir = /opt/applix/axdata/axshlib
<acronym>ODBC</acronym> database interface <acronym>ODBC</acronym> database interface
supported on at least some platforms. supported on at least some platforms.
<productname>ApplixWare</productname> 4.4.2 has been <productname>ApplixWare</productname> 4.4.2 has been
demonstrated under Linux with <productname>Postgres</productname> 7.0 demonstrated under Linux with <productname>PostgreSQL</productname> 7.0
using the <productname>psqlODBC</productname> using the <productname>psqlODBC</productname>
driver contained in the <productname>Postgres</productname> distribution. driver contained in the <productname>PostgreSQL</productname> distribution.
</para> </para>
<sect2> <sect2>
...@@ -346,7 +346,7 @@ InstallDir = /opt/applix/axdata/axshlib ...@@ -346,7 +346,7 @@ InstallDir = /opt/applix/axdata/axshlib
<para> <para>
<productname>ApplixWare</productname> must be configured correctly <productname>ApplixWare</productname> must be configured correctly
in order for it to in order for it to
be able to access the <productname>Postgres</productname> be able to access the <productname>PostgreSQL</productname>
<acronym>ODBC</acronym> software drivers. <acronym>ODBC</acronym> software drivers.
</para> </para>
...@@ -434,7 +434,7 @@ TextAsLongVarchar=0 ...@@ -434,7 +434,7 @@ TextAsLongVarchar=0
<step performance="required"> <step performance="required">
<para> <para>
Select the <productname>Postgres</productname> database of interest. Select the <productname>PostgreSQL</productname> database of interest.
</para> </para>
<substeps> <substeps>
...@@ -666,7 +666,7 @@ can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error) ...@@ -666,7 +666,7 @@ can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
the sample tables that the Tutorial refers to. The ELF Macro used to the sample tables that the Tutorial refers to. The ELF Macro used to
create the tables tries to use a NULL condition create the tables tries to use a NULL condition
on many of the database columns, on many of the database columns,
and <productname>Postgres</productname> does not currently allow this option. and <productname>PostgreSQL</productname> does not currently allow this option.
</para> </para>
<para> <para>
To get around this problem, you can do the following: To get around this problem, you can do the following:
......
...@@ -9,7 +9,7 @@ A description of the database file default page format. ...@@ -9,7 +9,7 @@ A description of the database file default page format.
</abstract> </abstract>
<para> <para>
This section provides an overview of the page format used by <productname>Postgres</productname> This section provides an overview of the page format used by <productname>PostgreSQL</productname>
tables. User-defined access methods need not use this page format. tables. User-defined access methods need not use this page format.
</para> </para>
...@@ -18,12 +18,12 @@ In the following explanation, a ...@@ -18,12 +18,12 @@ In the following explanation, a
<firstterm>byte</firstterm> <firstterm>byte</firstterm>
is assumed to contain 8 bits. In addition, the term is assumed to contain 8 bits. In addition, the term
<firstterm>item</firstterm> <firstterm>item</firstterm>
refers to data that is stored in <productname>Postgres</productname> tables. refers to data that is stored in <productname>PostgreSQL</productname> tables.
</para> </para>
<para> <para>
<xref linkend="page-table"> shows how pages in both normal <productname>Postgres</productname> tables <xref linkend="page-table"> shows how pages in both normal <productname>PostgreSQL</productname> tables
and <productname>Postgres</productname> indexes and <productname>PostgreSQL</productname> indexes
(e.g., a B-tree index) are structured. (e.g., a B-tree index) are structured.
</para> </para>
...@@ -131,7 +131,7 @@ unallocated space. Because an item identifier is never moved until it ...@@ -131,7 +131,7 @@ unallocated space. Because an item identifier is never moved until it
is freed, its index may be used to indicate the location of an item on is freed, its index may be used to indicate the location of an item on
a page. In fact, every pointer to an item a page. In fact, every pointer to an item
(<firstterm>ItemPointer</firstterm>) (<firstterm>ItemPointer</firstterm>)
created by <productname>Postgres</productname> consists of a frame number and an index of an item created by <productname>PostgreSQL</productname> consists of a frame number and an index of an item
identifier. An item identifier contains a byte-offset to the start of identifier. An item identifier contains a byte-offset to the start of
an item, its length in bytes, and a set of attribute bits which affect an item, its length in bytes, and a set of attribute bits which affect
its interpretation. its interpretation.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.13 2001/10/16 01:13:44 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.14 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="performance-tips"> <chapter id="performance-tips">
...@@ -9,14 +9,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.13 2001/10/16 01:13:44 tgl ...@@ -9,14 +9,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.13 2001/10/16 01:13:44 tgl
Query performance can be affected by many things. Some of these can Query performance can be affected by many things. Some of these can
be manipulated by the user, while others are fundamental to the underlying be manipulated by the user, while others are fundamental to the underlying
design of the system. This chapter provides some hints about understanding design of the system. This chapter provides some hints about understanding
and tuning <productname>Postgres</productname> performance. and tuning <productname>PostgreSQL</productname> performance.
</para> </para>
<sect1 id="using-explain"> <sect1 id="using-explain">
<title>Using <command>EXPLAIN</command></title> <title>Using <command>EXPLAIN</command></title>
<para> <para>
<productname>Postgres</productname> devises a <firstterm>query <productname>PostgreSQL</productname> devises a <firstterm>query
plan</firstterm> for each query it is given. Choosing the right plan</firstterm> for each query it is given. Choosing the right
plan to match the query structure and the properties of the data plan to match the query structure and the properties of the data
is absolutely critical for good performance. You can use the is absolutely critical for good performance. You can use the
...@@ -398,7 +398,7 @@ regression=# select attname, n_distinct, most_common_vals from pg_stats where ta ...@@ -398,7 +398,7 @@ regression=# select attname, n_distinct, most_common_vals from pg_stats where ta
regression=# regression=#
</screen> </screen>
As of <productname>Postgres</productname> 7.2 the following columns exist As of <productname>PostgreSQL</productname> 7.2 the following columns exist
in <structname>pg_stats</structname>: in <structname>pg_stats</structname>:
</para> </para>
...@@ -513,7 +513,7 @@ regression=# ...@@ -513,7 +513,7 @@ regression=#
<title>Controlling the Planner with Explicit JOINs</title> <title>Controlling the Planner with Explicit JOINs</title>
<para> <para>
Beginning with <productname>Postgres</productname> 7.1 it is possible Beginning with <productname>PostgreSQL</productname> 7.1 it is possible
to control the query planner to some extent by using explicit JOIN to control the query planner to some extent by using explicit JOIN
syntax. To see why this matters, we first need some background. syntax. To see why this matters, we first need some background.
</para> </para>
...@@ -531,7 +531,7 @@ SELECT * FROM a,b,c WHERE a.id = b.id AND b.ref = c.id; ...@@ -531,7 +531,7 @@ SELECT * FROM a,b,c WHERE a.id = b.id AND b.ref = c.id;
be inefficient, since the full Cartesian product of A and C would have be inefficient, since the full Cartesian product of A and C would have
to be formed, there being no applicable WHERE clause to allow optimization to be formed, there being no applicable WHERE clause to allow optimization
of the join. of the join.
(All joins in the <productname>Postgres</productname> executor happen (All joins in the <productname>PostgreSQL</productname> executor happen
between two input tables, so it's necessary to build up the result in one between two input tables, so it's necessary to build up the result in one
or another of these fashions.) The important point is that these different or another of these fashions.) The important point is that these different
join possibilities give semantically equivalent results but may have hugely join possibilities give semantically equivalent results but may have hugely
...@@ -546,7 +546,7 @@ SELECT * FROM a,b,c WHERE a.id = b.id AND b.ref = c.id; ...@@ -546,7 +546,7 @@ SELECT * FROM a,b,c WHERE a.id = b.id AND b.ref = c.id;
tables it's no longer practical to do an exhaustive search of all the tables it's no longer practical to do an exhaustive search of all the
possibilities, and even for six or seven tables planning may take an possibilities, and even for six or seven tables planning may take an
annoyingly long time. When there are too many input tables, the annoyingly long time. When there are too many input tables, the
<productname>Postgres</productname> planner will switch from exhaustive <productname>PostgreSQL</productname> planner will switch from exhaustive
search to a <firstterm>genetic</firstterm> probabilistic search search to a <firstterm>genetic</firstterm> probabilistic search
through a limited number of possibilities. (The switch-over threshold is through a limited number of possibilities. (The switch-over threshold is
set by the <varname>GEQO_THRESHOLD</varname> run-time set by the <varname>GEQO_THRESHOLD</varname> run-time
...@@ -570,7 +570,7 @@ SELECT * FROM a LEFT JOIN (b JOIN c ON (b.ref = c.id)) ON (a.id = b.id); ...@@ -570,7 +570,7 @@ SELECT * FROM a LEFT JOIN (b JOIN c ON (b.ref = c.id)) ON (a.id = b.id);
</para> </para>
<para> <para>
In <productname>Postgres</productname> 7.1, the planner treats all In <productname>PostgreSQL</productname> 7.1, the planner treats all
explicit JOIN syntaxes as constraining the join order, even though explicit JOIN syntaxes as constraining the join order, even though
it is not logically necessary to make such a constraint for inner it is not logically necessary to make such a constraint for inner
joins. Therefore, although all of these queries give the same result: joins. Therefore, although all of these queries give the same result:
...@@ -639,7 +639,7 @@ SELECT * FROM d LEFT JOIN ...@@ -639,7 +639,7 @@ SELECT * FROM d LEFT JOIN
libraries may do this behind your back, in which case you need to libraries may do this behind your back, in which case you need to
make sure the library does it when you want it done.) make sure the library does it when you want it done.)
If you allow each insertion to be committed separately, If you allow each insertion to be committed separately,
<productname>Postgres</productname> is doing a lot of work for each <productname>PostgreSQL</productname> is doing a lot of work for each
record added. record added.
</para> </para>
</sect2> </sect2>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.11 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="plperl"> <chapter id="plperl">
...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete ...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete
<para> <para>
PL/Perl allows you to write functions in the Perl programming PL/Perl allows you to write functions in the Perl programming
language that may be used in SQL queries as if they were built into language that may be used in SQL queries as if they were built into
<productname>Postgres</productname>. <productname>PostgreSQL</productname>.
</para> </para>
<para> <para>
...@@ -41,7 +41,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete ...@@ -41,7 +41,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete
<para> <para>
In order to build and install PL/Perl if you are installing In order to build and install PL/Perl if you are installing
<productname>Postgres</productname> from source then the <productname>PostgreSQL</productname> from source then the
<option>--with-perl</option> must be supplied to the <option>--with-perl</option> must be supplied to the
<indexterm><primary><filename>configure</filename></primary></indexterm> <indexterm><primary><filename>configure</filename></primary></indexterm>
<filename>configure</filename> script. PL/Perl requires that, when <filename>configure</filename> script. PL/Perl requires that, when
...@@ -69,7 +69,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete ...@@ -69,7 +69,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.10 2001/09/10 21:58:47 pete
When you want to retry to build PL/Perl after having reinstalled When you want to retry to build PL/Perl after having reinstalled
Perl, then change to the directory Perl, then change to the directory
<filename>src/pl/plperl</filename> in the <filename>src/pl/plperl</filename> in the
<productname>Postgres</productname> source tree and issue the commands <productname>PostgreSQL</productname> source tree and issue the commands
<programlisting> <programlisting>
gmake clean gmake clean
gmake all gmake all
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.6 2001/11/20 21:09:53 momjian Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.7 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="plpython"> <chapter id="plpython">
<title>PL/Python - Python Procedural Language</title> <title>PL/Python - Python Procedural Language</title>
...@@ -72,7 +72,7 @@ def __plpython_procedure_myfunc_23456(): ...@@ -72,7 +72,7 @@ def __plpython_procedure_myfunc_23456():
</para> </para>
<para> <para>
PostgreSQL function variables are available in the global <productname>PostgreSQL</> function variables are available in the global
<varname>args</varname> list. In the <function>myfunc</function> <varname>args</varname> list. In the <function>myfunc</function>
example, <varname>args[0]</> contains whatever was passed in as the text example, <varname>args[0]</> contains whatever was passed in as the text
argument. For <literal>myfunc2(text, integer)</literal>, <varname>args[0]</> argument. For <literal>myfunc2(text, integer)</literal>, <varname>args[0]</>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.49 2001/11/16 00:40:11 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.50 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="plpgsql"> <chapter id="plpgsql">
...@@ -11,7 +11,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.49 2001/11/16 00:40:11 ...@@ -11,7 +11,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.49 2001/11/16 00:40:11
<para> <para>
<application>PL/pgSQL</application> is a loadable procedural language for the <application>PL/pgSQL</application> is a loadable procedural language for the
<productname>Postgres</productname> database system. <productname>PostgreSQL</productname> database system.
</para> </para>
<para> <para>
...@@ -151,7 +151,7 @@ END; ...@@ -151,7 +151,7 @@ END;
<title>Better Performance</title> <title>Better Performance</title>
<para> <para>
<acronym>SQL</acronym> is the language PostgreSQL (and <acronym>SQL</acronym> is the language <productname>PostgreSQL</> (and
most other Relational Databases) use as query most other Relational Databases) use as query
language. It's portable and easy to learn. But every language. It's portable and easy to learn. But every
<acronym>SQL</acronym> statement must be executed <acronym>SQL</acronym> statement must be executed
...@@ -194,8 +194,8 @@ END; ...@@ -194,8 +194,8 @@ END;
<title>Portability</title> <title>Portability</title>
<para> <para>
Because <application>PL/pgSQL</application> functions run inside PostgreSQL, these Because <application>PL/pgSQL</application> functions run inside <productname>PostgreSQL</>, these
functions will run on any platform where PostgreSQL functions will run on any platform where <productname>PostgreSQL</>
runs. Thus you can reuse code and have less development costs. runs. Thus you can reuse code and have less development costs.
</para> </para>
</sect3> </sect3>
...@@ -219,7 +219,7 @@ END; ...@@ -219,7 +219,7 @@ END;
<listitem> <listitem>
<para> <para>
Using PostgreSQL's GUI Tool: <application>PgAccess</> Using <productname>PostgreSQL</>'s GUI Tool: <application>PgAccess</>
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -319,7 +319,7 @@ END; ...@@ -319,7 +319,7 @@ END;
they do not start or end a transaction. Functions and trigger procedures they do not start or end a transaction. Functions and trigger procedures
are always executed within a transaction established by an outer query are always executed within a transaction established by an outer query
--- they cannot start or commit transactions, since --- they cannot start or commit transactions, since
<productname>Postgres</productname> does not have nested transactions. <productname>PostgreSQL</productname> does not have nested transactions.
</para> </para>
<sect2> <sect2>
...@@ -643,7 +643,7 @@ SELECT <replaceable>expression</replaceable> ...@@ -643,7 +643,7 @@ SELECT <replaceable>expression</replaceable>
</para> </para>
<para> <para>
The evaluation done by the <productname>Postgres</productname> The evaluation done by the <productname>PostgreSQL</productname>
main parser has some side main parser has some side
effects on the interpretation of constant values. In detail there effects on the interpretation of constant values. In detail there
is a difference between what these two functions do: is a difference between what these two functions do:
...@@ -675,7 +675,7 @@ CREATE FUNCTION logfunc2 (TEXT) RETURNS TIMESTAMP AS ' ...@@ -675,7 +675,7 @@ CREATE FUNCTION logfunc2 (TEXT) RETURNS TIMESTAMP AS '
</programlisting> </programlisting>
In the case of <function>logfunc1()</function>, the In the case of <function>logfunc1()</function>, the
<productname>Postgres</productname> main parser knows when <productname>PostgreSQL</productname> main parser knows when
preparing the plan for the INSERT, that the string preparing the plan for the INSERT, that the string
<literal>'now'</literal> should be interpreted as <literal>'now'</literal> should be interpreted as
<type>timestamp</type> because the target field of <classname>logtable</classname> <type>timestamp</type> because the target field of <classname>logtable</classname>
...@@ -688,7 +688,7 @@ CREATE FUNCTION logfunc2 (TEXT) RETURNS TIMESTAMP AS ' ...@@ -688,7 +688,7 @@ CREATE FUNCTION logfunc2 (TEXT) RETURNS TIMESTAMP AS '
<para> <para>
In the case of <function>logfunc2()</function>, the In the case of <function>logfunc2()</function>, the
<productname>Postgres</productname> main parser does not know <productname>PostgreSQL</productname> main parser does not know
what type <literal>'now'</literal> should become and therefore what type <literal>'now'</literal> should become and therefore
it returns a data value of type <type>text</type> containing the string it returns a data value of type <type>text</type> containing the string
<literal>'now'</literal>. During the ensuing assignment <literal>'now'</literal>. During the ensuing assignment
...@@ -779,7 +779,7 @@ SELECT INTO <replaceable>target</replaceable> <replaceable>expressions</replacea ...@@ -779,7 +779,7 @@ SELECT INTO <replaceable>target</replaceable> <replaceable>expressions</replacea
where <replaceable>target</replaceable> can be a record variable, a row where <replaceable>target</replaceable> can be a record variable, a row
variable, or a comma-separated list of simple variables and variable, or a comma-separated list of simple variables and
record/row fields. Note that this is quite different from record/row fields. Note that this is quite different from
Postgres' normal interpretation of SELECT INTO, which is that the <productname>PostgreSQL</>'s normal interpretation of SELECT INTO, which is that the
INTO target is a newly created table. (If you want to create a INTO target is a newly created table. (If you want to create a
table from a SELECT result inside a <application>PL/pgSQL</application> function, use the table from a SELECT result inside a <application>PL/pgSQL</application> function, use the
syntax <command>CREATE TABLE ... AS SELECT</command>.) syntax <command>CREATE TABLE ... AS SELECT</command>.)
...@@ -1675,7 +1675,7 @@ RAISE EXCEPTION ''Inexistent ID --> %'',user_id; ...@@ -1675,7 +1675,7 @@ RAISE EXCEPTION ''Inexistent ID --> %'',user_id;
<title>Exceptions</title> <title>Exceptions</title>
<para> <para>
<productname>Postgres</productname> does not have a very smart <productname>PostgreSQL</productname> does not have a very smart
exception handling model. Whenever the parser, planner/optimizer exception handling model. Whenever the parser, planner/optimizer
or executor decide that a statement cannot be processed any longer, or executor decide that a statement cannot be processed any longer,
the whole transaction gets aborted and the system jumps back the whole transaction gets aborted and the system jumps back
...@@ -1914,7 +1914,7 @@ CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp ...@@ -1914,7 +1914,7 @@ CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp
either doubled or quoted with a backslash. We are still looking for either doubled or quoted with a backslash. We are still looking for
an elegant alternative. In the meantime, doubling the single quotes an elegant alternative. In the meantime, doubling the single quotes
as in the examples below should be used. Any solution for this as in the examples below should be used. Any solution for this
in future versions of <productname>Postgres</productname> will be in future versions of <productname>PostgreSQL</productname> will be
forward compatible. forward compatible.
</para> </para>
...@@ -2036,11 +2036,11 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' ...@@ -2036,11 +2036,11 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS '
<para> <para>
This section explains differences between Oracle's PL/SQL and This section explains differences between Oracle's PL/SQL and
PostgreSQL's <application>PL/pgSQL</application> languages in the hopes of helping developers <productname>PostgreSQL</>'s <application>PL/pgSQL</application> languages in the hopes of helping developers
port applications from Oracle to PostgreSQL. Most of the code here port applications from Oracle to <productname>PostgreSQL</>. Most of the code here
is from the <ulink url="http://www.arsdigita.com">ArsDigita</ulink> is from the <ulink url="http://www.arsdigita.com">ArsDigita</ulink>
<ulink url="http://www.arsdigita.com/asj/clickstream">Clickstream <ulink url="http://www.arsdigita.com/asj/clickstream">Clickstream
module</ulink> that I ported to PostgreSQL when I took an module</ulink> that I ported to <productname>PostgreSQL</> when I took an
internship with <ulink url="http://www.openforce.net">OpenForce internship with <ulink url="http://www.openforce.net">OpenForce
Inc.</ulink> in the Summer of 2000. Inc.</ulink> in the Summer of 2000.
</para> </para>
...@@ -2048,7 +2048,7 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' ...@@ -2048,7 +2048,7 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS '
<para> <para>
<application>PL/pgSQL</application> is similar to PL/SQL in many aspects. It is a block <application>PL/pgSQL</application> is similar to PL/SQL in many aspects. It is a block
structured, imperative language (all variables have to be structured, imperative language (all variables have to be
declared). PL/SQL has many more features than its PostgreSQL declared). PL/SQL has many more features than its <productname>PostgreSQL</>
counterpart, but <application>PL/pgSQL</application> allows for a great deal of functionality counterpart, but <application>PL/pgSQL</application> allows for a great deal of functionality
and it is being improved constantly. and it is being improved constantly.
</para> </para>
...@@ -2057,18 +2057,18 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' ...@@ -2057,18 +2057,18 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS '
<title>Main Differences</title> <title>Main Differences</title>
<para> <para>
Some things you should keep in mind when porting from Oracle to PostgreSQL: Some things you should keep in mind when porting from Oracle to <productname>PostgreSQL</>:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
No default parameters in PostgreSQL. No default parameters in <productname>PostgreSQL</>.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
You can overload functions in PostgreSQL. This is often used to work You can overload functions in <productname>PostgreSQL</>. This is often used to work
around the lack of default parameters. around the lack of default parameters.
</para> </para>
</listitem> </listitem>
...@@ -2081,14 +2081,14 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' ...@@ -2081,14 +2081,14 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS '
<listitem> <listitem>
<para> <para>
No need for cursors in PostgreSQL, just put the query in the FOR No need for cursors in <productname>PostgreSQL</>, just put the query in the FOR
statement (see example below) statement (see example below)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
In PostgreSQL you <emphasis>need</emphasis> to escape single In <productname>PostgreSQL</> you <emphasis>need</emphasis> to escape single
quotes. See <xref linkend="plpgsql-quote">. quotes. See <xref linkend="plpgsql-quote">.
</para> </para>
</listitem> </listitem>
...@@ -2099,7 +2099,7 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS ' ...@@ -2099,7 +2099,7 @@ CREATE FUNCTION c_overpaid (EMP, INTEGER) RETURNS BOOLEAN AS '
<title>Quote Me on That: Escaping Single Quotes</title> <title>Quote Me on That: Escaping Single Quotes</title>
<para> <para>
In PostgreSQL you need to escape single quotes inside your In <productname>PostgreSQL</> you need to escape single quotes inside your
function definition. This can lead to quite amusing code at function definition. This can lead to quite amusing code at
times, especially if you are creating a function that generates times, especially if you are creating a function that generates
other function(s), as in other function(s), as in
...@@ -2246,7 +2246,7 @@ SHOW ERRORS; ...@@ -2246,7 +2246,7 @@ SHOW ERRORS;
Oracle can have <literal>IN</literal>, <literal>OUT</literal>, Oracle can have <literal>IN</literal>, <literal>OUT</literal>,
and <literal>INOUT</literal> parameters passed to functions. and <literal>INOUT</literal> parameters passed to functions.
The <literal>INOUT</literal>, for example, means that the The <literal>INOUT</literal>, for example, means that the
parameter will receive a value and return another. PostgreSQL parameter will receive a value and return another. <productname>PostgreSQL</>
only has <quote>IN</quote> parameters and functions can return only has <quote>IN</quote> parameters and functions can return
only a single value. only a single value.
</para> </para>
...@@ -2256,13 +2256,13 @@ SHOW ERRORS; ...@@ -2256,13 +2256,13 @@ 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</>.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
On PostgreSQL functions are created using single quotes as On <productname>PostgreSQL</> functions are created using single quotes as
delimiters, so you have to escape single quotes inside your delimiters, so you have to escape single quotes inside your
functions (which can be quite annoying at times; see <xref functions (which can be quite annoying at times; see <xref
linkend="plpgsql-quote">). linkend="plpgsql-quote">).
...@@ -2272,7 +2272,7 @@ SHOW ERRORS; ...@@ -2272,7 +2272,7 @@ SHOW ERRORS;
<listitem> <listitem>
<para> <para>
The <literal>/show errors</literal> command does not exist in The <literal>/show errors</literal> command does not exist in
PostgreSQL. <productname>PostgreSQL</>.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -2280,7 +2280,7 @@ SHOW ERRORS; ...@@ -2280,7 +2280,7 @@ SHOW ERRORS;
<para> <para>
So let's see how this function would look when ported to So let's see how this function would look when ported to
PostgreSQL: <productname>PostgreSQL</>:
<programlisting> <programlisting>
CREATE OR REPLACE FUNCTION cs_fmt_browser_version(VARCHAR, VARCHAR) CREATE OR REPLACE FUNCTION cs_fmt_browser_version(VARCHAR, VARCHAR)
...@@ -2310,7 +2310,7 @@ END; ...@@ -2310,7 +2310,7 @@ END;
with the results in <literal>IF</literal> statements, for the with the results in <literal>IF</literal> statements, for the
sake of efficiency. Notice particularly the differences in sake of efficiency. Notice particularly the differences in
cursors, <literal>FOR</literal> loops, and the need to escape cursors, <literal>FOR</literal> loops, and the need to escape
single quotes in PostgreSQL. single quotes in <productname>PostgreSQL</>.
<programlisting> <programlisting>
CREATE OR REPLACE PROCEDURE cs_update_referrer_type_proc IS CREATE OR REPLACE PROCEDURE cs_update_referrer_type_proc IS
...@@ -2338,7 +2338,7 @@ show errors ...@@ -2338,7 +2338,7 @@ show errors
</para> </para>
<para> <para>
Here is how this function would end up in PostgreSQL: Here is how this function would end up in <productname>PostgreSQL</>:
<programlisting> <programlisting>
CREATE FUNCTION cs_update_referrer_type_proc() RETURNS INTEGER AS ' CREATE FUNCTION cs_update_referrer_type_proc() RETURNS INTEGER AS '
...@@ -2387,7 +2387,7 @@ END; ...@@ -2387,7 +2387,7 @@ END;
return several elements (host, path and query). It is an return several elements (host, path and query). It is an
procedure because in <application>PL/pgSQL</application> functions only one value can be returned procedure because in <application>PL/pgSQL</application> functions only one value can be returned
(see <xref linkend="plpgsql-porting-procedures">). In (see <xref linkend="plpgsql-porting-procedures">). In
PostgreSQL, one way to work around this is to split the procedure <productname>PostgreSQL</>, one way to work around this is to split the procedure
in three different functions: one to return the host, another for in three different functions: one to return the host, another for
the path and another for the query. the path and another for the query.
</para> </para>
...@@ -2405,7 +2405,7 @@ begin ...@@ -2405,7 +2405,7 @@ begin
v_host := NULL; v_host := NULL;
v_path := NULL; v_path := NULL;
v_query := NULL; v_query := NULL;
a_pos1 := instr(v_url, '//'); -- PostgreSQL doesn't have an instr function a_pos1 := instr(v_url, '//'); -- <productname>PostgreSQL</> doesn't have an instr function
IF a_pos1 = 0 THEN IF a_pos1 = 0 THEN
RETURN; RETURN;
...@@ -2433,7 +2433,7 @@ show errors; ...@@ -2433,7 +2433,7 @@ show errors;
</programlisting> </programlisting>
<para> <para>
Here is how this procedure could be translated for PostgreSQL: Here is how this procedure could be translated for <productname>PostgreSQL</>:
<programlisting> <programlisting>
CREATE OR REPLACE FUNCTION cs_parse_url_host(VARCHAR) RETURNS VARCHAR AS ' CREATE OR REPLACE FUNCTION cs_parse_url_host(VARCHAR) RETURNS VARCHAR AS '
...@@ -2469,7 +2469,7 @@ END; ...@@ -2469,7 +2469,7 @@ END;
<note> <note>
<para> <para>
PostgreSQL does not have an <function>instr</function> function, <productname>PostgreSQL</> does not have an <function>instr</function> function,
so you can work around it using a combination of other functions. so you can work around it using a combination of other functions.
I got tired of doing this and created my own I got tired of doing this and created my own
<function>instr</function> functions that behave exactly like <function>instr</function> functions that behave exactly like
...@@ -2524,14 +2524,14 @@ show errors ...@@ -2524,14 +2524,14 @@ show errors
</para> </para>
<para> <para>
Procedures like this can be easily converted into PostgreSQL Procedures like this can be easily converted into <productname>PostgreSQL</>
functions returning an <type>INTEGER</type>. This procedure in functions returning an <type>INTEGER</type>. This procedure in
particular is interesting because it can teach us some things: particular is interesting because it can teach us some things:
<calloutlist> <calloutlist>
<callout arearefs="co.plpgsql-porting-pragma"> <callout arearefs="co.plpgsql-porting-pragma">
<para> <para>
There is no <literal>pragma</literal> statement in PostgreSQL. There is no <literal>pragma</literal> statement in <productname>PostgreSQL</>.
</para> </para>
</callout> </callout>
...@@ -2546,7 +2546,7 @@ show errors ...@@ -2546,7 +2546,7 @@ show errors
<para> <para>
You also cannot have transactions in <application>PL/pgSQL</application> procedures. The You also cannot have transactions in <application>PL/pgSQL</application> procedures. The
entire function (and other functions called from therein) is entire function (and other functions called from therein) is
executed in a transaction and PostgreSQL rolls back the results if executed in a transaction and <productname>PostgreSQL</> rolls back the results if
something goes wrong. Therefore only one something goes wrong. Therefore only one
<literal>BEGIN</literal> statement is allowed. <literal>BEGIN</literal> statement is allowed.
</para> </para>
...@@ -2659,10 +2659,10 @@ show errors ...@@ -2659,10 +2659,10 @@ show errors
</para> </para>
<para> <para>
We port this to PostgreSQL by creating the different objects of We port this to <productname>PostgreSQL</> by creating the different objects of
the Oracle package as functions with a standard naming the Oracle package as functions with a standard naming
convention. We have to pay attention to some other details, like convention. We have to pay attention to some other details, like
the lack of default parameters in PostgreSQL functions. The above the lack of default parameters in <productname>PostgreSQL</> functions. The above
package would become something like this: package would become something like this:
<programlisting> <programlisting>
...@@ -2697,7 +2697,7 @@ END; ...@@ -2697,7 +2697,7 @@ END;
<title>EXECUTE</title> <title>EXECUTE</title>
<para> <para>
The PostgreSQL version of <literal>EXECUTE</literal> works The <productname>PostgreSQL</> version of <literal>EXECUTE</literal> works
nicely, but you have to remember to use nicely, but you have to remember to use
<function>quote_literal(TEXT)</function> and <function>quote_literal(TEXT)</function> and
<function>quote_string(TEXT)</function> as described in <xref <function>quote_string(TEXT)</function> as described in <xref
...@@ -2711,7 +2711,7 @@ END; ...@@ -2711,7 +2711,7 @@ END;
<title>Optimizing <application>PL/pgSQL</application> Functions</title> <title>Optimizing <application>PL/pgSQL</application> Functions</title>
<para> <para>
PostgreSQL gives you two function creation modifiers to optimize <productname>PostgreSQL</> gives you two function creation modifiers to optimize
execution: <literal>iscachable</literal> (function always returns execution: <literal>iscachable</literal> (function always returns
the same result when given the same arguments) and the same result when given the same arguments) and
<literal>isstrict</literal> (function returns NULL if any <literal>isstrict</literal> (function returns NULL if any
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.17 2001/11/21 05:53:41 thomas Exp $
--> -->
<chapter id="pltcl"> <chapter id="pltcl">
...@@ -15,7 +15,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E ...@@ -15,7 +15,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E
<para> <para>
PL/Tcl is a loadable procedural language for the PL/Tcl is a loadable procedural language for the
<productname>Postgres</productname> database system <productname>PostgreSQL</productname> database system
that enables the Tcl language to be used to create functions and that enables the Tcl language to be used to create functions and
trigger procedures. trigger procedures.
</para> </para>
...@@ -39,7 +39,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E ...@@ -39,7 +39,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E
a few commands are available to access the database via SPI and to raise a few commands are available to access the database via SPI and to raise
messages via <function>elog()</>. There is no way to access internals of the messages via <function>elog()</>. There is no way to access internals of the
database backend or to gain OS-level access under the permissions of the database backend or to gain OS-level access under the permissions of the
<productname>Postgres</productname> user ID, as a C function can do. <productname>PostgreSQL</productname> user ID, as a C function can do.
Thus, any unprivileged database user may be Thus, any unprivileged database user may be
permitted to use this language. permitted to use this language.
</para> </para>
...@@ -62,7 +62,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E ...@@ -62,7 +62,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E
<para> <para>
The shared object for the PL/Tcl and PL/TclU call handlers is The shared object for the PL/Tcl and PL/TclU call handlers is
automatically built and installed in the automatically built and installed in the
<productname>Postgres</productname> <productname>PostgreSQL</productname>
library directory if Tcl/Tk support is specified library directory if Tcl/Tk support is specified
in the configuration step of the installation procedure. To install in the configuration step of the installation procedure. To install
PL/Tcl and/or PL/TclU in a particular database, use the PL/Tcl and/or PL/TclU in a particular database, use the
...@@ -76,16 +76,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E ...@@ -76,16 +76,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.16 2001/11/19 03:58:24 tgl E
<title>Description</title> <title>Description</title>
<sect2> <sect2>
<title><productname>Postgres</productname> Functions and Tcl Procedure Names</title> <title><productname>PostgreSQL</productname> Functions and Tcl Procedure Names</title>
<para> <para>
In <productname>Postgres</productname>, one and the In <productname>PostgreSQL</productname>, one and the
same function name can be used for same function name can be used for
different functions as long as the number of arguments or their types different functions as long as the number of arguments or their types
differ. This would collide with Tcl procedure names. To offer the same differ. This would collide with Tcl procedure names. To offer the same
flexibility in PL/Tcl, the internal Tcl procedure names contain the object flexibility in PL/Tcl, the internal Tcl procedure names contain the object
ID of the procedure's pg_proc row as part of their name. Thus, different ID of the procedure's pg_proc row as part of their name. Thus, different
argtype versions of the same <productname>Postgres</productname> argtype versions of the same <productname>PostgreSQL</productname>
function are different for Tcl too. function are different for Tcl too.
</para> </para>
...@@ -128,7 +128,7 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS ' ...@@ -128,7 +128,7 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '
type. If an attribute in the actual row type. If an attribute in the actual row
has the NULL value, it will not appear in the array! Here is has the NULL value, it will not appear in the array! Here is
an example that defines the overpaid_2 function (as found in the an example that defines the overpaid_2 function (as found in the
older <productname>Postgres</productname> documentation) in PL/Tcl older <productname>PostgreSQL</productname> documentation) in PL/Tcl
<programlisting> <programlisting>
CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS ' CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS '
...@@ -175,7 +175,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS ' ...@@ -175,7 +175,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS '
</indexterm> </indexterm>
<para> <para>
Trigger procedures are defined in <productname>Postgres</productname> Trigger procedures are defined in <productname>PostgreSQL</productname>
as functions without as functions without
arguments and a return type of opaque. And so are they in the PL/Tcl arguments and a return type of opaque. And so are they in the PL/Tcl
language. language.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.46 2001/05/12 22:51:35 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.47 2001/11/21 05:53:41 thomas Exp $
--> -->
<!doctype set PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ <!doctype set PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
...@@ -47,11 +47,12 @@ sgml-shorttag:t ...@@ -47,11 +47,12 @@ sgml-shorttag:t
sgml-minimize-attributes:nil sgml-minimize-attributes:nil
sgml-always-quote-attributes:t sgml-always-quote-attributes:t
sgml-indent-step:1 sgml-indent-step:1
sgml-indent-tabs-mode:nil
sgml-indent-data:t sgml-indent-data:t
sgml-parent-document:nil sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced" sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog") sgml-local-catalogs:("/usr/share/sgml/catalog")
sgml-local-ecat-files:nil sgml-local-ecat-files:nil
End: End:
--> -->
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.10 2001/11/18 07:14:49 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.11 2001/11/21 05:53:41 thomas Exp $
--> -->
<sect1 id="bug-reporting"> <sect1 id="bug-reporting">
...@@ -8,8 +8,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.10 2001/11/18 07:14:49 tg ...@@ -8,8 +8,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.10 2001/11/18 07:14:49 tg
<para> <para>
When you find a bug in <productname>PostgreSQL</productname> we want to When you find a bug in <productname>PostgreSQL</productname> we want to
hear about it. Your bug reports play an important part in making hear about it. Your bug reports play an important part in making
<productname>PostgreSQL</productname> more reliable, because even the utmost <productname>PostgreSQL</productname> more reliable because even the utmost
care cannot guarantee that every part of PostgreSQL will work on every care cannot guarantee that every part of
<productname>PostgreSQL</productname>
will work on every
platform under every circumstance. platform under every circumstance.
</para> </para>
...@@ -259,7 +261,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.10 2001/11/18 07:14:49 tg ...@@ -259,7 +261,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/problems.sgml,v 2.10 2001/11/18 07:14:49 tg
The software package in total is called <quote>PostgreSQL</quote>, The software package in total is called <quote>PostgreSQL</quote>,
sometimes <quote>Postgres</quote> for short. If you sometimes <quote>Postgres</quote> for short. If you
are specifically talking about the backend server, mention that, do not are specifically talking about the backend server, mention that, do not
just say <quote>Postgres crashes</quote>. A crash of a single just say <quote>PostgreSQL crashes</quote>. A crash of a single
backend server process is quite different from crash of the parent backend server process is quite different from crash of the parent
<quote>postmaster</> process; please don't say <quote>the postmaster <quote>postmaster</> process; please don't say <quote>the postmaster
crashed</> when you mean a single backend went down, nor vice versa. crashed</> when you mean a single backend went down, nor vice versa.
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.21 2001/09/21 20:31:42 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.22 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="protocol"> <chapter id="protocol">
<title>Frontend/Backend Protocol</title> <title>Frontend/Backend Protocol</title>
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
normally create a new child process to handle each incoming normally create a new child process to handle each incoming
connection. However, this is not required. In the current connection. However, this is not required. In the current
implementation, a new child process is created immediately after an implementation, a new child process is created immediately after an
incoming connection is detected. In earlier versions of PostgreSQL incoming connection is detected. In earlier versions of
<productname>PostgreSQL</>
(7.1 and earlier), the child process was created after sending the (7.1 and earlier), the child process was created after sending the
authentication confirmation message. authentication confirmation message.
</para> </para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/pygresql.sgml,v 1.4 2001/11/19 03:58:24 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/pygresql.sgml,v 1.5 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="pygresql"> <chapter id="pygresql">
<title><application>PyGreSQL</application> - <application>Python</application> Interface</title> <title><application>PyGreSQL</application> - <application>Python</application> Interface</title>
...@@ -384,7 +384,7 @@ make && make install ...@@ -384,7 +384,7 @@ make && make install
<listitem> <listitem>
<para> <para>
<classname>pglargeobject</classname>, which handles all the accesses <classname>pglargeobject</classname>, which handles all the accesses
to <productname>Postgres</productname> large objects, and to <productname>PostgreSQL</productname> large objects, and
</para> </para>
</listitem> </listitem>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.12 2001/11/19 03:58:24 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.13 2001/11/21 05:53:41 thomas Exp $ -->
<chapter id="queries"> <chapter id="queries">
<title>Queries</title> <title>Queries</title>
...@@ -342,7 +342,7 @@ FROM <replaceable>table_reference</replaceable> AS <replaceable>alias</replaceab ...@@ -342,7 +342,7 @@ FROM <replaceable>table_reference</replaceable> AS <replaceable>alias</replaceab
SELECT * FROM my_table AS m WHERE my_table.a > 5; SELECT * FROM my_table AS m WHERE my_table.a > 5;
</programlisting> </programlisting>
is not valid SQL syntax. What will actually happen (this is a is not valid SQL syntax. What will actually happen (this is a
<productname>Postgres</productname> extension to the standard) <productname>PostgreSQL</productname> extension to the standard)
is that an implicit is that an implicit
table reference is added to the FROM clause, so the query is table reference is added to the FROM clause, so the query is
processed as if it were written as processed as if it were written as
...@@ -586,7 +586,7 @@ SELECT pid, p.name, (sum(s.units) * p.price) AS sales ...@@ -586,7 +586,7 @@ SELECT pid, p.name, (sum(s.units) * p.price) AS sales
<para> <para>
In strict SQL, GROUP BY can only group by columns of the source In strict SQL, GROUP BY can only group by columns of the source
table but Postgres extends this to also allow GROUP BY to group by table but <productname>PostgreSQL</productname> extends this to also allow GROUP BY to group by
select columns in the query select list. Grouping by value select columns in the query select list. Grouping by value
expressions instead of simple column names is also allowed. expressions instead of simple column names is also allowed.
</para> </para>
...@@ -598,7 +598,7 @@ SELECT <replaceable>select_list</replaceable> FROM ... <optional>WHERE ...</opti ...@@ -598,7 +598,7 @@ SELECT <replaceable>select_list</replaceable> FROM ... <optional>WHERE ...</opti
If a table has been grouped using a GROUP BY clause, but then only If a table has been grouped using a GROUP BY clause, but then only
certain groups are of interest, the HAVING clause can be used, certain groups are of interest, the HAVING clause can be used,
much like a WHERE clause, to eliminate groups from a grouped much like a WHERE clause, to eliminate groups from a grouped
table. Postgres allows a HAVING clause to be table. <productname>PostgreSQL</productname> allows a HAVING clause to be
used without a GROUP BY, in which case it acts like another WHERE used without a GROUP BY, in which case it acts like another WHERE
clause, but the point in using HAVING that way is not clear. A good clause, but the point in using HAVING that way is not clear. A good
rule of thumb is that a HAVING condition should refer to the results rule of thumb is that a HAVING condition should refer to the results
...@@ -865,7 +865,7 @@ SELECT a, sum(b) FROM table1 GROUP BY a ORDER BY 1; ...@@ -865,7 +865,7 @@ SELECT a, sum(b) FROM table1 GROUP BY a ORDER BY 1;
</para> </para>
<para> <para>
As an extension to the SQL standard, Postgres also allows ordering As an extension to the SQL standard, <productname>PostgreSQL</productname> also allows ordering
by arbitrary expressions: by arbitrary expressions:
<programlisting> <programlisting>
SELECT a, b FROM table1 ORDER BY a + b; SELECT a, b FROM table1 ORDER BY a + b;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment