Commit 651a639b authored by Peter Eisentraut's avatar Peter Eisentraut

proof-reading

parent cde7dc82
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.16 2001/11/21 05:53:40 thomas Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.17 2001/11/28 20:49:09 petere Exp $ -->
<chapter id="arrays"> <chapter id="arrays">
<title>Arrays</title> <title>Arrays</title>
...@@ -68,8 +68,8 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] &lt;&gt; pay_by_quarter[2]; ...@@ -68,8 +68,8 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] &lt;&gt; pay_by_quarter[2];
The array subscript numbers are written within square brackets. The array subscript numbers are written within square brackets.
<productname>PostgreSQL</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 <replaceable>n</> elements starts with <literal>array[1]</literal> and
ends with <literal>array[n]</literal>. ends with <literal>array[<replaceable>n</>]</literal>.
</para> </para>
<para> <para>
...@@ -232,7 +232,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000; ...@@ -232,7 +232,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
<tip> <tip>
<para> <para>
Arrays are not lists; using arrays in the manner described in the Arrays are not sets; using arrays in the manner described in the
previous paragraph is often a sign of database misdesign. The previous paragraph is often a sign of database misdesign. The
array field should generally be split off into a separate table. array field should generally be split off into a separate table.
Tables can obviously be searched easily. Tables can obviously be searched easily.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.21 2001/11/21 05:53:40 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.22 2001/11/28 20:49:09 petere Exp $
--> -->
<chapter id="backup"> <chapter id="backup">
<title>Backup and Restore</title> <title>Backup and Restore</title>
...@@ -26,7 +26,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.21 2001/11/21 05:53:40 thom ...@@ -26,7 +26,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.21 2001/11/21 05:53:40 thom
<title><acronym>SQL</> Dump</title> <title><acronym>SQL</> Dump</title>
<para> <para>
The idea behind this method is to generate a text file with SQL The idea behind the SQL-dump 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>PostgreSQL</> provides the utility program <productname>PostgreSQL</> provides the utility program
...@@ -107,8 +107,8 @@ psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class ...@@ -107,8 +107,8 @@ psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class
for the pg_dump command. The database <replaceable for the pg_dump command. The database <replaceable
class="parameter">dbname</replaceable> will not be created by this class="parameter">dbname</replaceable> will not be created by this
command, you must create it yourself from template0 before executing command, you must create it yourself from template0 before executing
<application>psql</> (e.g., with <userinput>createdb -T template0 <application>psql</> (e.g., with <literal>createdb -T template0
<replaceable class="parameter">dbname</></userinput>). <replaceable class="parameter">dbname</></literal>).
<application>psql</> supports similar options to <application>pg_dump</> <application>psql</> supports similar options to <application>pg_dump</>
for controlling the database server location and the user names. See for controlling the database server location and the user names. See
its reference page for more information. its reference page for more information.
...@@ -376,15 +376,14 @@ tar -cf backup.tar /usr/local/pgsql/data ...@@ -376,15 +376,14 @@ tar -cf backup.tar /usr/local/pgsql/data
change between releases of <productname>PostgreSQL</>. 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 7.1.1 and 7.1.2 are. When you
update between compatible versions, then you can simply reuse the update between compatible versions, then you can simply reuse the
data area in disk by the new executables. Otherwise you need to data area in disk by the new executables. Otherwise you need to
<quote>back up</> your data and <quote>restore</> it on the new <quote>back up</> your data and <quote>restore</> it on the new
server, using <application>pg_dump</>. (There are checks in place server, using <application>pg_dump</>. (There are checks in place
that prevent you from doing the wrong thing, so no harm can be done that prevent you from doing the wrong thing, so no harm can be done
by confusing these things.) The precise installation procedure is by confusing these things.) The precise installation procedure is
not subject of this section, the <citetitle>Installation not subject of this section, these details are in <xref linkend="installation">.
Instructions</citetitle> carry these details.
</para> </para>
<para> <para>
......
This diff is collapsed.
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.29 2001/11/21 05:53:40 thomas Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.30 2001/11/28 20:49:09 petere Exp $ -->
<chapter id="client-authentication"> <chapter id="client-authentication">
<title>Client Authentication</title> <title>Client Authentication</title>
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
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
that match their Unix user ids. However, a server that accepts remote that match their operating system user names. However, a server that accepts remote
connections may have many users who have no local account, and in such connections may have many users who have no local account, and in such
cases there need be no connection between database user names and Unix cases there need be no connection between database user names and OS
user names. user names.
</para> </para>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<filename>/usr/local/pgsql/data/pg_hba.conf</filename>. (<acronym>HBA</> stands <filename>/usr/local/pgsql/data/pg_hba.conf</filename>. (<acronym>HBA</> stands
for host-based authentication.) A default <filename>pg_hba.conf</filename> for host-based authentication.) A default <filename>pg_hba.conf</filename>
file is installed when the file is installed when the
data area is initialized by <application>initdb</application>. data area is initialized by <command>initdb</command>.
</para> </para>
<para> <para>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
(if relevant for the connection type), a database name or names, (if relevant for the connection type), a database name or names,
and the authentication method to be used for connections matching and the authentication method to be used for connections matching
these parameters. these parameters.
The first record that matches the type, client address and requested The first record that matches the type, client address, and requested
database name of a connection attempt is used to do the database name of a connection attempt is used to do the
authentication step. There is no <quote>fall-through</> or authentication step. There is no <quote>fall-through</> or
<quote>backup</>: if one record is chosen and the authentication <quote>backup</>: if one record is chosen and the authentication
...@@ -348,7 +348,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -348,7 +348,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
<para> <para>
Since the <filename>pg_hba.conf</filename> records are examined Since the <filename>pg_hba.conf</filename> records are examined
sequentially for each connection attempt, order of the records is sequentially for each connection attempt, the order of the records is
very significant. Typically, earlier records will have tight very significant. Typically, earlier records will have tight
connection match parameters and weaker authentication methods, connection match parameters and weaker authentication methods,
while later records will have looser match parameters and stronger while later records will have looser match parameters and stronger
...@@ -368,7 +368,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable ...@@ -368,7 +368,7 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
and when the <application>postmaster</> receives a and when the <application>postmaster</> receives a
<systemitem>SIGHUP</systemitem> signal. If you edit the file on an <systemitem>SIGHUP</systemitem> signal. If you edit the file on an
active system, you will need to signal the <application>postmaster</> active system, you will need to signal the <application>postmaster</>
(using <application>pg_ctl reload</> or <application>kill -HUP</>) (using <literal>pg_ctl reload</> or <literal>kill -HUP</>)
to make it re-read the file. to make it re-read the file.
</para> </para>
...@@ -482,7 +482,7 @@ local all md5 admins ...@@ -482,7 +482,7 @@ local all md5 admins
<synopsis> <synopsis>
<replaceable>username</replaceable>:<replaceable>password</replaceable> <replaceable>username</replaceable>:<replaceable>password</replaceable>
</synopsis> </synopsis>
Any extra colon separated fields following the password are Any extra colon-separated fields following the password are
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
...@@ -558,7 +558,7 @@ local all md5 admins ...@@ -558,7 +558,7 @@ local all md5 admins
</para> </para>
<para> <para>
Client principals must have their <productname>PostgreSQL</> username as Client principals must have their <productname>PostgreSQL</> user name 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
...@@ -591,8 +591,8 @@ local all md5 admins ...@@ -591,8 +591,8 @@ local all md5 admins
<para> <para>
When connecting to the database make sure you have a ticket for a When connecting to the database make sure you have a ticket for a
principal matching the requested database username. principal matching the requested database user name.
An example: For database username <literal>fred</>, both principal An example: For database user name <literal>fred</>, both principal
<literal>fred@EXAMPLE.COM</> and <literal>fred@EXAMPLE.COM</> and
<literal>fred/users.example.com@EXAMPLE.COM</> can be <literal>fred/users.example.com@EXAMPLE.COM</> can be
used to authenticate to the database server. used to authenticate to the database server.
...@@ -696,7 +696,7 @@ local all md5 admins ...@@ -696,7 +696,7 @@ local all md5 admins
and when the <application>postmaster</> receives a and when the <application>postmaster</> receives a
<systemitem>SIGHUP</systemitem> signal. If you edit the file on an <systemitem>SIGHUP</systemitem> signal. If you edit the file on an
active system, you will need to signal the <application>postmaster</> active system, you will need to signal the <application>postmaster</>
(using <application>pg_ctl reload</> or <application>kill -HUP</>) (using <literal>pg_ctl reload</> or <literal>kill -HUP</>)
to make it re-read the file. to make it re-read the file.
</para> </para>
...@@ -744,7 +744,7 @@ omicron bryanh guest1 ...@@ -744,7 +744,7 @@ omicron bryanh guest1
No pg_hba.conf entry for host 123.123.123.123, user joeblow, database testdb No pg_hba.conf entry for host 123.123.123.123, user joeblow, database testdb
</ProgramListing> </ProgramListing>
This is what you are most likely to get if you succeed in This is what you are most likely to get if you succeed in
contacting the server, but it doesn't want to talk to you. As the contacting the server, but it does not want to talk to you. As the
message suggests, the server refused the connection request message suggests, the server refused the connection request
because it found no authorizing entry in its <filename>pg_hba.conf</filename> because it found no authorizing entry in its <filename>pg_hba.conf</filename>
configuration file. configuration file.
...@@ -755,10 +755,10 @@ No pg_hba.conf entry for host 123.123.123.123, user joeblow, database testdb ...@@ -755,10 +755,10 @@ No pg_hba.conf entry for host 123.123.123.123, user joeblow, database testdb
Password authentication failed for user 'joeblow' Password authentication failed for user 'joeblow'
</ProgramListing> </ProgramListing>
Messages like this indicate that you contacted the server, and Messages like this indicate that you contacted the server, and
it's willing to talk to you, but not until you pass the it is willing to talk to you, but not until you pass the
authorization method specified in the authorization method specified in the
<filename>pg_hba.conf</filename> file. Check the password you're <filename>pg_hba.conf</filename> file. Check the password you are
providing, or check your Kerberos or IDENT software if the providing, or check your Kerberos or ident software if the
complaint mentions one of those authentication types. complaint mentions one of those authentication types.
</para> </para>
...@@ -766,15 +766,15 @@ Password authentication failed for user 'joeblow' ...@@ -766,15 +766,15 @@ Password authentication failed for user 'joeblow'
<ProgramListing> <ProgramListing>
FATAL 1: user "joeblow" does not exist FATAL 1: user "joeblow" does not exist
</ProgramListing> </ProgramListing>
The indicated user name was not found in pg_shadow. The indicated user name was not found.
</para> </para>
<para> <para>
<ProgramListing> <ProgramListing>
FATAL 1: Database "testdb" does not exist in the system catalog. FATAL 1: Database "testdb" does not exist in the system catalog.
</ProgramListing> </ProgramListing>
The database you're trying to connect to doesn't exist. Note that The database you are trying to connect to does not exist. Note that
if you don't specify a database name, it defaults to the database if you do not specify a database name, it defaults to the database
user name, which may or may not be the right thing. user name, which may or may not be the right thing.
</para> </para>
......
This diff is collapsed.
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.85 2001/11/21 22:33:14 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.86 2001/11/28 20:49:09 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -774,10 +774,10 @@ PostgreSQL documentation ...@@ -774,10 +774,10 @@ PostgreSQL documentation
VARYING</type>, and <type>TEXT</type>. Unless otherwise noted, all VARYING</type>, and <type>TEXT</type>. Unless otherwise noted, all
of the functions listed below work on all of these types, but be of the functions listed below work on all of these types, but be
wary of potential effects of the automatic padding when using the wary of potential effects of the automatic padding when using the
<type>CHARACTER</type> type. Generally the functions described <type>CHARACTER</type> type. Generally, the functions described
here also work on data of non-string types by converting that data here also work on data of non-string types by converting that data
to a string representation first. Some functions also exist to a string representation first. Some functions also exist
natively for bit string types. natively for bit-string types.
</para> </para>
<para> <para>
...@@ -1430,8 +1430,8 @@ PostgreSQL documentation ...@@ -1430,8 +1430,8 @@ PostgreSQL documentation
you must write two backslashes in the query. Thus, writing a pattern you must write two backslashes in the query. Thus, writing a pattern
that actually matches a literal backslash means writing four backslashes that actually matches a literal backslash means writing four backslashes
in the query. You can avoid this by selecting a different escape in the query. You can avoid this by selecting a different escape
character with <literal>ESCAPE</literal>; then backslash isn't special character with <literal>ESCAPE</literal>; then backslash is not special
to <function>LIKE</> anymore. (But it's still special to the string to <function>LIKE</> anymore. (But it is still special to the string
literal parser, so you still need two of them.) literal parser, so you still need two of them.)
</para> </para>
...@@ -1865,7 +1865,7 @@ PostgreSQL documentation ...@@ -1865,7 +1865,7 @@ PostgreSQL documentation
In an output template string, there are certain patterns that are In an output template string, there are certain patterns that are
recognized and replaced with appropriately-formatted data from the value recognized and replaced with appropriately-formatted data from the value
to be formatted. Any text that is not a template pattern is simply to be formatted. Any text that is not a template pattern is simply
copied verbatim. Similarly, in an input template string template patterns copied verbatim. Similarly, in an input template string, template patterns
identify the parts of the input data string to be looked at and the identify the parts of the input data string to be looked at and the
values to be found there. values to be found there.
</para> </para>
...@@ -2179,17 +2179,23 @@ PostgreSQL documentation ...@@ -2179,17 +2179,23 @@ PostgreSQL documentation
<listitem> <listitem>
<para> <para>
Millisecond <literal>MS</literal> and microsecond <literal>US</literal> Millisecond <literal>MS</literal> and microsecond <literal>US</literal>
values are in conversion from string to time stamp used as part of values in a conversion from string to time stamp are used as part of the
second after decimal point. For example seconds after the decimal point. For example
<literal>to_timestamp('12:3', 'SS:MS')</literal> is not 3 milliseconds, <literal>to_timestamp('12:3', 'SS:MS')</literal> is not 3 milliseconds,
but 300, because the conversion count it as <literal>12 + 0.3</literal>. but 300, because the conversion counts it as 12 + 0.3.
It means for format 'SS:MS' is '12:3' or '12:30' or '12:300' same This means for the format <literal>SS:MS</>, the input values
number of milliseconds. For the three milliseconds must be used <literal>12:3</>, <literal>12:30</>, and <literal>12:300</> specify the
'12:003' that the conversion count as same number of milliseconds. To get three milliseconds, one must use
<literal> 12 + 0.003 = 12.003 seconds </literal>. Here is a more <literal>12:003</>, which the conversion counts as
12 + 0.003 = 12.003 seconds.
</para>
<para>
Here is a more
complex example: complex example:
<literal>to_timestamp('15:12:02.020.001230','HH:MI:SS.MS.US')</literal> <literal>to_timestamp('15:12:02.020.001230','HH:MI:SS.MS.US')</literal>
is 15 hours, 12 minutes, 2.021230 seconds. is 15 hours, 12 minutes, and 2 seconds + 20 milliseconds +
1230 microseconds = 2.021230 seconds.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -2269,7 +2275,7 @@ PostgreSQL documentation ...@@ -2269,7 +2275,7 @@ PostgreSQL documentation
</row> </row>
<row> <row>
<entry><literal>EEEE</literal></entry> <entry><literal>EEEE</literal></entry>
<entry>scientific numbers (not supported yet)</entry> <entry>scientific notation (not implemented yet)</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
...@@ -2282,10 +2288,11 @@ PostgreSQL documentation ...@@ -2282,10 +2288,11 @@ PostgreSQL documentation
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
A sign formatted using 'SG', 'PL' or 'MI' is not an anchor in A sign formatted using <literal>SG</>, <literal>PL</>, or
<literal>MI</> is not an anchor in
the number; for example, the number; for example,
to_char(-12, 'S9999') produces <literal>' -12'</literal>, <literal>to_char(-12, 'S9999')</> produces <literal>' -12'</literal>,
but to_char(-12, 'MI9999') produces <literal>'- 12'</literal>. but <literal>to_char(-12, 'MI9999')</> produces <literal>'- 12'</literal>.
The Oracle implementation does not allow the use of The Oracle implementation does not allow the use of
<literal>MI</literal> ahead of <literal>9</literal>, but rather <literal>MI</literal> ahead of <literal>9</literal>, but rather
requires that <literal>9</literal> precede requires that <literal>9</literal> precede
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.18 2001/11/28 20:49:10 petere Exp $
--> -->
<sect1 id="history"> <sect1 id="history">
<title>A Short History of <productname>Postgres</productname></title> <title>A Short History of <productname>PostgreSQL</productname></title>
<para> <para>
The object-relational database management system now known as The object-relational database management system now known as
...@@ -134,7 +134,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl ...@@ -134,7 +134,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl
<para> <para>
In addition to the monitor program, a new program In addition to the monitor program, a new program
(<application>psql</application>) was provided for interactive SQL queries (<application>psql</application>) was provided for interactive SQL queries
using <acronym>GNU</acronym> <filename>readline</filename>. using <acronym>GNU</acronym> <application>Readline</application>.
</para> </para>
</listitem> </listitem>
...@@ -143,7 +143,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl ...@@ -143,7 +143,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl
A new front-end library, <filename>libpgtcl</filename>, A new front-end library, <filename>libpgtcl</filename>,
supported <acronym>Tcl</acronym>-based clients. A sample shell, supported <acronym>Tcl</acronym>-based clients. A sample shell,
<command>pgtclsh</command>, provided new Tcl commands to interface <command>pgtclsh</command>, provided new Tcl commands to interface
<application>tcl</application> <application>Tcl</application>
programs with the <productname>Postgres95</productname> backend. programs with the <productname>Postgres95</productname> backend.
</para> </para>
</listitem> </listitem>
...@@ -167,7 +167,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl ...@@ -167,7 +167,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.17 2001/11/23 22:06:20 tgl
<para> <para>
A short tutorial introducing regular <acronym>SQL</acronym> features as A short tutorial introducing regular <acronym>SQL</acronym> features as
well as those of <productname>Postgres95</productname> was well as those of <productname>Postgres95</productname> was
distributed with the source code. distributed with the source code
</para> </para>
</listitem> </listitem>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.28 2001/11/21 05:53:41 thomas Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.29 2001/11/28 20:49:10 petere Exp $ -->
<chapter id="indexes"> <chapter id="indexes">
<title id="indexes-title">Indexes</title> <title id="indexes-title">Indexes</title>
...@@ -91,7 +91,7 @@ CREATE INDEX test1_id_index ON test1 (id); ...@@ -91,7 +91,7 @@ CREATE INDEX test1_id_index ON test1 (id);
</para> </para>
<para> <para>
When an index is created, it has to be kept synchronized with the When an index is created, the system has to keep it synchronized with the
table. This adds overhead to data manipulation operations. table. This adds overhead to data manipulation operations.
Therefore indexes that are non-essential or do not get used at all Therefore indexes that are non-essential or do not get used at all
should be removed. Note that a should be removed. Note that a
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.14 2001/11/21 05:53:41 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.15 2001/11/28 20:49:10 petere Exp $
--> -->
<sect1 id="resources"> <sect1 id="resources">
...@@ -137,14 +137,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.14 2001/11/21 05:53:41 thomas ...@@ -137,14 +137,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/info.sgml,v 1.14 2001/11/21 05:53:41 thomas
<term>Yourself!</term> <term>Yourself!</term>
<listitem> <listitem>
<para> <para>
<productname>PostgreSQL</productname> is an open source effort. <productname>PostgreSQL</productname> is an open-source effort.
As such, it depends on the user community for ongoing support. As such, it depends on the user community for ongoing support.
As you begin to use <productname>PostgreSQL</productname>, you As you begin to use <productname>PostgreSQL</productname>, you
will rely on others for help, either through the documentation will rely on others for help, either through the documentation
or through the mailing lists. Consider contributing your or through the mailing lists. Consider contributing your
knowledge back. If you learn something which is not in the knowledge back. If you learn something which is not in the
documentation, write it up and contribute it. If you add documentation, write it up and contribute it. If you add
features to the code, contribute it. features to the code, contribute them.
</para> </para>
<para> <para>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<para> <para>
To use the libraries, you must add the To use the libraries, you must add the
<filename>libpqdll.lib</filename> file to your project. (In Visual <filename>libpqdll.lib</filename> file to your project. (In Visual
C++, just right-click on the project and chose to add it.) C++, just right-click on the project and choose to add it.)
</para> </para>
</chapter> </chapter>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.66 2001/11/27 20:35:08 momjian Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.67 2001/11/28 20:49:10 petere Exp $ -->
<chapter id="installation"> <chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]> <title><![%standalone-include[<productname>PostgreSQL</>]]>
...@@ -59,7 +59,7 @@ su - postgres ...@@ -59,7 +59,7 @@ su - postgres
<application>make</> programs will <emphasis>not</> work. <application>make</> programs will <emphasis>not</> work.
<acronym>GNU</> <application>make</> is often installed under <acronym>GNU</> <application>make</> is often installed under
the name <filename>gmake</filename>; this document will always the name <filename>gmake</filename>; this document will always
refer to it by that name. (On <systemitem class="osname">GNU/Linux</> systems GNU make is the refer to it by that name. (On some systems GNU make is the
default tool with the name <filename>make</>.) To test for default tool with the name <filename>make</>.) To test for
<acronym>GNU</acronym> <application>make</application> enter <acronym>GNU</acronym> <application>make</application> enter
<screen> <screen>
...@@ -149,9 +149,9 @@ su - postgres ...@@ -149,9 +149,9 @@ su - postgres
<para> <para>
Also check that you have sufficient disk space. You will need about Also check that you have sufficient disk space. You will need about
30 MB for the source tree during compilation and about 5 MB for the 30 MB for the source tree during compilation and about 10 MB for the
installation directory. An empty database takes about 1 MB, later installation directory. An empty database cluster takes about 20 MB, databases
it takes about five times the amount of space that a flat text file take about five times the amount of space that a flat text file
with the same data would take. If you are going to run the with the same data would take. If you are going to run the
regression tests you will temporarily need an extra 20 MB. Use the regression tests you will temporarily need an extra 20 MB. Use the
<command>df</command> command to check for disk space. <command>df</command> command to check for disk space.
...@@ -166,15 +166,15 @@ su - postgres ...@@ -166,15 +166,15 @@ su - postgres
The <productname>PostgreSQL</> &version; sources can be obtained by The <productname>PostgreSQL</> &version; sources can be obtained by
anonymous FTP from <ulink anonymous FTP from <ulink
url="ftp://ftp.postgresql.org/pub/postgresql-&version;.tar.gz"></ulink>. url="ftp://ftp.postgresql.org/pub/postgresql-&version;.tar.gz"></ulink>.
Use a mirror if possible. Then unpack it: Use a mirror if possible. After you have obtained the file, unpack it:
<screen> <screen>
<userinput>gunzip postgresql-&version;.tar.gz</userinput> <userinput>gunzip postgresql-&version;.tar.gz</userinput>
<userinput>tar xf postgresql-&version;.tar</userinput> <userinput>tar xf postgresql-&version;.tar</userinput>
</screen> </screen>
This will create a directory This will create a directory
<filename>postgresql-&version;</filename> with the <filename>postgresql-&version;</filename> under the current directory
<productname>PostgreSQL</> sources with the <productname>PostgreSQL</> sources.
in the current directory. Change into that directory for the rest Change into that directory for the rest
of the installation procedure. of the installation procedure.
</para> </para>
</sect1> </sect1>
...@@ -367,7 +367,7 @@ su - postgres ...@@ -367,7 +367,7 @@ su - postgres
<replaceable>PREFIX</> was set to. This can be useful to <replaceable>PREFIX</> was set to. This can be useful to
share architecture-independent files between hosts. If you share architecture-independent files between hosts. If you
omit this, then <replaceable>EXEC-PREFIX</> is set equal to omit this, then <replaceable>EXEC-PREFIX</> is set equal to
<replaceable>PREFIX</> and both architecture dependent and <replaceable>PREFIX</> and both architecture-dependent and
independent files will be installed under the same tree, independent files will be installed under the same tree,
which is probably what you want. which is probably what you want.
</para> </para>
...@@ -545,13 +545,18 @@ su - postgres ...@@ -545,13 +545,18 @@ su - postgres
<term><option>--enable-multibyte</option></term> <term><option>--enable-multibyte</option></term>
<listitem> <listitem>
<para> <para>
Allows the use of multibyte character encodings. This is Allows the use of multibyte character encodings (including Unicode)
primarily for languages like Japanese, Korean, and Chinese. and character set encoding conversion. Read
Read
<![%standalone-include[the <citetitle>Administrator's Guide</citetitle>]]> <![%standalone-include[the <citetitle>Administrator's Guide</citetitle>]]>
<![%standalone-ignore[<xref linkend="multibyte">]]> <![%standalone-ignore[<xref linkend="multibyte">]]>
for details. for details.
</para> </para>
<para>
Note that some interfaces (such as Tcl or Java) expect all character
strings to be in Unicode, so this option will be required to correctly
support these interfaces.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -690,7 +695,10 @@ su - postgres ...@@ -690,7 +695,10 @@ su - postgres
<term><option>--enable-odbc</option></term> <term><option>--enable-odbc</option></term>
<listitem> <listitem>
<para> <para>
Build the ODBC driver. Build the ODBC driver. By default, the driver will be independent
of a driver manager. To work better with a driver manager already
installed on your system, use one of the following options. More
information can be found in the <citetitle>Programmer's Guide</citetitle>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -852,7 +860,7 @@ su - postgres ...@@ -852,7 +860,7 @@ su - postgres
Also, having the tests turned on won't necessarily enhance the Also, having the tests turned on won't necessarily enhance the
stability of your server! The assertion checks are not categorized stability of your server! The assertion checks are not categorized
for severity, and so what might be a relatively harmless bug will for severity, and so what might be a relatively harmless bug will
still lead to postmaster restarts if it triggers an assertion still lead to server restarts if it triggers an assertion
failure. Currently, this option is not recommended for failure. Currently, this option is not recommended for
production use, but you should have it on for development work production use, but you should have it on for development work
or when running a beta version. or when running a beta version.
...@@ -954,9 +962,7 @@ All of PostgreSQL is successfully made. Ready to install. ...@@ -954,9 +962,7 @@ All of PostgreSQL is successfully made. Ready to install.
<userinput>gmake -C src/interfaces/perl5 install</userinput> <userinput>gmake -C src/interfaces/perl5 install</userinput>
<userinput>gmake -C src/interfaces/python install</userinput> <userinput>gmake -C src/interfaces/python install</userinput>
</screen> </screen>
Due to a quirk in the Perl build environment the first command If you do not have superuser
will actually rebuild the complete interface and then install it.
This is not harmful, just unusual. If you do not have superuser
access you are on your own: you can still take the required files access you are on your own: you can still take the required files
and place them in other directories where Perl or Python can find and place them in other directories where Perl or Python can find
them, but how to do that is left as an exercise. them, but how to do that is left as an exercise.
...@@ -971,7 +977,7 @@ All of PostgreSQL is successfully made. Ready to install. ...@@ -971,7 +977,7 @@ All of PostgreSQL is successfully made. Ready to install.
<screen> <screen>
<userinput>gmake install-all-headers</userinput> <userinput>gmake install-all-headers</userinput>
</screen> </screen>
This adds a megabyte or two to the install footprint, and is only This adds a megabyte or two to the installation footprint, and is only
useful if you don't plan to keep the whole source tree around for useful if you don't plan to keep the whole source tree around for
reference. (If you do, you can just use the source's include reference. (If you do, you can just use the source's include
directory when building server-side software.) directory when building server-side software.)
...@@ -992,8 +998,7 @@ All of PostgreSQL is successfully made. Ready to install. ...@@ -992,8 +998,7 @@ All of PostgreSQL is successfully made. Ready to install.
<para> <para>
To undo the installation use the command <command>gmake To undo the installation use the command <command>gmake
uninstall</>. However, this will not remove the Perl and Python uninstall</>. However, this will not remove any directories.
interfaces and it will not remove any directories.
</para> </para>
</step> </step>
</procedure> </procedure>
...@@ -1664,7 +1669,7 @@ gunzip -c user.ps.gz \ ...@@ -1664,7 +1669,7 @@ gunzip -c user.ps.gz \
<entry>7.1</entry> <entry>7.1</entry>
<entry>2001-03-26, Magnus Hagander (<email>mha@sollentuna.net</email>)</entry> <entry>2001-03-26, Magnus Hagander (<email>mha@sollentuna.net</email>)</entry>
<entry> <entry>
client-side libraries (<application>libpq</> and <application>psql</>) or ODBC/JDBC, no server-side; client-side libraries (<application>libpq</> and <application>psql</>) or ODBC or JDBC, no server-side;
<![%standalone-include[see Administrator's Guide]]> <![%standalone-include[see Administrator's Guide]]>
<![%standalone-ignore[see <xref linkend="install-win32">]]> <![%standalone-ignore[see <xref linkend="install-win32">]]>
for instructions for instructions
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.10 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="maintenance"> <chapter id="maintenance">
...@@ -100,8 +100,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41 ...@@ -100,8 +100,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41
</indexterm> </indexterm>
<para> <para>
In normal <productname>PostgreSQL</productname> operation, an UPDATE or In normal <productname>PostgreSQL</productname> operation, an <command>UPDATE</> or
DELETE of a row does not immediately remove the old <firstterm>tuple</> <command>DELETE</> of a row does not immediately remove the old <firstterm>tuple</>
(version of the row). This approach is necessary to gain the benefits (version of the row). This approach is necessary to gain the benefits
of multiversion concurrency control (see the <citetitle>User's Guide</>): of multiversion concurrency control (see the <citetitle>User's Guide</>):
the tuple must not be deleted while the tuple must not be deleted while
...@@ -268,7 +268,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41 ...@@ -268,7 +268,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.9 2001/11/21 05:53:41
The new approach to XID comparison distinguishes two special XIDs, numbers The new approach to XID comparison distinguishes two special XIDs, numbers
1 and 2 (<literal>BootstrapXID</> and <literal>FrozenXID</>). These two 1 and 2 (<literal>BootstrapXID</> and <literal>FrozenXID</>). These two
XIDs are always considered older than every normal XID. Normal XIDs (those XIDs are always considered older than every normal XID. Normal XIDs (those
greater than 2) are compared using modulo-2^31 arithmetic. This means greater than 2) are compared using modulo-2<superscript>31</> arithmetic. This means
that for every normal XID, there are two billion XIDs that are that for every normal XID, there are two billion XIDs that are
<quote>older</> and two billion that are <quote>newer</>; another way to <quote>older</> and two billion that are <quote>newer</>; another way to
say it is that the normal XID space is circular with no endpoint. say it is that the normal XID space is circular with no endpoint.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.19 2001/11/21 05:53:41 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.20 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="managing-databases"> <chapter id="managing-databases">
...@@ -45,10 +45,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.19 2001/11/21 05:53:41 t ...@@ -45,10 +45,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.19 2001/11/21 05:53:41 t
CREATE DATABASE <replaceable>name</> CREATE DATABASE <replaceable>name</>
</synopsis> </synopsis>
where <replaceable>name</> follows the usual rules for SQL identifiers. where <replaceable>name</> follows the usual rules for SQL identifiers.
(Depending on the The current user automatically becomes
current implementation, certain characters that are special to the
underlying operating system might be prohibited. There will be
run-time checks for that.) The current user automatically becomes
the owner of the new database. It is the privilege of the owner of the owner of the new database. It is the privilege of the owner of
a database to remove it later on (which also removes all the a database to remove it later on (which also removes all the
objects in it, even if they have a different owner). objects in it, even if they have a different owner).
...@@ -140,7 +137,7 @@ createdb <replaceable class="parameter">dbname</replaceable> ...@@ -140,7 +137,7 @@ createdb <replaceable class="parameter">dbname</replaceable>
one might copy any database in an installation by specifying its name one might copy any database in an installation by specifying its name
as the template for <command>CREATE DATABASE</>. It is important to as the template for <command>CREATE DATABASE</>. It is important to
understand, however, that this is not (yet) intended as understand, however, that this is not (yet) intended as
a general-purpose COPY DATABASE facility. In particular, it is a general-purpose <quote>COPY DATABASE</quote> facility. In particular, it is
essential that the source database be idle (no data-altering transactions essential that the source database be idle (no data-altering transactions
in progress) in progress)
for the duration of the copying operation. <command>CREATE DATABASE</> for the duration of the copying operation. <command>CREATE DATABASE</>
...@@ -159,7 +156,7 @@ createdb <replaceable class="parameter">dbname</replaceable> ...@@ -159,7 +156,7 @@ createdb <replaceable class="parameter">dbname</replaceable>
may be set to indicate that a database is intended as a template for may be set to indicate that a database is intended as a template for
<command>CREATE DATABASE</>. If this flag is set, the database may be <command>CREATE DATABASE</>. If this flag is set, the database may be
cloned by cloned by
any user with CREATEDB privileges; if it is not set, only superusers any user with <literal>CREATEDB</> privileges; if it is not set, only superusers
and the owner of the database may clone it. and the owner of the database may clone it.
If <literal>datallowconn</literal> is false, then no new connections If <literal>datallowconn</literal> is false, then no new connections
to that database will be allowed (but existing sessions are not killed to that database will be allowed (but existing sessions are not killed
...@@ -261,7 +258,7 @@ setenv PGDATA2 /home/postgres/data ...@@ -261,7 +258,7 @@ setenv PGDATA2 /home/postgres/data
initlocation PGDATA2 initlocation PGDATA2
</programlisting> </programlisting>
</informalexample> </informalexample>
The you can restart the server. Then you can restart the server.
</para> </para>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.21 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="mvcc"> <chapter id="mvcc">
...@@ -243,7 +243,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas ...@@ -243,7 +243,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas
adequate for many applications, and this level is fast and simple to use. adequate for many applications, and this level is fast and simple to use.
However, for applications that do complex queries and updates, it may However, for applications that do complex queries and updates, it may
be necessary to guarantee a more rigorously consistent view of the be necessary to guarantee a more rigorously consistent view of the
database than Read Committed level provides. database than the Read Committed level provides.
</para> </para>
</sect1> </sect1>
...@@ -289,9 +289,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas ...@@ -289,9 +289,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.20 2001/11/21 05:53:41 thomas
transaction commit, a serializable transaction will be rolled back transaction commit, a serializable transaction will be rolled back
with the message with the message
<programlisting> <screen>
ERROR: Can't serialize access due to concurrent update ERROR: Can't serialize access due to concurrent update
</programlisting> </screen>
because a serializable transaction cannot modify rows changed by because a serializable transaction cannot modify rows changed by
other transactions after the serializable transaction began. other transactions after the serializable transaction began.
...@@ -309,13 +309,13 @@ ERROR: Can't serialize access due to concurrent update ...@@ -309,13 +309,13 @@ ERROR: Can't serialize access due to concurrent update
</para> </para>
<para> <para>
Serializable transaction level provides a rigorous guarantee that each The Serializable transaction level provides a rigorous guarantee that each
transaction sees a wholly consistent view of the database. However, transaction sees a wholly consistent view of the database. However,
the application has to be prepared to retry transactions when concurrent the application has to be prepared to retry transactions when concurrent
updates make it impossible to sustain the illusion of serial execution, updates make it impossible to sustain the illusion of serial execution,
and the cost of redoing complex transactions may be significant. So and the cost of redoing complex transactions may be significant. So
this level is recommended only when update queries contain logic this level is recommended only when update queries contain logic
sufficiently complex that they may give wrong answers in Read Committed sufficiently complex that they may give wrong answers in the Read Committed
level. level.
</para> </para>
</sect1> </sect1>
...@@ -329,7 +329,7 @@ ERROR: Can't serialize access due to concurrent update ...@@ -329,7 +329,7 @@ ERROR: Can't serialize access due to concurrent update
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,
if a row is returned by <command>SELECT</command> it doesn't mean that if a row is returned by <command>SELECT</command> it doesn't mean that
the row still exists at the time it is returned (i.e. sometime after the the row still exists at the time it is returned (i.e., sometime after the
current transaction began); the row might have been modified or deleted current transaction began); the row might have been modified or deleted
by an already-committed transaction that committed after this one started. by an already-committed transaction that committed after this one started.
Even if the row is still valid <quote>now</quote>, it could be changed or deleted Even if the row is still valid <quote>now</quote>, it could be changed or deleted
...@@ -552,7 +552,7 @@ ERROR: Can't serialize access due to concurrent update ...@@ -552,7 +552,7 @@ ERROR: Can't serialize access due to concurrent update
<title>Row-level locks</title> <title>Row-level locks</title>
<para> <para>
These locks are acquired when rows are being updated (or deleted or Row-level locks are acquired when rows are being updated (or deleted or
marked for update). marked for update).
Row-level locks don't affect data querying. They block Row-level locks don't affect data querying. They block
writers to <emphasis>the same row</emphasis> only. writers to <emphasis>the same row</emphasis> only.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.14 2001/11/21 05:53:41 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.15 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="performance-tips"> <chapter id="performance-tips">
...@@ -630,10 +630,10 @@ SELECT * FROM d LEFT JOIN ...@@ -630,10 +630,10 @@ SELECT * FROM d LEFT JOIN
</para> </para>
<sect2 id="disable-autocommit"> <sect2 id="disable-autocommit">
<title>Disable Auto-commit</title> <title>Disable Autocommit</title>
<para> <para>
Turn off auto-commit and just do one commit at Turn off autocommit and just do one commit at
the end. (In plain SQL, this means issuing <command>BEGIN</command> the end. (In plain SQL, this means issuing <command>BEGIN</command>
at the start and <command>COMMIT</command> at the end. Some client at the start and <command>COMMIT</command> at the end. Some client
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
...@@ -651,9 +651,9 @@ SELECT * FROM d LEFT JOIN ...@@ -651,9 +651,9 @@ SELECT * FROM d LEFT JOIN
Use <command>COPY FROM STDIN</command> to load all the records in one Use <command>COPY FROM STDIN</command> to load all the records in one
command, instead of using command, instead of using
a series of <command>INSERT</command> commands. This reduces parsing, a series of <command>INSERT</command> commands. This reduces parsing,
planning, etc planning, etc.
overhead a great deal. If you do this then it's not necessary to fool overhead a great deal. If you do this then it is not necessary to turn
around with auto-commit, since it's only one command anyway. off autocommit, since it is only one command anyway.
</para> </para>
</sect2> </sect2>
...@@ -673,8 +673,8 @@ SELECT * FROM d LEFT JOIN ...@@ -673,8 +673,8 @@ SELECT * FROM d LEFT JOIN
INDEX</command>, load the table, then recreate the index. Of INDEX</command>, load the table, then recreate the index. Of
course, the database performance for other users may be adversely course, the database performance for other users may be adversely
affected during the time that the index is missing. One should also affected during the time that the index is missing. One should also
think twice before dropping UNIQUE indexes, since the error checking think twice before dropping unique indexes, since the error checking
afforded by the UNIQUE constraint will be lost while the index is missing. afforded by the unique constraint will be lost while the index is missing.
</para> </para>
</sect2> </sect2>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.13 2001/11/21 05:53:41 thomas Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.14 2001/11/28 20:49:10 petere Exp $ -->
<chapter id="queries"> <chapter id="queries">
<title>Queries</title> <title>Queries</title>
<sect1 id="queries-overview">
<title>Overview</title>
<para> <para>
A <firstterm>query</firstterm> is the process of retrieving or the command A <firstterm>query</firstterm> is the process of retrieving or the command
to retrieve data from a database. In SQL the <command>SELECT</command> to retrieve data from a database. In SQL the <command>SELECT</command>
...@@ -51,6 +54,7 @@ SELECT 3 * 4; ...@@ -51,6 +54,7 @@ SELECT 3 * 4;
SELECT random(); SELECT random();
</programlisting> </programlisting>
</para> </para>
</sect1>
<sect1 id="queries-table-expressions"> <sect1 id="queries-table-expressions">
<title>Table Expressions</title> <title>Table Expressions</title>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.22 2001/11/23 21:08:51 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.23 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="tutorial-sql"> <chapter id="tutorial-sql">
...@@ -247,8 +247,8 @@ INSERT INTO weather (date, city, temp_hi, temp_lo) ...@@ -247,8 +247,8 @@ INSERT INTO weather (date, city, temp_hi, temp_lo)
</indexterm> </indexterm>
You could also have used <command>COPY</command> to load large You could also have used <command>COPY</command> to load large
amounts of data from flat text files. This is usually faster amounts of data from flat-text files. This is usually faster
because the <command>COPY</command> is optimized for this because the <command>COPY</command> command is optimized for this
application while allowing less flexibility than application while allowing less flexibility than
<command>INSERT</command>. An example would be: <command>INSERT</command>. An example would be:
...@@ -256,7 +256,7 @@ INSERT INTO weather (date, city, temp_hi, temp_lo) ...@@ -256,7 +256,7 @@ INSERT INTO weather (date, city, temp_hi, temp_lo)
COPY weather FROM '/home/user/weather.txt'; COPY weather FROM '/home/user/weather.txt';
</programlisting> </programlisting>
where the path name for the source file must be available to the where the file name for the source file must be available to the
backend server machine, not the client, since the backend server backend server machine, not the client, since the backend server
reads the file directly. You can read more about the reads the file directly. You can read more about the
<command>COPY</command> command in the <citetitle>Reference <command>COPY</command> command in the <citetitle>Reference
...@@ -272,14 +272,14 @@ COPY weather FROM '/home/user/weather.txt'; ...@@ -272,14 +272,14 @@ COPY weather FROM '/home/user/weather.txt';
<indexterm><primary>query</primary></indexterm> <indexterm><primary>query</primary></indexterm>
<indexterm><primary>SELECT</primary></indexterm> <indexterm><primary>SELECT</primary></indexterm>
To retrieve data from a table it is To retrieve data from a table, the table is
<firstterm>queried</firstterm>. An <acronym>SQL</acronym> <firstterm>queried</firstterm>. An <acronym>SQL</acronym>
<command>SELECT</command> statement is used to do this. The <command>SELECT</command> statement is used to do this. The
statement is divided into a select list (the part that lists the statement is divided into a select list (the part that lists the
columns to be returned), a table list (the part that lists the columns to be returned), a table list (the part that lists the
tables from which to retrieve the data), and an optional tables from which to retrieve the data), and an optional
qualification (the part that specifies any restrictions). For qualification (the part that specifies any restrictions). For
example, to retrieve all the rows of example, to retrieve all the rows of table
<classname>weather</classname>, type: <classname>weather</classname>, type:
<programlisting> <programlisting>
SELECT * FROM weather; SELECT * FROM weather;
...@@ -424,7 +424,7 @@ SELECT * ...@@ -424,7 +424,7 @@ SELECT *
There are two columns containing the city name. This is There are two columns containing the city name. This is
correct because the lists of columns of the correct because the lists of columns of the
<classname>weather</classname> and the <classname>weather</classname> and the
<classname>cities</classname> tables are concatenated. In <classname>cities</classname> table are concatenated. In
practice this is undesirable, though, so you will probably want practice this is undesirable, though, so you will probably want
to list the output columns explicitly rather than using to list the output columns explicitly rather than using
<literal>*</literal>: <literal>*</literal>:
...@@ -678,7 +678,7 @@ SELECT city, max(temp_lo) ...@@ -678,7 +678,7 @@ SELECT city, max(temp_lo)
</screen> </screen>
which gives us the same results for only the cities that have all which gives us the same results for only the cities that have all
<literal>temp_lo</> values below forty. Finally, if we only care about <literal>temp_lo</> values below 40. Finally, if we only care about
cities whose cities whose
names begin with <quote><literal>S</literal></quote>, we might do names begin with <quote><literal>S</literal></quote>, we might do
...@@ -705,7 +705,7 @@ SELECT city, max(temp_lo) ...@@ -705,7 +705,7 @@ SELECT city, max(temp_lo)
will be inputs to the aggregates. On the other hand, will be inputs to the aggregates. On the other hand,
<literal>HAVING</literal> clauses always contain aggregate functions. <literal>HAVING</literal> clauses always contain aggregate functions.
(Strictly speaking, you are allowed to write a <literal>HAVING</literal> (Strictly speaking, you are allowed to write a <literal>HAVING</literal>
clause that doesn't use aggregates, but it's wasteful; the same condition clause that doesn't use aggregates, but it's wasteful: The same condition
could be used more efficiently at the <literal>WHERE</literal> stage.) could be used more efficiently at the <literal>WHERE</literal> stage.)
</para> </para>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<para> <para>
A filled data disk may result in subsequent corruption of database A filled data disk may result in subsequent corruption of database
indices, but not of the fundamental data tables. If the WAL files indexes, but not of the fundamental data tables. If the WAL files
are on the same disk (as is the case for a default configuration) are on the same disk (as is the case for a default configuration)
then a filled disk during database initialization may result in then a filled disk during database initialization may result in
corrupted or incomplete WAL files. This failure condition is corrupted or incomplete WAL files. This failure condition is
...@@ -87,21 +87,6 @@ ...@@ -87,21 +87,6 @@
</chapter> </chapter>
<chapter Id="recovery">
<title>Database Recovery</title>
<para>
Database recovery is necessary in the event of hardware or software
failure. There are several categories of failures; some of these
require relatively minor adjustments to the database, while others
may depend on the existance of previously prepared database dumps
and other recovery data sets. It should be emphasized that if your
data is important and/or difficult to regenerate, then you should
have considered and prepared for various failure scenarios.
</para>
</chapter>
<!-- Keep this comment at the end of the file <!-- Keep this comment at the end of the file
Local variables: Local variables:
mode:sgml mode:sgml
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.21 2001/11/18 20:35:02 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.22 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -38,9 +38,8 @@ Postgres documentation ...@@ -38,9 +38,8 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server is running. If host begins with a slash, it is used
is running. If host begins with a slash, it is used
as the directory for the Unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
...@@ -51,8 +50,7 @@ Postgres documentation ...@@ -51,8 +50,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or the local Unix domain socket file Specifies the Internet TCP/IP port or the local Unix domain socket file
extension on which the <command>postmaster</command> extension on which the server is listening for connections.
is listening for connections.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -61,7 +59,7 @@ Postgres documentation ...@@ -61,7 +59,7 @@ Postgres documentation
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term>-U, --username <replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Username to connect as. User name to connect as
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -80,7 +78,7 @@ Postgres documentation ...@@ -80,7 +78,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Echo the queries that <application>createdb</application> generates Echo the queries that <application>createdb</application> generates
and sends to the backend. and sends to the server.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -127,7 +125,7 @@ Postgres documentation ...@@ -127,7 +125,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the name of the database to be created. The name must be Specifies the name of the database to be created. The name must be
unique among all <productname>Postgres</productname> databases in this installation. unique among all <productname>PostgreSQL</productname> databases in this installation.
The default is to create a database with the same name as the The default is to create a database with the same name as the
current system user. current system user.
</para> </para>
...@@ -203,7 +201,7 @@ Postgres documentation ...@@ -203,7 +201,7 @@ Postgres documentation
Description Description
</title> </title>
<para> <para>
<application>createdb</application> creates a new <productname>Postgres</productname> <application>createdb</application> creates a new <productname>PostgreSQL</productname>
database. The user who executes this command becomes the database owner. database. The user who executes this command becomes the database owner.
</para> </para>
...@@ -211,7 +209,7 @@ Postgres documentation ...@@ -211,7 +209,7 @@ Postgres documentation
<application>createdb</application> is a shell script wrapper around the <application>createdb</application> is a shell script wrapper around the
<acronym>SQL</acronym> command <acronym>SQL</acronym> command
<xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title"> via <xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title"> via
the <productname>Postgres</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. Thus, there is nothing <xref linkend="APP-PSQL">. Thus, there is nothing
special about creating databases via this or other methods. This means special about creating databases via this or other methods. This means
that the <application>psql</application> program must be found by the script and that that the <application>psql</application> program must be found by the script and that
...@@ -240,7 +238,7 @@ Postgres documentation ...@@ -240,7 +238,7 @@ Postgres documentation
<informalexample> <informalexample>
<para> <para>
To create the database <literal>demo</literal> using the To create the database <literal>demo</literal> using the
postmaster on host eden, port 5000, using the server on host eden, port 5000, using the
<literal>LATIN1</literal> encoding scheme with a look at the <literal>LATIN1</literal> encoding scheme with a look at the
underlying query: underlying query:
<screen> <screen>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.19 2001/10/26 21:17:03 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.20 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -86,8 +86,8 @@ Postgres documentation ...@@ -86,8 +86,8 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the directory in which the language interpreter is Specifies the directory in which the language interpreter is
to be found. Use of this option is deprecated; the directory to be found. The directory is normally found automatically; this
is normally found automatically. option is primarily for debugging purposes.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -104,10 +104,10 @@ Postgres documentation ...@@ -104,10 +104,10 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -117,7 +117,7 @@ Postgres documentation ...@@ -117,7 +117,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -127,7 +127,7 @@ Postgres documentation ...@@ -127,7 +127,7 @@ Postgres documentation
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term>-U, --username <replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Username to connect as. User name to connect as
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -166,10 +166,10 @@ Postgres documentation ...@@ -166,10 +166,10 @@ Postgres documentation
<para> <para>
<application>createlang</application> is a utility for adding a new <application>createlang</application> is a utility for adding a new
programming language to a <productname>Postgres</productname> database. programming language to a <productname>PostgreSQL</productname> database.
<application>createlang</application> currently accepts several <application>createlang</application> can handle all the languages
languages, <literal>plpgsql, pltcl, pltclu,</literal> and <literal> supplied in the default <productname>PostgreSQL</> distribution, but
plperl</literal>. not languages provided by other parties.
</para> </para>
<para> <para>
Although backend programming languages can be added directly using Although backend programming languages can be added directly using
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.20 2001/09/03 12:57:49 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.21 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -37,10 +37,10 @@ Postgres documentation ...@@ -37,10 +37,10 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -50,7 +50,7 @@ Postgres documentation ...@@ -50,7 +50,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -61,7 +61,7 @@ Postgres documentation ...@@ -61,7 +61,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Echo the queries that <application>createuser</application> generates Echo the queries that <application>createuser</application> generates
and sends to the backend. and sends to the server.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -156,8 +156,8 @@ Postgres documentation ...@@ -156,8 +156,8 @@ Postgres documentation
<term><replaceable class="parameter">username</replaceable></term> <term><replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the name of the <productname>Postgres</productname> user to be created. Specifies the name of the <productname>PostgreSQL</productname> user to be created.
This name must be unique among all <productname>Postgres</productname> users. This name must be unique among all <productname>PostgreSQL</productname> users.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -214,17 +214,17 @@ Postgres documentation ...@@ -214,17 +214,17 @@ Postgres documentation
</title> </title>
<para> <para>
<application>createuser</application> creates a <application>createuser</application> creates a
new <productname>Postgres</productname> user. new <productname>PostgreSQL</productname> user.
Only users with <literal>usesuper</literal> set in Only users with <literal>usesuper</literal> set in
the <literal>pg_shadow</literal> table can create the <literal>pg_shadow</literal> table can create
new <productname>Postgres</productname> users. new <productname>PostgreSQL</productname> users.
</para> </para>
<para> <para>
<application>createuser</application> is a shell script wrapper around the <application>createuser</application> is a shell script wrapper around the
<acronym>SQL</acronym> command <acronym>SQL</acronym> command
<xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title"> via <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title"> via
the <productname>Postgres</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. Thus, there is nothing <xref linkend="APP-PSQL">. Thus, there is nothing
special about creating users via this or other methods. This means special about creating users via this or other methods. This means
that the <application>psql</application> must be found by the script and that that the <application>psql</application> must be found by the script and that
...@@ -255,7 +255,7 @@ Postgres documentation ...@@ -255,7 +255,7 @@ Postgres documentation
<informalexample> <informalexample>
<para> <para>
To create the same user <literal>joe</literal> using the To create the same user <literal>joe</literal> using the
postmaster on host eden, port 5000, avoiding the prompts and server on host eden, port 5000, avoiding the prompts and
taking a look at the underlying query: taking a look at the underlying query:
<screen> <screen>
<prompt>$ </prompt><userinput>createuser -p 5000 -h eden -D -A -e joe</userinput> <prompt>$ </prompt><userinput>createuser -p 5000 -h eden -D -A -e joe</userinput>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.11 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.12 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -37,8 +37,8 @@ Postgres documentation ...@@ -37,8 +37,8 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the unix domain socket.
</para> </para>
...@@ -50,7 +50,7 @@ Postgres documentation ...@@ -50,7 +50,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -60,7 +60,7 @@ Postgres documentation ...@@ -60,7 +60,7 @@ Postgres documentation
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term>-U, --username <replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Username to connect as. User name to connect as
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -79,7 +79,7 @@ Postgres documentation ...@@ -79,7 +79,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Echo the queries that <application>dropdb</application> generates Echo the queries that <application>dropdb</application> generates
and sends to the backend. and sends to the server.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -107,7 +107,7 @@ Postgres documentation ...@@ -107,7 +107,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the name of the database to be removed. The database Specifies the name of the database to be removed. The database
must be one of the existing <productname>Postgres</productname> databases must be one of the existing <productname>PostgreSQL</productname> databases
in this installation. in this installation.
</para> </para>
</listitem> </listitem>
...@@ -157,7 +157,7 @@ Postgres documentation ...@@ -157,7 +157,7 @@ Postgres documentation
</title> </title>
<para> <para>
<application>dropdb</application> destroys an existing <application>dropdb</application> destroys an existing
<productname>Postgres</productname> database. <productname>PostgreSQL</productname> database.
The user who executes this command must be a database The user who executes this command must be a database
superuser or the owner of the database. superuser or the owner of the database.
</para> </para>
...@@ -166,7 +166,7 @@ Postgres documentation ...@@ -166,7 +166,7 @@ Postgres documentation
<application>dropdb</application> is a shell script wrapper around the <application>dropdb</application> is a shell script wrapper around the
<acronym>SQL</acronym> command <acronym>SQL</acronym> command
<xref linkend="SQL-DROPDATABASE" endterm="SQL-DROPDATABASE-title"> via <xref linkend="SQL-DROPDATABASE" endterm="SQL-DROPDATABASE-title"> via
the <productname>Postgres</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. Thus, there is nothing <xref linkend="APP-PSQL">. Thus, there is nothing
special about dropping databases via this or other methods. This means special about dropping databases via this or other methods. This means
that the <application>psql</application> must be found by the script and that that the <application>psql</application> must be found by the script and that
...@@ -193,7 +193,7 @@ Postgres documentation ...@@ -193,7 +193,7 @@ Postgres documentation
<informalexample> <informalexample>
<para> <para>
To destroy the database <literal>demo</literal> using the To destroy the database <literal>demo</literal> using the
postmaster on host eden, port 5000, with verification and a peek server on host eden, port 5000, with verification and a peek
at the underlying query: at the underlying query:
<screen> <screen>
<prompt>$ </prompt><userinput>dropdb -p 5000 -h eden -i -e demo</userinput> <prompt>$ </prompt><userinput>dropdb -p 5000 -h eden -i -e demo</userinput>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.13 2001/09/14 09:49:00 ishii Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.14 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -92,10 +92,10 @@ Postgres documentation ...@@ -92,10 +92,10 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -105,7 +105,7 @@ Postgres documentation ...@@ -105,7 +105,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -115,7 +115,7 @@ Postgres documentation ...@@ -115,7 +115,7 @@ Postgres documentation
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term>-U, --username <replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Username to connect as. User name to connect as
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -155,9 +155,9 @@ Postgres documentation ...@@ -155,9 +155,9 @@ Postgres documentation
<para> <para>
<application>droplang</application> is a utility for removing an <application>droplang</application> is a utility for removing an
existing programming language from a existing programming language from a
<productname>Postgres</productname> database. <productname>PostgreSQL</productname> database.
<application>droplang</application> currently accepts two <application>droplang</application> can drop any procedural language,
languages, <literal>plsql</literal> and <literal>pltcl</literal>. even those not supplied by the <productname>PostgreSQL</> distribution.
</para> </para>
<para> <para>
Although backend programming languages can be removed directly using Although backend programming languages can be removed directly using
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.13 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.14 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -37,10 +37,10 @@ Postgres documentation ...@@ -37,10 +37,10 @@ Postgres documentation
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term>-h, --host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -50,7 +50,7 @@ Postgres documentation ...@@ -50,7 +50,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -61,7 +61,7 @@ Postgres documentation ...@@ -61,7 +61,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Echo the queries that <application>createdb</application> generates Echo the queries that <application>createdb</application> generates
and sends to the backend. and sends to the server.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -88,8 +88,8 @@ Postgres documentation ...@@ -88,8 +88,8 @@ Postgres documentation
<term><replaceable class="parameter">username</replaceable></term> <term><replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the name of the <productname>Postgres</productname> user to be removed. Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
This name must exist in the <productname>Postgres</productname> installation. This name must exist in the <productname>PostgreSQL</productname> installation.
You will be prompted for a name if none is specified on the command line. You will be prompted for a name if none is specified on the command line.
</para> </para>
</listitem> </listitem>
...@@ -145,18 +145,18 @@ Postgres documentation ...@@ -145,18 +145,18 @@ Postgres documentation
</title> </title>
<para> <para>
<application>dropuser</application> removes an existing <application>dropuser</application> removes an existing
<productname>Postgres</productname> user <productname>PostgreSQL</productname> user
<emphasis>and</emphasis> the databases which that user owned. <emphasis>and</emphasis> the databases which that user owned.
Only users with <literal>usesuper</literal> set in Only users with <literal>usesuper</literal> set in
the <literal>pg_shadow</literal> table can destroy the <literal>pg_shadow</literal> table can destroy
<productname>Postgres</productname> users. <productname>PostgreSQL</productname> users.
</para> </para>
<para> <para>
<application>dropuser</application> is a shell script wrapper around the <application>dropuser</application> is a shell script wrapper around the
<acronym>SQL</acronym> command <acronym>SQL</acronym> command
<xref linkend="SQL-DROPUSER" endterm="SQL-DROPUSER-title"> via <xref linkend="SQL-DROPUSER" endterm="SQL-DROPUSER-title"> via
the <productname>Postgres</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. Thus, there is nothing <xref linkend="APP-PSQL">. Thus, there is nothing
special about removing users via this or other methods. This means special about removing users via this or other methods. This means
that the <application>psql</application> must be found by the script and that that the <application>psql</application> must be found by the script and that
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.12 2001/11/18 20:35:02 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.13 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -67,11 +67,11 @@ Postgres documentation ...@@ -67,11 +67,11 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specify an additional include path. Specify an additional include path.
Defaults are <filename>.</filename>, Defaults are <filename>.</filename> (current directory),
<filename>/usr/local/include</filename>, the <filename>/usr/local/include</filename>, the
<productname>Postgres</productname> include path which is <productname>PostgreSQL</productname> include path which is
defined at compile time (default: defined at compile time (default:
<filename>/usr/local/pgsql/lib</filename>), and <filename>/usr/local/pgsql/include</filename>), and
<filename>/usr/include</filename>. <filename>/usr/include</filename>.
</para> </para>
</listitem> </listitem>
...@@ -118,7 +118,7 @@ Postgres documentation ...@@ -118,7 +118,7 @@ Postgres documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><replaceable>return value</replaceable></term> <term>Return value</term>
<listitem> <listitem>
<para> <para>
<application>ecpg</application> returns 0 to the shell on successful completion, non-zero <application>ecpg</application> returns 0 to the shell on successful completion, non-zero
...@@ -136,7 +136,7 @@ Postgres documentation ...@@ -136,7 +136,7 @@ Postgres documentation
<para> <para>
<application>ecpg</application> <application>ecpg</application>
is an embedded SQL preprocessor for the C language and the is an embedded SQL preprocessor for the C language and the
<productname>Postgres</productname>. It <productname>PostgreSQL</productname>. It
enables development of C programs with embedded SQL code. enables development of C programs with embedded SQL code.
</para> </para>
...@@ -160,9 +160,9 @@ Postgres documentation ...@@ -160,9 +160,9 @@ Postgres documentation
<para> <para>
An embedded SQL source file must be preprocessed before An embedded SQL source file must be preprocessed before
compilation: compilation:
<programlisting> <synopsis>
ecpg [ -d ] [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceable>.pgc ecpg [ -d ] [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceable>.pgc
</programlisting> </synopsis>
where the optional <option>-d</option> flag turns on debugging. where the optional <option>-d</option> flag turns on debugging.
The <literal>.pgc</literal> extension is an The <literal>.pgc</literal> extension is an
...@@ -178,13 +178,13 @@ ecpg [ -d ] [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceabl ...@@ -178,13 +178,13 @@ ecpg [ -d ] [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceabl
<title>Compiling and Linking</title> <title>Compiling and Linking</title>
<para> <para>
Assuming the <productname>Postgres</productname> binaries are in Assuming the <productname>PostgreSQL</productname> binaries are in
<filename>/usr/local/pgsql</filename>, you will need to compile <filename>/usr/local/pgsql</filename>, you will need to compile
and link your preprocessed source file: and link your preprocessed source file:
<programlisting> <synopsis>
gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceable>.c -L /usr/local/pgsql/lib -lecpg -lpq gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <replaceable>file</replaceable>.c -L /usr/local/pgsql/lib -lecpg -lpq
</programlisting> </synopsis>
</para> </para>
</refsect2> </refsect2>
</refsect1> </refsect1>
...@@ -198,10 +198,10 @@ gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <repla ...@@ -198,10 +198,10 @@ gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <repla
<para> <para>
The preprocessor will prepend two directives to the source: The preprocessor will prepend two directives to the source:
<programlisting> <programlisting>
#include &lt;ecpgtype.h&gt; #include &lt;ecpgtype.h&gt;
#include &lt;ecpglib.h&gt; #include &lt;ecpglib.h&gt;
</programlisting> </programlisting>
</para> </para>
</refsect2> </refsect2>
...@@ -211,26 +211,26 @@ gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <repla ...@@ -211,26 +211,26 @@ gcc -g -I /usr/local/pgsql/include [ -o <replaceable>file</replaceable> ] <repla
<para> <para>
Variables declared within <application>ecpg</application> source code must be prepended with: Variables declared within <application>ecpg</application> source code must be prepended with:
<programlisting> <programlisting>
EXEC SQL BEGIN DECLARE SECTION; EXEC SQL BEGIN DECLARE SECTION;
</programlisting> </programlisting>
</para> </para>
<para> <para>
Similarly, variable declaration sections must terminate with: Similarly, variable declaration sections must terminate with:
<programlisting> <programlisting>
EXEC SQL END DECLARE SECTION; EXEC SQL END DECLARE SECTION;
</programlisting> </programlisting>
<note> <note>
<para> <para>
Prior to version 2.1.0, each variable had to be declared Prior to version 2.1.0, each variable had to be declared
on a separate line. As of version 2.1.0 multiple variables may on a separate line. As of version 2.1.0 multiple variables may
be declared on a single line: be declared on a single line:
<programlisting> <programlisting>
char foo[16], bar[16]; char foo[16], bar[16];
</programlisting> </programlisting>
</para> </para>
</note> </note>
</para> </para>
...@@ -242,51 +242,53 @@ char foo[16], bar[16]; ...@@ -242,51 +242,53 @@ char foo[16], bar[16];
<para> <para>
The SQL communication area is defined with: The SQL communication area is defined with:
<programlisting> <programlisting>
EXEC SQL INCLUDE sqlca; EXEC SQL INCLUDE sqlca;
</programlisting> </programlisting>
</para>
<note> <note>
<para> <para>
The <literal>sqlca</literal> is in lowercase. The <literal>sqlca</literal> is in lowercase.
While SQL convention may be While SQL convention may be
followed, i.e., using uppercase to separate embedded SQL followed, i.e., using uppercase to separate embedded SQL
from C statements, sqlca (which includes the sqlca.h from C statements, sqlca (which includes the <filename>sqlca.h</>
header file) MUST be lowercase. This is because the EXEC SQL header file) <emphasis>must</> be lowercase. This is because the
prefix indicates that this INCLUDE will be parsed by <application>ecpg</application>. EXEC SQL prefix indicates that this inclusion will be parsed by
<application>ecpg</application> observes case sensitivity (SQLCA.h will not be found). <application>ecpg</application>.
<application>ecpg</application> observes case sensitivity
(<filename>SQLCA.h</> will not be found).
<command>EXEC SQL INCLUDE</command> <command>EXEC SQL INCLUDE</command>
can be used to include other header files can be used to include other header files
as long as case sensitivity is observed. as long as case sensitivity is observed.
</para> </para>
</note> </note>
</para>
<para> <para>
The sqlprint command is used with the EXEC SQL WHENEVER The sqlprint command is used with the EXEC SQL WHENEVER
statement to turn on error handling throughout the statement to turn on error handling throughout the
program: program:
<programlisting> <programlisting>
EXEC SQL WHENEVER sqlerror sqlprint; EXEC SQL WHENEVER sqlerror sqlprint;
</programlisting> </programlisting>
and and
<programlisting> <programlisting>
EXEC SQL WHENEVER not found sqlprint; EXEC SQL WHENEVER not found sqlprint;
</programlisting> </programlisting>
</para>
<note> <note>
<para> <para>
This is <emphasis>not</emphasis> an exhaustive example of usage for This is <emphasis>not</emphasis> an exhaustive example of usage for
the <command>EXEC SQL WHENEVER</command> statement. the <command>EXEC SQL WHENEVER</command> statement.
Further examples of usage may Further examples of usage may
be found in SQL manuals (e.g., `The LAN TIMES Guide to SQL' by be found in SQL manuals (e.g., <citetitle>The LAN TIMES Guide to SQL</> by
Groff and Weinberg). Groff and Weinberg).
</para> </para>
</note> </note>
</para>
</refsect2> </refsect2>
<refsect2 id="R2-APP-ECPG-connecting"> <refsect2 id="R2-APP-ECPG-connecting">
...@@ -295,9 +297,9 @@ EXEC SQL WHENEVER not found sqlprint; ...@@ -295,9 +297,9 @@ EXEC SQL WHENEVER not found sqlprint;
<para> <para>
One connects to a database using the following: One connects to a database using the following:
<programlisting> <programlisting>
EXEC SQL CONNECT TO <replaceable>dbname</replaceable>; EXEC SQL CONNECT TO <replaceable>dbname</replaceable>;
</programlisting> </programlisting>
where the database name is not quoted. Prior to version 2.1.0, the where the database name is not quoted. Prior to version 2.1.0, the
database name was required to be inside single quotes. database name was required to be inside single quotes.
...@@ -307,15 +309,15 @@ EXEC SQL CONNECT TO <replaceable>dbname</replaceable>; ...@@ -307,15 +309,15 @@ EXEC SQL CONNECT TO <replaceable>dbname</replaceable>;
Specifying a server and port name in the connect statement is also Specifying a server and port name in the connect statement is also
possible. The syntax is: possible. The syntax is:
<programlisting> <synopsis>
<replaceable>dbname</replaceable>[@<replaceable>server</replaceable>][:<replaceable>port</replaceable>] <replaceable>dbname</replaceable>[@<replaceable>server</replaceable>][:<replaceable>port</replaceable>]
</programlisting> </synopsis>
or or
<programlisting> <synopsis>
&lt;tcp|unix&gt;:postgresql://<replaceable>server</replaceable>[:<replaceable>port</replaceable>][/<replaceable>dbname</replaceable>][?<replaceable>options</replaceable>] &lt;tcp|unix&gt;:postgresql://<replaceable>server</replaceable>[:<replaceable>port</replaceable>][/<replaceable>dbname</replaceable>][?<replaceable>options</replaceable>]
</programlisting> </synopsis>
</para> </para>
</refsect2> </refsect2>
...@@ -331,20 +333,20 @@ EXEC SQL CONNECT TO <replaceable>dbname</replaceable>; ...@@ -331,20 +333,20 @@ EXEC SQL CONNECT TO <replaceable>dbname</replaceable>;
<para> <para>
Create Table: Create Table:
<programlisting> <programlisting>
EXEC SQL CREATE TABLE foo (number int4, ascii char(16)); EXEC SQL CREATE TABLE foo (number int4, ascii char(16));
EXEC SQL CREATE UNIQUE index num1 on foo(number); EXEC SQL CREATE UNIQUE index num1 on foo(number);
EXEC SQL COMMIT; EXEC SQL COMMIT;
</programlisting> </programlisting>
</para> </para>
<para> <para>
Insert: Insert:
<programlisting> <programlisting>
EXEC SQL INSERT INTO foo (number, ascii) VALUES (9999, 'doodad'); EXEC SQL INSERT INTO foo (number, ascii) VALUES (9999, 'doodad');
EXEC SQL COMMIT; EXEC SQL COMMIT;
</programlisting> </programlisting>
</para> </para>
<para> <para>
...@@ -353,21 +355,21 @@ EXEC SQL COMMIT; ...@@ -353,21 +355,21 @@ EXEC SQL COMMIT;
<programlisting> <programlisting>
EXEC SQL DELETE FROM foo WHERE number = 9999; EXEC SQL DELETE FROM foo WHERE number = 9999;
EXEC SQL COMMIT; EXEC SQL COMMIT;
</programlisting> </programlisting>
</para> </para>
<para> <para>
Singleton Select: Singleton Select:
<programlisting> <programlisting>
EXEC SQL SELECT foo INTO :FooBar FROM table1 WHERE ascii = 'doodad'; EXEC SQL SELECT foo INTO :FooBar FROM table1 WHERE ascii = 'doodad';
</programlisting> </programlisting>
</para> </para>
<para> <para>
Select using Cursors: Select using Cursors:
<programlisting> <programlisting>
EXEC SQL DECLARE foo_bar CURSOR FOR EXEC SQL DECLARE foo_bar CURSOR FOR
SELECT number, ascii FROM foo SELECT number, ascii FROM foo
ORDER BY ascii; ORDER BY ascii;
...@@ -375,17 +377,17 @@ EXEC SQL FETCH foo_bar INTO :FooBar, DooDad; ...@@ -375,17 +377,17 @@ EXEC SQL FETCH foo_bar INTO :FooBar, DooDad;
... ...
EXEC SQL CLOSE foo_bar; EXEC SQL CLOSE foo_bar;
EXEC SQL COMMIT; EXEC SQL COMMIT;
</programlisting> </programlisting>
</para> </para>
<para> <para>
Updates: Updates:
<programlisting> <programlisting>
EXEC SQL UPDATE foo EXEC SQL UPDATE foo
SET ascii = 'foobar' SET ascii = 'foobar'
WHERE number = 9999; WHERE number = 9999;
EXEC SQL COMMIT; EXEC SQL COMMIT;
</programlisting> </programlisting>
</para> </para>
</refsect2> </refsect2>
</refsect1> </refsect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.17 2001/09/08 15:24:00 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.18 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -141,10 +141,10 @@ Postgres documentation ...@@ -141,10 +141,10 @@ Postgres documentation
<term>-E <replaceable class="parameter">encoding</replaceable></term> <term>-E <replaceable class="parameter">encoding</replaceable></term>
<listitem> <listitem>
<para> <para>
Selects the multibyte encoding of the template database. This will also Selects the encoding of the template database. This will also
be the default encoding of any database you create later, unless you be the default encoding of any database you create later, unless you
override it there. To use the multibyte encoding feature, you must override it there. To use the encoding feature, you must
specify so at build time, at which time you also select the default have enabled it at build time, at which time you also select the default
for this option. for this option.
</para> </para>
</listitem> </listitem>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.10 2001/11/19 03:58:25 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.11 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -79,7 +79,7 @@ Postgres documentation ...@@ -79,7 +79,7 @@ Postgres documentation
started manually, <application>pg_ctl</application> encapulates started manually, <application>pg_ctl</application> encapulates
tasks such as redirecting log output, properly detaching from the tasks such as redirecting log output, properly detaching from the
terminal and process group, and it provides convenient options for terminal and process group, and it provides convenient options for
controlled shut down. controlled shutdown.
</para> </para>
<para> <para>
...@@ -117,10 +117,10 @@ Postgres documentation ...@@ -117,10 +117,10 @@ Postgres documentation
</para> </para>
<para> <para>
<option>reload</option> mode simply sends the postmaster a SIGHUP signal, <option>reload</option> mode simply sends the postmaster a <systemitem>SIGHUP</> signal,
causing it to reread its configuration files causing it to reread its configuration files
(<filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename>, (<filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename>,
etc). This allows changing of configuration-file options that do not etc.). This allows changing of configuration-file options that do not
require a complete restart to take effect. require a complete restart to take effect.
</para> </para>
...@@ -199,30 +199,30 @@ Postgres documentation ...@@ -199,30 +199,30 @@ Postgres documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-w</term> <term>-s</term>
<listitem> <listitem>
<para> <para>
Wait for the start or shutdown to complete. Times out after Only print errors, no informational messages.
60 seconds. This is the default for shutdowns.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W</term> <term>-w</term>
<listitem> <listitem>
<para> <para>
Do not wait for start or shutdown to complete. This is the Wait for the start or shutdown to complete. Times out after
default for starts and restarts. 60 seconds. This is the default for shutdowns.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-s</term> <term>-W</term>
<listitem> <listitem>
<para> <para>
Only print errors, no informational messages. Do not wait for start or shutdown to complete. This is the
default for starts and restarts.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -251,7 +251,7 @@ Postgres documentation ...@@ -251,7 +251,7 @@ Postgres documentation
<title>Starting the postmaster</title> <title>Starting the postmaster</title>
<para> <para>
To start up <application>postmaster</application>: To start up a <application>postmaster</application>:
<screen> <screen>
<prompt>$</prompt> <userinput>pg_ctl start</userinput> <prompt>$</prompt> <userinput>pg_ctl start</userinput>
</screen> </screen>
...@@ -259,7 +259,7 @@ Postgres documentation ...@@ -259,7 +259,7 @@ Postgres documentation
<para> <para>
An example of starting the <application>postmaster</application>, An example of starting the <application>postmaster</application>,
blocking until postmaster comes up is: blocking until the postmaster comes up is:
<screen> <screen>
<prompt>$</prompt> <userinput>pg_ctl -w start</userinput> <prompt>$</prompt> <userinput>pg_ctl -w start</userinput>
</screen> </screen>
...@@ -280,7 +280,7 @@ Postgres documentation ...@@ -280,7 +280,7 @@ Postgres documentation
<screen> <screen>
<prompt>$</prompt> <userinput>pg_ctl stop</userinput> <prompt>$</prompt> <userinput>pg_ctl stop</userinput>
</screen> </screen>
stops postmaster. Using the <option>-m</option> switch allows one stops the postmaster. Using the <option>-m</option> switch allows one
to control <emphasis>how</emphasis> the backend shuts down. to control <emphasis>how</emphasis> the backend shuts down.
</para> </para>
</refsect2> </refsect2>
...@@ -290,10 +290,10 @@ Postgres documentation ...@@ -290,10 +290,10 @@ Postgres documentation
<para> <para>
This is almost equivalent to stopping the This is almost equivalent to stopping the
<application>postmaster</application> then starting it again <application>postmaster</application> and starting it again
except that pg_ctl saves and reuses the command line options that except that pg_ctl saves and reuses the command line options that
were passed to the previously running instance. To restart were passed to the previously running instance. To restart
<application>postmaster</application> in the simplest form: the <application>postmaster</application> in the simplest form:
<screen> <screen>
<prompt>$</prompt> <userinput>pg_ctl restart</userinput> <prompt>$</prompt> <userinput>pg_ctl restart</userinput>
</screen> </screen>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.39 2001/11/18 20:35:02 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.40 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -62,12 +62,13 @@ Postgres documentation ...@@ -62,12 +62,13 @@ Postgres documentation
<para> <para>
<command>pg_dump</command> is a utility for saving a <command>pg_dump</command> is a utility for saving a
<productname>PostgreSQL</productname> database into a script or an <productname>PostgreSQL</productname> database into a script or an
archive file. The script files are in plain text format and archive file. The script files are in plain-text format and
contain the SQL commands required to reconstruct the database to contain the SQL commands required to reconstruct the database to
the state it was in at the time it was saved. They can be used to the state it was in at the time it was saved. They can be used to
reconstruct the database even on other machines and other reconstruct the database even on other machines and other
architectures, with some modifications even on other RDBMS architectures, with some modifications even on other RDBMS
products. The alternative archive file formats are meant to be products. Furthermore, there are alternative archive file formats that
are meant to be
used with <xref linkend="app-pgrestore"> to rebuild the database, used with <xref linkend="app-pgrestore"> to rebuild the database,
and they also allow <command>pg_restore</command> to be selective and they also allow <command>pg_restore</command> to be selective
about what is restored, or even to reorder the items prior to being about what is restored, or even to reorder the items prior to being
...@@ -86,7 +87,7 @@ Postgres documentation ...@@ -86,7 +87,7 @@ Postgres documentation
<para> <para>
<command>pg_dump</command> <command>pg_dump</command>
is useful for dumping out the contents of a database to move from one is useful for dumping out the contents of a database to move from one
<productname>Postgres</productname> installation to another. <productname>PostgreSQL</productname> installation to another.
</para> </para>
<para> <para>
...@@ -145,7 +146,7 @@ Postgres documentation ...@@ -145,7 +146,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -172,7 +173,7 @@ Postgres documentation ...@@ -172,7 +173,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -191,7 +192,7 @@ Postgres documentation ...@@ -191,7 +192,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -251,7 +252,7 @@ Postgres documentation ...@@ -251,7 +252,7 @@ Postgres documentation
<term>p</term> <term>p</term>
<listitem> <listitem>
<para> <para>
output a plain text <acronym>SQL</acronym> script file (default) Output a plain-text <acronym>SQL</acronym> script file (default)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -260,7 +261,7 @@ Postgres documentation ...@@ -260,7 +261,7 @@ Postgres documentation
<term>t</term> <term>t</term>
<listitem> <listitem>
<para> <para>
output a <filename>tar</filename> archive suitable for input into Output a <filename>tar</filename> archive suitable for input into
<command>pg_restore</command>. Using this archive format <command>pg_restore</command>. Using this archive format
allows reordering and/or exclusion of schema elements allows reordering and/or exclusion of schema elements
at the time the database is restored. It is also possible to limit at the time the database is restored. It is also possible to limit
...@@ -273,7 +274,7 @@ Postgres documentation ...@@ -273,7 +274,7 @@ Postgres documentation
<term>c</term> <term>c</term>
<listitem> <listitem>
<para> <para>
output a custom archive suitable for input into Output a custom archive suitable for input into
<command>pg_restore</command>. This is the most flexible <command>pg_restore</command>. This is the most flexible
format in that it allows reordering of data load as well format in that it allows reordering of data load as well
as schema elements. This format is also compressed by default. as schema elements. This format is also compressed by default.
...@@ -360,7 +361,7 @@ Postgres documentation ...@@ -360,7 +361,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -390,7 +391,7 @@ Postgres documentation ...@@ -390,7 +391,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -456,7 +457,7 @@ Postgres documentation ...@@ -456,7 +457,7 @@ Postgres documentation
<term>--use-set-session-authorization</term> <term>--use-set-session-authorization</term>
<listitem> <listitem>
<para> <para>
Normally, if a (plain text mode) script generated by Normally, if a (plain-text mode) script generated by
<command>pg_dump</command> must alter the current database <command>pg_dump</command> must alter the current database
user (e.g., to set correct object ownerships), it uses the user (e.g., to set correct object ownerships), it uses the
<xref linkend="app-psql"> <command>\connect</command> command. <xref linkend="app-psql"> <command>\connect</command> command.
...@@ -479,7 +480,7 @@ Postgres documentation ...@@ -479,7 +480,7 @@ Postgres documentation
</para> </para>
<para> <para>
This option is only meaningful for the plain text format. For This option is only meaningful for the plain-text format. For
the other formats, you may specify the option when you the other formats, you may specify the option when you
call <command>pg_restore</command>. call <command>pg_restore</command>.
</para> </para>
...@@ -511,7 +512,7 @@ Postgres documentation ...@@ -511,7 +512,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
<command>postmaster</command> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the Unix domain socket. as the directory for the Unix domain socket.
</para> </para>
...@@ -524,7 +525,7 @@ Postgres documentation ...@@ -524,7 +525,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <command>postmaster</command> extension on which the server
is listening for connections. The port number defaults to 5432, is listening for connections. The port number defaults to 5432,
or the value of the <envar>PGPORT</envar> or the value of the <envar>PGPORT</envar>
environment variable (if set). environment variable (if set).
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.25 2001/10/23 22:11:22 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.26 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -36,7 +36,7 @@ Postgres documentation ...@@ -36,7 +36,7 @@ Postgres documentation
<para> <para>
<application>pg_dumpall</application> is a utility for writing out <application>pg_dumpall</application> is a utility for writing out
(<quote>dumping</quote>) all Postgres databases of a cluster into (<quote>dumping</quote>) all PostgreSQL databases of a cluster into
one script file. The script file contains SQL commands that can be one script file. The script file contains SQL commands that can be
used as input to <xref linkend="app-psql"> used as input to <xref linkend="app-psql">
to restore the databases. It does this by calling <xref to restore the databases. It does this by calling <xref
...@@ -104,7 +104,7 @@ Postgres documentation ...@@ -104,7 +104,7 @@ Postgres documentation
<term>-h <replaceable>host</replaceable></term> <term>-h <replaceable>host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the database Specifies the host name of the machine on which the database
server is running. If host begins with a slash, it is used as server is running. If host begins with a slash, it is used as
the directory for the Unix domain socket. The default is the directory for the Unix domain socket. The default is
taken from the <envar>PGHOST</envar> environment variable, if taken from the <envar>PGHOST</envar> environment variable, if
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_passwd.sgml,v 1.8 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_passwd.sgml,v 1.9 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -16,7 +16,7 @@ Postgres documentation ...@@ -16,7 +16,7 @@ Postgres documentation
<refnamediv> <refnamediv>
<refname>pg_passwd</refname> <refname>pg_passwd</refname>
<refpurpose>change a secondary password file</refpurpose> <refpurpose>change a secondary <productname>PostgreSQL</> password file</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.20 2001/11/26 23:09:21 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.21 2001/11/28 20:49:10 petere Exp $ -->
<refentry id="APP-PGRESTORE"> <refentry id="APP-PGRESTORE">
<docinfo> <docinfo>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<para> <para>
<command>pg_restore</command> is a utility for restoring a <command>pg_restore</command> is a utility for restoring a
<productname>Postgres</productname> database from an archive <productname>PostgreSQL</productname> database from an archive
created by <xref linkend="app-pgdump"> in one of the non-plain-text created by <xref linkend="app-pgdump"> in one of the non-plain-text
formats. It formats. It
will issue the commands necessary to re-generate all user-defined will issue the commands necessary to re-generate all user-defined
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
current database user (e.g., to set correct object current database user (e.g., to set correct object
ownerships), a new connection to the database must be opened, ownerships), a new connection to the database must be opened,
which might require manual interaction (e.g., passwords). If which might require manual interaction (e.g., passwords). If
you use the <option>-X use-set-session-authorization</option>, you use the <option>-X use-set-session-authorization</option> option,
then <command>pg_restore</command> will instead use the <xref then <command>pg_restore</command> will instead use the <xref
linkend="sql-set-session-authorization"> command. This has linkend="sql-set-session-authorization"> command. This has
the same effect, but it requires that the user restoring the the same effect, but it requires that the user restoring the
...@@ -418,7 +418,7 @@ ...@@ -418,7 +418,7 @@
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
<command>postmaster</command> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the Unix domain socket. as the directory for the Unix domain socket.
</para> </para>
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <command>postmaster</command> extension on which the server
is listening for connections. The port number defaults to 5432, is listening for connections. The port number defaults to 5432,
or the value of the <envar>PGPORT</envar> or the value of the <envar>PGPORT</envar>
environment variable (if set). environment variable (if set).
...@@ -487,7 +487,7 @@ connectDBStart() -- connect() failed: No such file or directory ...@@ -487,7 +487,7 @@ connectDBStart() -- connect() failed: No such file or directory
<command>pg_restore</command> could not attach to the <command>pg_restore</command> could not attach to the
<command>postmaster</command> <command>postmaster</command>
process on the specified host and port. If you see this message, process on the specified host and port. If you see this message,
ensure that the <command>postmaster</command> ensure that the server
is running on the proper host and that you have specified the proper is running on the proper host and that you have specified the proper
port. If your site uses an authentication system, ensure that you port. If your site uses an authentication system, ensure that you
have obtained the required authentication credentials. have obtained the required authentication credentials.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgaccess-ref.sgml,v 1.11 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgaccess-ref.sgml,v 1.12 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -47,21 +47,21 @@ Postgres documentation ...@@ -47,21 +47,21 @@ Postgres documentation
Description Description
</title> </title>
<para> <para>
<application>pgaccess</application> provides a graphical interface <application>PgAccess</application> provides a graphical interface
for <productname>Postgres</productname> for <productname>PostgreSQL</productname>
wherein you wherein you
can manage your tables, edit them, define queries, sequences and can manage your tables, edit them, define queries, sequences and
functions. functions.
</para> </para>
<para> <para>
<application>pgaccess</application> can: <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
<para> <para>
Open any database on a specified host at the specified port, Open any database on a specified host at the specified port,
username, and password. user name, and password.
</para> </para>
</listitem> </listitem>
...@@ -80,7 +80,7 @@ Postgres documentation ...@@ -80,7 +80,7 @@ Postgres documentation
</para> </para>
<para> <para>
For tables, <application>pgaccess</application> can: For tables, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -139,7 +139,7 @@ Postgres documentation ...@@ -139,7 +139,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Delete records; point to the record, press <keycap>Delete</keycap> key. Delete records; point to the record, press the <keycap>Delete</keycap> key.
</para> </para>
</listitem> </listitem>
...@@ -170,7 +170,7 @@ Postgres documentation ...@@ -170,7 +170,7 @@ Postgres documentation
</para> </para>
<para> <para>
For queries, <application>pgaccess</application> can: For queries, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -222,7 +222,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -222,7 +222,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For sequences, <application>pgaccess</application> can: For sequences, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -246,7 +246,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -246,7 +246,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For views, <application>pgaccess</application> can: For views, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -276,7 +276,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -276,7 +276,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For functions, <application>pgaccess</application> can: For functions, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -300,7 +300,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -300,7 +300,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For reports, <application>pgaccess</application> can: For reports, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -330,7 +330,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -330,7 +330,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For forms, <application>pgaccess</application> can: For forms, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -354,7 +354,7 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -354,7 +354,7 @@ select * from invoices where year=[parameter "Year of selection"]
</para> </para>
<para> <para>
For scripts, <application>pgaccess</application> can: For scripts, <application>PgAccess</application> can:
<itemizedlist mark="bullet" spacing="compact"> <itemizedlist mark="bullet" spacing="compact">
<listitem> <listitem>
...@@ -382,9 +382,9 @@ select * from invoices where year=[parameter "Year of selection"] ...@@ -382,9 +382,9 @@ select * from invoices where year=[parameter "Year of selection"]
<title>Notes</title> <title>Notes</title>
<para> <para>
<application>pgaccess</application> is written in Tcl/Tk. Your <application>PgAccess</application> is written in Tcl/Tk. Your
<productname>PostgreSQL</productname> installation needs to be <productname>PostgreSQL</productname> installation needs to be
built with Tcl support for <application>pgaccess</application> to built with Tcl support for <application>PgAccess</application> to
be available. be available.
</para> </para>
</refsect1> </refsect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.21 2001/11/25 01:11:36 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.22 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -99,7 +99,7 @@ Postgres documentation ...@@ -99,7 +99,7 @@ Postgres documentation
queries and the results will be printed to the screen, but in a queries and the results will be printed to the screen, but in a
form that is more useful for developers than end users. But note form that is more useful for developers than end users. But note
that running a single-user backend is not truly suitable for that running a single-user backend is not truly suitable for
debugging the server since no realistic inter-process communication debugging the server since no realistic interprocess communication
and locking will happen. and locking will happen.
</para> </para>
...@@ -355,7 +355,7 @@ Postgres documentation ...@@ -355,7 +355,7 @@ Postgres documentation
<title>Usage</title> <title>Usage</title>
<para> <para>
Start a standalone backend with a command like Start a stand-alone backend with a command like
<screen> <screen>
<userinput>postgres -D $PGDATA <replaceable>other-options</> my_database</userinput> <userinput>postgres -D $PGDATA <replaceable>other-options</> my_database</userinput>
</screen> </screen>
...@@ -365,7 +365,7 @@ Postgres documentation ...@@ -365,7 +365,7 @@ Postgres documentation
</para> </para>
<para> <para>
Normally, the standalone backend treats newline as the command Normally, the stand-alone backend treats newline as the command
entry terminator; there is no intelligence about semicolons, entry terminator; there is no intelligence about semicolons,
as there is in <application>psql</>. To continue a command as there is in <application>psql</>. To continue a command
across multiple lines, you must type backslash just before each across multiple lines, you must type backslash just before each
...@@ -374,19 +374,22 @@ Postgres documentation ...@@ -374,19 +374,22 @@ Postgres documentation
<para> <para>
But if you use the <option>-N</> command line switch, then newline does But if you use the <option>-N</> command line switch, then newline does
not terminate command entry. The backend will read stdin until EOF, then not terminate command entry. The backend will read the standard input
until the end-of-file (EOF) marker, then
process the input as a single query string. Backslash-newline is not process the input as a single query string. Backslash-newline is not
treated specially in this case. treated specially in this case.
</para> </para>
<para> <para>
The standalone backend does not have readline input processing To quit the session, type EOF
(no command history, for example). (<keycombo action="simul"><keycap>Control</><keycap>D</></>, usually).
If you've
used <option>-N</>, two consecutive EOFs are needed to exit.
</para> </para>
<para> <para>
To quit the backend, type EOF (control-D, usually). If you've Note that the stand-alone backend does not provide sophisticated
used <option>-N</>, two consecutive EOFs are needed to exit. line-editing features (no command history, for example).
</para> </para>
</refsect1> </refsect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.24 2001/11/26 19:41:55 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.25 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -159,10 +159,11 @@ Postgres documentation ...@@ -159,10 +159,11 @@ Postgres documentation
<term>-h <replaceable class="parameter">hostname</replaceable></term> <term>-h <replaceable class="parameter">hostname</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the TCP/IP hostname or address on which the Specifies the TCP/IP host name or address on which the
<application>postmaster</application> is to listen for <application>postmaster</application> is to listen for
connections from client applications. Defaults to connections from client applications. Defaults to
listening on all configured addresses (including localhost). listening on all configured addresses (including
<systemitem class="systemname">localhost</systemitem>).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -274,11 +275,6 @@ Postgres documentation ...@@ -274,11 +275,6 @@ Postgres documentation
Sets a named run-time parameter; a shorter form of Sets a named run-time parameter; a shorter form of
<option>-c</>. <option>-c</>.
</para> </para>
<para>
The <option>--</> option will not work on FreeBSD or OpenBSD.
Use <option>-c</> instead. This should be fixed in
<productname>PostgreSQL</productname> 7.3.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -360,9 +356,9 @@ semget: No space left on device ...@@ -360,9 +356,9 @@ semget: No space left on device
<tip> <tip>
<para> <para>
You may be able to postpone You may be able to postpone
reconfiguring your kernel by decreasing -B to reduce reconfiguring your kernel by decreasing <option>-B</option> to reduce
<productname>Postgres</productname>' shared memory the shared memory consumption of <productname>PostgreSQL</>,
consumption, and/or by reducing -N to reduce Postgres' semaphore and/or by reducing <option>-N</option> to reduce the semaphore
consumption. consumption.
</para> </para>
</tip> </tip>
...@@ -441,6 +437,14 @@ StreamServerPort: cannot bind to port ...@@ -441,6 +437,14 @@ StreamServerPort: cannot bind to port
start and shut down the <application>postmaster</application> start and shut down the <application>postmaster</application>
safely and comfortably. safely and comfortably.
</para> </para>
<para>
The <option>--</> options will not work on FreeBSD or OpenBSD.
Use <option>-c</> instead. This is a bug in the affected operating
systems; a future release of <productname>PostgreSQL</productname> will
provide a workaround if this is not fixed.
</para>
</refsect1> </refsect1>
<refsect1 id="app-postmaster-usage"> <refsect1 id="app-postmaster-usage">
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.18 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.19 2001/11/28 20:49:10 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -59,7 +59,7 @@ Postgres documentation ...@@ -59,7 +59,7 @@ Postgres documentation
<varlistentry> <varlistentry>
<term>-a</term> <term>-a</term>
<term>--alldb</term> <term>--all</term>
<listitem> <listitem>
<para> <para>
Vacuum all databases. Vacuum all databases.
...@@ -128,10 +128,10 @@ Postgres documentation ...@@ -128,10 +128,10 @@ Postgres documentation
<term>--host <replaceable class="parameter">host</replaceable></term> <term>--host <replaceable class="parameter">host</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the hostname of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> server
is running. If host begins with a slash, it is used is running. If host begins with a slash, it is used
as the directory for the unix domain socket. as the directory for the Unix domain socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -142,7 +142,7 @@ Postgres documentation ...@@ -142,7 +142,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
extension on which the <application>postmaster</application> extension on which the server
is listening for connections. is listening for connections.
</para> </para>
</listitem> </listitem>
...@@ -153,7 +153,7 @@ Postgres documentation ...@@ -153,7 +153,7 @@ Postgres documentation
<term>--username <replaceable class="parameter">username</replaceable></term> <term>--username <replaceable class="parameter">username</replaceable></term>
<listitem> <listitem>
<para> <para>
Username to connect as. User name to connect as
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -174,7 +174,7 @@ Postgres documentation ...@@ -174,7 +174,7 @@ Postgres documentation
<listitem> <listitem>
<para> <para>
Echo the commands that <application>vacuumdb</application> generates Echo the commands that <application>vacuumdb</application> generates
and sends to the backend. and sends to the server.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -235,16 +235,16 @@ Postgres documentation ...@@ -235,16 +235,16 @@ Postgres documentation
<para> <para>
<application>vacuumdb</application> is a utility for cleaning a <application>vacuumdb</application> is a utility for cleaning a
<productname>Postgres</productname> database. <productname>PostgreSQL</productname> database.
<application>vacuumdb</application> will also generate internal statistics <application>vacuumdb</application> will also generate internal statistics
used by the <productname>Postgres</productname> query optimizer. used by the <productname>PostgreSQL</productname> query optimizer.
</para> </para>
<para> <para>
<application>vacuumdb</application> is a shell script wrapper around the <application>vacuumdb</application> is a shell script wrapper around the
backend command backend command
<xref linkend="SQL-VACUUM" endterm="SQL-VACUUM-title"> via <xref linkend="SQL-VACUUM" endterm="SQL-VACUUM-title"> via
the <productname>Postgres</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. There is no effective <xref linkend="APP-PSQL">. There is no effective
difference between vacuuming databases via this or other methods. difference between vacuuming databases via this or other methods.
<application>psql</application> must be found by the script and <application>psql</application> must be found by the script and
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.21 2001/09/21 18:37:05 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.22 2001/11/28 20:49:10 petere Exp $ -->
<chapter id="regress"> <chapter id="regress">
<title id="regress-title">Regression Tests</title> <title id="regress-title">Regression Tests</title>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput> <prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput>
<prompt>root# </prompt><userinput>chmod -R a+w contrib/spi</userinput> <prompt>root# </prompt><userinput>chmod -R a+w contrib/spi</userinput>
<prompt>root# </prompt><userinput>su - joeuser</userinput> <prompt>root# </prompt><userinput>su - joeuser</userinput>
<prompt>joeuser$ </prompt><userinput>cd &lt;build top-level directory&gt;</userinput> <prompt>joeuser$ </prompt><userinput>cd <replaceable>top-level build directory</></userinput>
<prompt>joeuser$ </prompt><userinput>gmake check</userinput> <prompt>joeuser$ </prompt><userinput>gmake check</userinput>
</screen> </screen>
(The only possible <quote>security risk</quote> here is that other (The only possible <quote>security risk</quote> here is that other
...@@ -184,11 +184,11 @@ ...@@ -184,11 +184,11 @@
<para> <para>
Some of the queries in the <filename>timestamp</filename> test will Some of the queries in the <filename>timestamp</filename> test will
fail if you run the test on the day of a daylight-savings time fail if you run the test on the day of a daylight-saving time
changeover, or the day before or after one. These queries assume changeover, or the day before or after one. These queries assume
that the intervals between midnight yesterday, midnight today and that the intervals between midnight yesterday, midnight today and
midnight tomorrow are exactly twenty-four hours -- which is wrong midnight tomorrow are exactly twenty-four hours -- which is wrong
if daylight-savings time went into or out of effect meanwhile. if daylight-saving time went into or out of effect meanwhile.
</para> </para>
<para> <para>
...@@ -224,7 +224,7 @@ PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ ...@@ -224,7 +224,7 @@ PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ
<para> <para>
Some systems using older time zone libraries fail to apply Some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing daylight-saving corrections to dates before 1970, causing
pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This will pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This will
result in localized differences in the test results. result in localized differences in the test results.
</para> </para>
...@@ -370,7 +370,7 @@ testname/platformpattern=comparisonfilename ...@@ -370,7 +370,7 @@ testname/platformpattern=comparisonfilename
<para> <para>
For example: some systems using older time zone libraries fail to apply For example: some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing daylight-saving corrections to dates before 1970, causing
pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This causes a pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This causes a
few differences in the <filename>horology</> regression test. few differences in the <filename>horology</> regression test.
Therefore, we provide a variant comparison file, Therefore, we provide a variant comparison file,
......
This diff is collapsed.
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.20 2001/11/23 21:08:51 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.21 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="tutorial-start"> <chapter id="tutorial-start">
...@@ -61,7 +61,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.20 2001/11/23 21:08:51 tgl E ...@@ -61,7 +61,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.20 2001/11/23 21:08:51 tgl E
Before we proceed, you should understand the basic Before we proceed, you should understand the basic
<productname>PostgreSQL</productname> system architecture. <productname>PostgreSQL</productname> system architecture.
Understanding how the parts of Understanding how the parts of
<productname>PostgreSQL</productname> interact will make the next <productname>PostgreSQL</productname> interact will make this
chapter somewhat clearer. chapter somewhat clearer.
</para> </para>
...@@ -105,7 +105,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.20 2001/11/23 21:08:51 tgl E ...@@ -105,7 +105,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.20 2001/11/23 21:08:51 tgl E
over a TCP/IP network connection. You should keep this in mind, over a TCP/IP network connection. You should keep this in mind,
because the files that can be accessed on a client machine might because the files that can be accessed on a client machine might
not be accessible (or might only be accessible using a different not be accessible (or might only be accessible using a different
file path) on the database server machine. file name) on the database server machine.
</para> </para>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.52 2001/11/21 06:09:45 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.53 2001/11/28 20:49:10 petere Exp $
--> -->
<chapter id="sql-syntax"> <chapter id="sql-syntax">
...@@ -415,13 +415,13 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) ...@@ -415,13 +415,13 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
for the type, as recorded in its <literal>pg_type</literal> for the type, as recorded in its <literal>pg_type</literal>
entry. (For all built-in types, this is the comma character entry. (For all built-in types, this is the comma character
<quote><literal>,</literal></>.) Each <replaceable>val</replaceable> is either a constant <quote><literal>,</literal></>.) Each <replaceable>val</replaceable> is either a constant
of the array element type, or a sub-array. An example of an of the array element type, or a subarray. An example of an
array constant is array constant is
<programlisting> <programlisting>
'{{1,2,3},{4,5,6},{7,8,9}}' '{{1,2,3},{4,5,6},{7,8,9}}'
</programlisting> </programlisting>
This constant is a two-dimensional, 3 by 3 array consisting of three This constant is a two-dimensional, 3-by-3 array consisting of three
sub-arrays of integers. subarrays of integers.
</para> </para>
<para> <para>
...@@ -750,7 +750,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) ...@@ -750,7 +750,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
<para> <para>
Command identifiers are also 32-bit quantities. This creates a hard Command identifiers are also 32-bit quantities. This creates a hard
limit of 2^32 (4 billion) SQL commands within a single transaction. limit of 2<superscript>32</> (4 billion) SQL commands within a single transaction.
In practice this limit is not a problem --- note that the limit is on In practice this limit is not a problem --- note that the limit is on
number of SQL queries, not number of tuples processed. number of SQL queries, not number of tuples processed.
</para> </para>
...@@ -877,7 +877,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) ...@@ -877,7 +877,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
<replaceable>correlation</replaceable> is either the name of a <replaceable>correlation</replaceable> is either the name of a
table, an alias for a table defined by means of a FROM clause, or table, an alias for a table defined by means of a FROM clause, or
the keyword <literal>NEW</literal> or <literal>OLD</literal>. the key words <literal>NEW</literal> or <literal>OLD</literal>.
(NEW and OLD can only appear in the action portion of a rule, (NEW and OLD can only appear in the action portion of a rule,
while other correlation names can be used in any SQL statement.) while other correlation names can be used in any SQL statement.)
The correlation name can be omitted if the column name is unique The correlation name can be omitted if the column name is unique
......
...@@ -49,8 +49,8 @@ mixed-type expressions to be meaningful even with user-defined types. ...@@ -49,8 +49,8 @@ mixed-type expressions to be meaningful even with user-defined types.
<para> <para>
The <productname>PostgreSQL</productname> scanner/parser decodes lexical The <productname>PostgreSQL</productname> scanner/parser decodes lexical
elements into only five fundamental categories: integers, floats, strings, elements into only five fundamental categories: integers, floating-point numbers, strings,
names, and keywords. Most extended types are first tokenized into names, and key words. Most extended types are first tokenized into
strings. The <acronym>SQL</acronym> language definition allows specifying type strings. The <acronym>SQL</acronym> language definition allows specifying type
names with strings, and this mechanism can be used in names with strings, and this mechanism can be used in
<productname>PostgreSQL</productname> to start the parser down the correct <productname>PostgreSQL</productname> to start the parser down the correct
...@@ -84,8 +84,8 @@ Operators ...@@ -84,8 +84,8 @@ Operators
<listitem> <listitem>
<para> <para>
<productname>PostgreSQL</productname> allows expressions with <productname>PostgreSQL</productname> allows expressions with
prefix and postfix unary (one argument) operators, prefix and postfix unary (one-argument) operators,
as well as binary (two argument) operators. as well as binary (two-argument) operators.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -620,7 +620,7 @@ tgl=> SELECT substr(text(varchar '1234'), 3); ...@@ -620,7 +620,7 @@ tgl=> SELECT substr(text(varchar '1234'), 3);
<note> <note>
<para> <para>
Actually, the parser is aware that <type>text</type> and <type>varchar</type> Actually, the parser is aware that <type>text</type> and <type>varchar</type>
are <firstterm>binary compatible</>, meaning that one can be passed to a function that are <firstterm>binary-compatible</>, meaning that one can be passed to a function that
accepts the other without doing any physical conversion. Therefore, no accepts the other without doing any physical conversion. Therefore, no
explicit type conversion call is really inserted in this case. explicit type conversion call is really inserted in this case.
</para> </para>
......
...@@ -22,7 +22,7 @@ CREATE USER <replaceable>name</replaceable> ...@@ -22,7 +22,7 @@ CREATE USER <replaceable>name</replaceable>
</synopsis> </synopsis>
<replaceable>name</replaceable> follows the rules for SQL <replaceable>name</replaceable> follows the rules for SQL
identifiers: either unadorned without special characters, or identifiers: either unadorned without special characters, or
double-quoted. To remove an existing user, use the analog double-quoted. To remove an existing user, use the analogous
<command>DROP USER</command> command. <command>DROP USER</command> command.
</para> </para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.13 2001/11/21 06:09:45 thomas Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.14 2001/11/28 20:49:10 petere Exp $ -->
<chapter id="wal"> <chapter id="wal">
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title> <title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<simpara>index tuples pointing to non-existent table rows</simpara> <simpara>index tuples pointing to nonexistent table rows</simpara>
</listitem> </listitem>
<listitem> <listitem>
...@@ -148,8 +148,8 @@ ...@@ -148,8 +148,8 @@
<para> <para>
<acronym>WAL</acronym> logs are stored in the directory <acronym>WAL</acronym> logs are stored in the directory
<Filename><replaceable>$PGDATA</replaceable>/pg_xlog</Filename>, as <Filename><replaceable>$PGDATA</replaceable>/pg_xlog</Filename>, as
a set of segment files, each 16MB in size. Each segment is a set of segment files, each 16 MB in size. Each segment is
divided into 8KB pages. The log record headers are described in divided into 8 kB pages. The log record headers are described in
<filename>access/xlog.h</filename>; record content is dependent on <filename>access/xlog.h</filename>; record content is dependent on
the type of event that is being logged. Segment files are given the type of event that is being logged. Segment files are given
ever-increasing numbers as names, starting at ever-increasing numbers as names, starting at
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
shared memory, and are handled by the backends; they are protected shared memory, and are handled by the backends; they are protected
by lightweight locks. The demand on shared memory is dependent on the by lightweight locks. The demand on shared memory is dependent on the
number of buffers. The default size of the <acronym>WAL</acronym> number of buffers. The default size of the <acronym>WAL</acronym>
buffers is 8 8KB buffers, or 64KB. buffers is 8 buffers of 8 kB each, or 64 kB total.
</para> </para>
<para> <para>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
corruption of <filename>pg_control</filename>, we should actually corruption of <filename>pg_control</filename>, we should actually
implement the reading of existing log segments in reverse order -- implement the reading of existing log segments in reverse order --
newest to oldest -- in order to find the last checkpoint. This has newest to oldest -- in order to find the last checkpoint. This has
not yet been done in release 7.1. not been implemented, yet.
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
...@@ -348,11 +348,11 @@ ...@@ -348,11 +348,11 @@
</para> </para>
<para> <para>
Setting the <varname>WAL_DEBUG</varname> parameter to any non-zero Setting the <varname>WAL_DEBUG</varname> parameter to any nonzero
value will result in each <function>LogInsert</function> and value will result in each <function>LogInsert</function> and
<function>LogFlush</function> <acronym>WAL</acronym> call being <function>LogFlush</function> <acronym>WAL</acronym> call being
logged to standard error. At present, it makes no difference what logged to standard error. At present, it makes no difference what
the non-zero value is. This option may be replaced by a more the nonzero value is. This option may be replaced by a more
general mechanism in the future. general mechanism in the future.
</para> </para>
</sect1> </sect1>
......
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