mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
proof-reading
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
<!-- $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] <> 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;
|
|||||||
|
|
||||||
<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.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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> < <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
|
|||||||
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>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.18 2001/11/21 05:53:40 thomas Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.19 2001/11/28 20:49:09 petere Exp $ -->
|
||||||
|
|
||||||
<chapter id="charset">
|
<chapter id="charset">
|
||||||
<title>Localization</>
|
<title>Localization</>
|
||||||
@ -317,7 +317,7 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
<para>
|
<para>
|
||||||
Multibyte (<acronym>MB</acronym>) support is intended to allow
|
Multibyte (<acronym>MB</acronym>) support is intended to allow
|
||||||
<productname>PostgreSQL</productname> to handle
|
<productname>PostgreSQL</productname> to handle
|
||||||
multiple-byte character sets such as <acronym>EUC</> (Extended Unix Code), Unicode and
|
multiple-byte character sets such as <acronym>EUC</> (Extended Unix Code), Unicode, and
|
||||||
Mule internal code. With <acronym>MB</acronym> enabled you can use multibyte
|
Mule internal code. With <acronym>MB</acronym> enabled you can use multibyte
|
||||||
character sets in regular expressions (regexp), LIKE, and some
|
character sets in regular expressions (regexp), LIKE, and some
|
||||||
other functions. The default
|
other functions. The default
|
||||||
@ -326,27 +326,19 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
<application>initdb</application>. Note that this can be
|
<application>initdb</application>. Note that this can be
|
||||||
overridden when you create a database using
|
overridden when you create a database using
|
||||||
<application>createdb</application> or by using the SQL command
|
<application>createdb</application> or by using the SQL command
|
||||||
CREATE DATABASE. So you can have multiple databases each with
|
<command>CREATE DATABASE</>. So you can have multiple databases each with
|
||||||
a different encoding system.
|
a different encoding system.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
<acronym>MB</acronym> also fixes some problems concerning 8-bit single byte
|
|
||||||
character sets including ISO8859. (I would not say all problems
|
|
||||||
have been fixed. I just confirmed that the regression test ran fine
|
|
||||||
and a few French characters could be used with the patch. Please let
|
|
||||||
me know if you find any problem while using 8-bit characters.)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Enabling MB</title>
|
<title>Enabling Multibyte Support</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Run configure with the multibyte option:
|
Run configure with the multibyte option:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
% ./configure --enable-multibyte[=<replaceable>encoding_system</replaceable>]
|
./configure --enable-multibyte<optional>=<replaceable>encoding_system</replaceable></optional>
|
||||||
</programlisting>
|
</synopsis>
|
||||||
|
|
||||||
where <replaceable>encoding_system</replaceable> can be one of the
|
where <replaceable>encoding_system</replaceable> can be one of the
|
||||||
values in the following table:
|
values in the following table:
|
||||||
@ -364,7 +356,7 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>SQL_ASCII</literal></entry>
|
<entry><literal>SQL_ASCII</literal></entry>
|
||||||
<entry><acronym>US ASCII</acronym></entry>
|
<entry><acronym>ASCII</acronym></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>EUC_JP</literal></entry>
|
<entry><literal>EUC_JP</literal></entry>
|
||||||
@ -463,33 +455,38 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
</table>
|
</table>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<important>
|
||||||
CAUTION1: Note that before 7.2 LATIN5 meant ISO 8859-5 mistakely. In 7.2
|
<para>
|
||||||
LATIN5 measn ISO 8859-9. If you have LATIN5 database created on
|
Before <productname>PostgreSQL</>7.2, <literal>LATIN5</> mistakenly
|
||||||
7.1 or before and want to migrate to 7.2, you should be very
|
meant ISO 8859-5. From 7.2 on,
|
||||||
carefull about this change.
|
<literal>LATIN5</> means ISO 8859-9. If you have a <literal>LATIN5</>
|
||||||
</para>
|
database created on 7.1 or earlier and want to migrate to 7.2 (or
|
||||||
|
later), you should be very careful about this change.
|
||||||
|
</para>
|
||||||
|
</important>
|
||||||
|
|
||||||
<para>
|
<important>
|
||||||
CAUTION2: Not all API supports encodings listed above. For example,
|
<para>
|
||||||
<productname>PostgreSQL</>
|
Not all APIs supports all the encodings listed above. For example, the
|
||||||
JDBC driver does not support MULE_INTERNAL, LATIN6,
|
<productname>PostgreSQL</>
|
||||||
LATIN8 and LATIN10.
|
JDBC driver does not support <literal>MULE_INTERNAL</>, <literal>LATIN6</>,
|
||||||
</para>
|
<literal>LATIN8</>, and <literal>LATIN10</>.
|
||||||
|
</para>
|
||||||
|
</important>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here is an example of configuring
|
Here is an example of configuring
|
||||||
<productname>PostgreSQL</productname> to use a Japanese encoding by
|
<productname>PostgreSQL</productname> to use a Japanese encoding by
|
||||||
default:
|
default:
|
||||||
|
|
||||||
<programlisting>
|
<screen>
|
||||||
% ./configure --enable-multibyte=EUC_JP
|
$ <userinput>./configure --enable-multibyte=EUC_JP</userinput>
|
||||||
</programlisting>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If the encoding system is omitted (./configure --enable-multibyte),
|
If the encoding system is omitted (<literal>./configure --enable-multibyte</literal>),
|
||||||
SQL_ASCII is assumed.
|
<literal>SQL_ASCII</> is assumed.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -500,39 +497,39 @@ perl: warning: Falling back to the standard locale ("C").
|
|||||||
<application>initdb</application> defines the default encoding
|
<application>initdb</application> defines the default encoding
|
||||||
for a <productname>PostgreSQL</productname> installation. For example:
|
for a <productname>PostgreSQL</productname> installation. For example:
|
||||||
|
|
||||||
<programlisting>
|
<screen>
|
||||||
% initdb -E EUC_JP
|
$ <userinput>initdb -E EUC_JP</>
|
||||||
</programlisting>
|
</screen>
|
||||||
|
|
||||||
sets the default encoding to <literal>EUC_JP</literal> (Extended Unix Code for Japanese).
|
sets the default encoding to <literal>EUC_JP</literal> (Extended Unix Code for Japanese).
|
||||||
Note that you can use <option>--encoding</option> instead of <option>-E</option> if you prefer
|
Note that you can use <option>--encoding</option> instead of <option>-E</option> if you prefer
|
||||||
to type longer option strings.
|
to type longer option strings.
|
||||||
If no -E or --encoding option is given, the encoding
|
If no <option>-E</> or <option>--encoding</option> option is given, the encoding
|
||||||
specified at configure time is used.
|
specified at configure time is used.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can create a database with a different encoding:
|
You can create a database with a different encoding:
|
||||||
|
|
||||||
<programlisting>
|
<screen>
|
||||||
% createdb -E EUC_KR korean
|
$ <userinput>createdb -E EUC_KR korean</>
|
||||||
</programlisting>
|
</screen>
|
||||||
|
|
||||||
will create a database named <database>korean</database> with <literal>EUC_KR</literal> encoding.
|
will create a database named <database>korean</database> with <literal>EUC_KR</literal> encoding.
|
||||||
Another way to accomplish this is to use a SQL command:
|
Another way to accomplish this is to use a SQL command:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE DATABASE korean WITH ENCODING = 'EUC_KR';
|
CREATE DATABASE korean WITH ENCODING = 'EUC_KR';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
The encoding for a database is represented as an
|
The encoding for a database is represented as an
|
||||||
<firstterm>encoding column</firstterm> in the
|
<firstterm>encoding column</firstterm> in the
|
||||||
<literal>pg_database</literal> system catalog.
|
<literal>pg_database</literal> system catalog.
|
||||||
You can see that by using <option>-l</option> or <command>\l</command> of <command>psql</command>
|
You can see that by using the <option>-l</option> option or the
|
||||||
command.
|
<command>\l</command> command of <command>psql</command>.
|
||||||
|
|
||||||
<programlisting>
|
<screen>
|
||||||
$ psql -l
|
$ <userinput>psql -l</userinput>
|
||||||
List of databases
|
List of databases
|
||||||
Database | Owner | Encoding
|
Database | Owner | Encoding
|
||||||
---------------+---------+---------------
|
---------------+---------+---------------
|
||||||
@ -546,20 +543,22 @@ $ psql -l
|
|||||||
test | t-ishii | EUC_JP
|
test | t-ishii | EUC_JP
|
||||||
unicode | t-ishii | UNICODE
|
unicode | t-ishii | UNICODE
|
||||||
(9 rows)
|
(9 rows)
|
||||||
</programlisting>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Automatic encoding translation between backend and
|
<title>Automatic encoding translation between server and
|
||||||
frontend</title>
|
client</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> supports an automatic
|
<productname>PostgreSQL</productname> supports an automatic
|
||||||
encoding translation between backend
|
encoding translation between server
|
||||||
and frontend for some encodings.
|
and client for some encodings. The available combinations are
|
||||||
|
listed in <xref linkend="multibyte-translation-table">.
|
||||||
|
</para>
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1" id="multibyte-translation-table">
|
||||||
<title>Client/Server Character Set Encodings</title>
|
<title>Client/Server Character Set Encodings</title>
|
||||||
<titleabbrev>Communication Encodings</titleabbrev>
|
<titleabbrev>Communication Encodings</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
@ -724,12 +723,11 @@ $ psql -l
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To enable the automatic encoding translation, you have to tell
|
To enable the automatic encoding translation, you have to tell
|
||||||
<productname>PostgreSQL</productname> the encoding you would like
|
<productname>PostgreSQL</productname> the encoding you would like
|
||||||
to use in frontend. There are
|
to use in the client. There are
|
||||||
several ways to accomplish this.
|
several ways to accomplish this.
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@ -737,13 +735,13 @@ $ psql -l
|
|||||||
<para>
|
<para>
|
||||||
Using the <command>\encoding</command> command in
|
Using the <command>\encoding</command> command in
|
||||||
<application>psql</application>.
|
<application>psql</application>.
|
||||||
<command>\encoding</command> allows you to change frontend
|
<command>\encoding</command> allows you to change client
|
||||||
encoding on the fly. For
|
encoding on the fly. For
|
||||||
example, to change the encoding to <literal>SJIS</literal>, type:
|
example, to change the encoding to <literal>SJIS</literal>, type:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
\encoding SJIS
|
\encoding SJIS
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -753,27 +751,27 @@ $ psql -l
|
|||||||
<command>\encoding</command> actually calls
|
<command>\encoding</command> actually calls
|
||||||
<function>PQsetClientEncoding()</function> for its purpose.
|
<function>PQsetClientEncoding()</function> for its purpose.
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
int PQsetClientEncoding(PGconn *<replaceable>conn</replaceable>, const char *<replaceable>encoding</replaceable>)
|
int PQsetClientEncoding(PGconn *<replaceable>conn</replaceable>, const char *<replaceable>encoding</replaceable>)
|
||||||
</programlisting>
|
</synopsis>
|
||||||
|
|
||||||
where <replaceable>conn</replaceable> is a connection to the backend,
|
where <replaceable>conn</replaceable> is a connection to the server,
|
||||||
and <replaceable>encoding</replaceable> is an encoding you
|
and <replaceable>encoding</replaceable> is an encoding you
|
||||||
want to use. If it successfully sets the encoding, it returns 0,
|
want to use. If it successfully sets the encoding, it returns 0,
|
||||||
otherwise -1. The current encoding for this connection can be shown by
|
otherwise -1. The current encoding for this connection can be shown by
|
||||||
using:
|
using:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
int PQclientEncoding(const PGconn *<replaceable>conn</replaceable>)
|
int PQclientEncoding(const PGconn *<replaceable>conn</replaceable>)
|
||||||
</programlisting>
|
</synopsis>
|
||||||
|
|
||||||
Note that it returns the encoding id, not the encoding symbol string
|
Note that it returns the encoding ID, not a symbolic string
|
||||||
such as <literal>EUC_JP</literal>. To convert an encoding id to an encoding symbol, you
|
such as <literal>EUC_JP</literal>. To convert an encoding ID to an encoding name, you
|
||||||
can use:
|
can use:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
char *pg_encoding_to_char(int <replaceable>encoding_id</replaceable>)
|
char *pg_encoding_to_char(int <replaceable>encoding_id</replaceable>)
|
||||||
</programlisting>
|
</synopsis>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -781,29 +779,29 @@ char *pg_encoding_to_char(int <replaceable>encoding_id</replaceable>)
|
|||||||
<para>
|
<para>
|
||||||
Using <command>SET CLIENT_ENCODING TO</command>.
|
Using <command>SET CLIENT_ENCODING TO</command>.
|
||||||
|
|
||||||
Setting the frontend side encoding can be done by this SQL command:
|
Setting the client encoding can be done with this SQL command:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SET CLIENT_ENCODING TO 'encoding';
|
SET CLIENT_ENCODING TO 'encoding';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Also you can use SQL92 syntax <literal>SET NAMES</literal> for this purpose:
|
Also you can use the SQL92 syntax <literal>SET NAMES</literal> for this purpose:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SET NAMES 'encoding';
|
SET NAMES 'encoding';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
To query the current frontend encoding:
|
To query the current client encoding:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SHOW CLIENT_ENCODING;
|
SHOW CLIENT_ENCODING;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
To return to the default encoding:
|
To return to the default encoding:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
RESET CLIENT_ENCODING;
|
RESET CLIENT_ENCODING;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -813,7 +811,7 @@ RESET CLIENT_ENCODING;
|
|||||||
|
|
||||||
If environment variable <envar>PGCLIENTENCODING</envar> is defined
|
If environment variable <envar>PGCLIENTENCODING</envar> is defined
|
||||||
in the client's environment, that client encoding is automatically
|
in the client's environment, that client encoding is automatically
|
||||||
selected when a backend connection is made. (This can subsequently
|
selected when a connection to the server is made. (This can subsequently
|
||||||
be overridden using any of the other methods mentioned above.)
|
be overridden using any of the other methods mentioned above.)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -845,14 +843,15 @@ RESET CLIENT_ENCODING;
|
|||||||
<title>What happens if the translation is not possible?</title>
|
<title>What happens if the translation is not possible?</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Suppose you choose <literal>EUC_JP</literal> for the backend, <literal>LATIN1</literal> for the frontend,
|
Suppose you choose <literal>EUC_JP</literal> for the server
|
||||||
then some Japanese characters could not be translated into <literal>LATIN1</literal>. In
|
and <literal>LATIN1</literal> for the client,
|
||||||
|
then some Japanese characters cannot be translated into <literal>LATIN1</literal>. In
|
||||||
this case, a letter that cannot be represented in the <literal>LATIN1</literal> character set
|
this case, a letter that cannot be represented in the <literal>LATIN1</literal> character set
|
||||||
would be transformed as:
|
would be transformed as:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
(HEXA DECIMAL)
|
(HEXA DECIMAL)
|
||||||
</programlisting>
|
</synopsis>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -1016,21 +1015,22 @@ Sorry for my Eglish and C code, I'm not native :-)
|
|||||||
<para>
|
<para>
|
||||||
Success depends on proper system locales. This has been tested
|
Success depends on proper system locales. This has been tested
|
||||||
with <systemitem class="osname">Red Hat 6.0</> and <systemitem
|
with <systemitem class="osname">Red Hat 6.0</> and <systemitem
|
||||||
class="osname">Slackware 3.6</>, with <literal>cs_CZ.iso8859-2</literal> locale.
|
class="osname">Slackware 3.6</>, with the
|
||||||
|
<literal>cs_CZ.iso8859-2</literal> locale.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Never try to set the server multibyte database encoding to WIN1250.
|
Never try to set the server's database encoding to WIN1250.
|
||||||
Always use LATIN2 instead since there is not a WIN1250 locale
|
Always use LATIN2 instead since there is no WIN1250 locale
|
||||||
in Unix.
|
in Unix.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
WIN1250 encoding is usable only for Windows ODBC clients. The
|
The WIN1250 encoding is usable only for Windows ODBC clients. The
|
||||||
characters are recoded on the fly, to be displayed and stored
|
characters are recoded on the fly, to be displayed and stored
|
||||||
back properly.
|
back properly.
|
||||||
</para>
|
</para>
|
||||||
@ -1038,80 +1038,36 @@ Sorry for my Eglish and C code, I'm not native :-)
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
When running, it is important to remember the following:
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This configuration reorders your sort order depending on your
|
|
||||||
<envar>LC_<replaceable>x</replaceable></envar> settings. Don't be
|
|
||||||
confused with the regression test results since they don't use
|
|
||||||
locale.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
A locale such as <literal>ch</literal> is correctly sorted
|
|
||||||
only if your system
|
|
||||||
supports that locale; older systems may not do so but new ones
|
|
||||||
(e.g. RH6.0) do.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
You have to insert money as '<literal>162,50</literal>' (note
|
|
||||||
comma within the single-quotes).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
At the time of writing (early 1999), this configuration has
|
|
||||||
not received extensive testing. Please let us know of any
|
|
||||||
changes you had to make!
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<procedure>
|
<procedure>
|
||||||
<title>WIN1250 on Windows/ODBC</title>
|
<title>WIN1250 on Windows/ODBC</title>
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
Compile <productname>PostgreSQL</productname> with locale enabled
|
Compile <productname>PostgreSQL</productname> with locale enabled
|
||||||
and the multibyte encoding set to <literal>LATIN2</literal>.
|
and the server-side encoding set to <literal>LATIN2</literal>.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
Set up your installation. Do not forget to create locale
|
Set up your installation. Do not forget to create locale
|
||||||
variables in your profile (environment). For example (this may
|
variables in your environment. For example (this may
|
||||||
not be correct for <emphasis>your</emphasis> environment):
|
not be correct for <emphasis>your</emphasis> environment):
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
LC_ALL=cs_CZ.ISO8859-2
|
LC_ALL=cs_CZ.ISO8859-2
|
||||||
LC_COLLATE=cs_CZ.ISO8859-2
|
</programlisting>
|
||||||
LC_CTYPE=cs_CZ.ISO8859-2
|
|
||||||
LC_MONETARY=cs_CZ.ISO8859-2
|
|
||||||
LC_NUMERIC=cs_CZ.ISO8859-2
|
|
||||||
LC_TIME=cs_CZ.ISO8859-2
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
You have to start the postmaster with locales set!
|
You have to start the server with locales set!
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
Try it with Czech language, and have it sort on a query.
|
Try it with the Czech language, and have it sort on a query.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
@ -1123,12 +1079,12 @@ LC_TIME=cs_CZ.ISO8859-2
|
|||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
Setup properly your data source. Include this line in your ODBC
|
Set up your data source properly. Include this line in your ODBC
|
||||||
configuration dialog in the field <literal>Connect Settings</literal>:
|
configuration dialog in the field <guilabel>Connect Settings</guilabel>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SET CLIENT_ENCODING = 'WIN1250';
|
SET CLIENT_ENCODING = 'WIN1250';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
@ -1206,7 +1162,7 @@ HostCharset <replaceable>host_spec</> <replaceable>host_charset</>
|
|||||||
cannot use different encodings on the same host at the same
|
cannot use different encodings on the same host at the same
|
||||||
time. It is also inconvenient when you boot your client hosts into
|
time. It is also inconvenient when you boot your client hosts into
|
||||||
multiple operating systems. Nevertheless, when these restrictions are
|
multiple operating systems. Nevertheless, when these restrictions are
|
||||||
not limiting and you do not need multibyte characters than it is a
|
not limiting and you do not need multibyte characters then it is a
|
||||||
simple and effective solution.
|
simple and effective solution.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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 @@
|
|||||||
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 @@
|
|||||||
<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 @@
|
|||||||
(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
|
|||||||
|
|
||||||
<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
|
|||||||
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
|
|||||||
<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
|
|||||||
</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
|
|||||||
|
|
||||||
<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
|
|||||||
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
|
|||||||
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
|
|||||||
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'
|
|||||||
<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>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.76 2001/11/24 19:57:06 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.77 2001/11/28 20:49:09 petere Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="datatype">
|
<chapter id="datatype">
|
||||||
@ -226,19 +226,19 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.76 2001/11/24 19:57:06 tg
|
|||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>time with time zone</type></entry>
|
<entry><type>time with time zone</type></entry>
|
||||||
<entry>timetz</entry>
|
<entry><type>timetz</type></entry>
|
||||||
<entry>time of day, including time zone</entry>
|
<entry>time of day, including time zone</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>timestamp without time zone</type></entry>
|
<entry><type>timestamp without time zone</type></entry>
|
||||||
<entry>timestamp</entry>
|
<entry><type>timestamp</type></entry>
|
||||||
<entry>date and time</entry>
|
<entry>date and time</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>timestamp [ with time zone ]</type></entry>
|
<entry><type>timestamp [ with time zone ]</type></entry>
|
||||||
<entry>timestamptz</entry>
|
<entry><type>timestamptz</type></entry>
|
||||||
<entry>date and time, including time zone</entry>
|
<entry>date and time, including time zone</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -546,7 +546,7 @@ NUMERIC
|
|||||||
limit on precision. A column of this kind will not coerce input
|
limit on precision. A column of this kind will not coerce input
|
||||||
values to any particular scale, whereas <type>numeric</type> columns
|
values to any particular scale, whereas <type>numeric</type> columns
|
||||||
with a declared scale will coerce input values to that scale.
|
with a declared scale will coerce input values to that scale.
|
||||||
(The SQL standard requires a default scale of 0, ie, coercion to
|
(The SQL standard requires a default scale of 0, i.e., coercion to
|
||||||
integer accuracy. We find this a bit useless. If you're concerned about
|
integer accuracy. We find this a bit useless. If you're concerned about
|
||||||
portability, always specify the precision and scale explicitly.)
|
portability, always specify the precision and scale explicitly.)
|
||||||
</para>
|
</para>
|
||||||
@ -694,7 +694,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
|
|||||||
names <type>bigserial</type> and <type>serial8</type> work just
|
names <type>bigserial</type> and <type>serial8</type> work just
|
||||||
the same way, except that they create a <type>bigint</type>
|
the same way, except that they create a <type>bigint</type>
|
||||||
column. <type>bigserial</type> should be used if you anticipate
|
column. <type>bigserial</type> should be used if you anticipate
|
||||||
use of more than 2^31 identifiers over the lifetime of the table.
|
use of more than 2<superscript>31</> identifiers over the lifetime of the table.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -861,7 +861,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
The storage requirement for data of these types is 4 bytes plus
|
The storage requirement for data of these types is 4 bytes plus
|
||||||
the actual string, and in case of <type>character</type> plus the
|
the actual string, and in case of <type>character</type> plus the
|
||||||
padding. Long strings will be compressed by the system
|
padding. Long strings will be compressed by the system
|
||||||
automatically, so the physical requirement on-disk may be less.
|
automatically, so the physical requirement on disk may be less.
|
||||||
In any case, the longest possible character string
|
In any case, the longest possible character string
|
||||||
that can be stored is about 1 GB. (The maximum value that will be
|
that can be stored is about 1 GB. (The maximum value that will be
|
||||||
allowed for <replaceable>n</> in the data type declaration is
|
allowed for <replaceable>n</> in the data type declaration is
|
||||||
@ -1004,7 +1004,7 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
Octets of certain values <emphasis>must</emphasis> be escaped (but all
|
Octets of certain values <emphasis>must</emphasis> be escaped (but all
|
||||||
octet values <emphasis>may</emphasis> be escaped) when used as part of
|
octet values <emphasis>may</emphasis> be escaped) when used as part of
|
||||||
a string literal in an <acronym>SQL</acronym> statement. In general,
|
a string literal in an <acronym>SQL</acronym> statement. In general,
|
||||||
to escape an octet, it is converted into the three digit octal number
|
to escape an octet, it is converted into the three-digit octal number
|
||||||
equivalent of its decimal octet value, and preceded by two
|
equivalent of its decimal octet value, and preceded by two
|
||||||
backslashes. Some octet values have alternate escape sequences, as
|
backslashes. Some octet values have alternate escape sequences, as
|
||||||
shown in <xref linkend="datatype-binary-sqlesc">.
|
shown in <xref linkend="datatype-binary-sqlesc">.
|
||||||
@ -1112,12 +1112,12 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
<acronym>SQL</acronym> string literals (input strings) must be
|
<acronym>SQL</acronym> string literals (input strings) must be
|
||||||
preceded with two backslashes due to the fact that they must pass
|
preceded with two backslashes due to the fact that they must pass
|
||||||
through two parsers in the PostgreSQL backend. The first backslash
|
through two parsers in the PostgreSQL backend. The first backslash
|
||||||
is interpreted as an escape character by the string literal parser,
|
is interpreted as an escape character by the string-literal parser,
|
||||||
and therefore is consumed, leaving the octets that follow.
|
and therefore is consumed, leaving the octets that follow.
|
||||||
The remaining backslash is recognized by the <type>bytea</type> input
|
The remaining backslash is recognized by the <type>bytea</type> input
|
||||||
function as the prefix of a three digit octal value. For example, a string
|
function as the prefix of a three digit octal value. For example, a string
|
||||||
literal passed to the backend as <literal>'\\001'</literal> becomes
|
literal passed to the backend as <literal>'\\001'</literal> becomes
|
||||||
<literal>'\001'</literal> after passing through the string literal
|
<literal>'\001'</literal> after passing through the string-literal
|
||||||
parser. The <literal>'\001'</literal> is then sent to the
|
parser. The <literal>'\001'</literal> is then sent to the
|
||||||
<type>bytea</type> input function, where it is converted to a single
|
<type>bytea</type> input function, where it is converted to a single
|
||||||
octet with a decimal value of 1.
|
octet with a decimal value of 1.
|
||||||
@ -1127,12 +1127,12 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
For a similar reason, a backslash must be input as
|
For a similar reason, a backslash must be input as
|
||||||
<literal>'\\\\'</literal> (or <literal>'\\134'</literal>). The first
|
<literal>'\\\\'</literal> (or <literal>'\\134'</literal>). The first
|
||||||
and third backslashes are interpreted as escape characters by the
|
and third backslashes are interpreted as escape characters by the
|
||||||
string literal parser, and therefore are consumed, leaving two
|
string-literal parser, and therefore are consumed, leaving two
|
||||||
backslashes in the string passed to the <type>bytea</type> input function,
|
backslashes in the string passed to the <type>bytea</type> input function,
|
||||||
which interprets them as representing a single backslash.
|
which interprets them as representing a single backslash.
|
||||||
For example, a string literal passed to the
|
For example, a string literal passed to the
|
||||||
backend as <literal>'\\\\'</literal> becomes <literal>'\\'</literal>
|
backend as <literal>'\\\\'</literal> becomes <literal>'\\'</literal>
|
||||||
after passing through the string literal parser. The
|
after passing through the string-literal parser. The
|
||||||
<literal>'\\'</literal> is then sent to the <type>bytea</type> input
|
<literal>'\\'</literal> is then sent to the <type>bytea</type> input
|
||||||
function, where it is converted to a single octet with a decimal
|
function, where it is converted to a single octet with a decimal
|
||||||
value of 92.
|
value of 92.
|
||||||
@ -1147,7 +1147,7 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
<type>bytea</type> input function does <emphasis>not</emphasis>
|
<type>bytea</type> input function does <emphasis>not</emphasis>
|
||||||
recognize a single quote as a special octet. Therefore a string
|
recognize a single quote as a special octet. Therefore a string
|
||||||
literal passed to the backend as <literal>'\''</literal> becomes
|
literal passed to the backend as <literal>'\''</literal> becomes
|
||||||
<literal>'''</literal> after passing through the string literal
|
<literal>'''</literal> after passing through the string-literal
|
||||||
parser. The <literal>'''</literal> is then sent to the
|
parser. The <literal>'''</literal> is then sent to the
|
||||||
<type>bytea</type> input function, where it is retains its single
|
<type>bytea</type> input function, where it is retains its single
|
||||||
octet decimal value of 39.
|
octet decimal value of 39.
|
||||||
@ -1223,8 +1223,8 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
<entry> Operators operating on and returning binary strings
|
<entry> Operators operating on and returning binary strings
|
||||||
include concatenation, substring, overlay, and trim</entry>
|
include concatenation, substring, overlay, and trim</entry>
|
||||||
<entry> Operators operating on and returning binary strings
|
<entry> Operators operating on and returning binary strings
|
||||||
include concatenation, substring, and trim. The <literal>
|
include concatenation, substring, and trim. The
|
||||||
'leading'</literal> and <literal>'trailing'</literal>
|
<literal>leading</literal> and <literal>trailing</literal>
|
||||||
arguments for trim are not yet implemented.
|
arguments for trim are not yet implemented.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
@ -1327,12 +1327,12 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
Time zones, and time zone conventions, are influenced by
|
Time zones, and time-zone conventions, are influenced by
|
||||||
political conventions, not just physical effects. Time zones have
|
political conventions, not just physical effects. Time zones have
|
||||||
become somewhat standardized during the 1900's, but continue to
|
become somewhat standardized during the 1900's, but continue to
|
||||||
be prone to arbitrary changes with time.
|
be prone to arbitrary changes with time.
|
||||||
<productname>PostgreSQL</productname> uses your operating
|
<productname>PostgreSQL</productname> uses your operating
|
||||||
system's underlying features to provide time zone
|
system's underlying features to provide time-zone
|
||||||
support, and these systems usually contain information for only
|
support, and these systems usually contain information for only
|
||||||
the time period 1902 through 2038 (corresponding to the full
|
the time period 1902 through 2038 (corresponding to the full
|
||||||
range of conventional Unix system time).
|
range of conventional Unix system time).
|
||||||
@ -1364,7 +1364,7 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Date and time input is accepted in almost any reasonable format, including
|
Date and time input is accepted in almost any reasonable format, including
|
||||||
<acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible,
|
<acronym>ISO 8601</acronym>, <acronym>SQL</acronym>-compatible,
|
||||||
traditional <productname>PostgreSQL</productname>, and others.
|
traditional <productname>PostgreSQL</productname>, and others.
|
||||||
The ordering of month and day in date input can be ambiguous, therefore a setting
|
The ordering of month and day in date input can be ambiguous, therefore a setting
|
||||||
exists to specify how it should be interpreted in ambiguous cases. The command
|
exists to specify how it should be interpreted in ambiguous cases. The command
|
||||||
@ -1422,15 +1422,15 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>1/8/1999</entry>
|
<entry>1/8/1999</entry>
|
||||||
<entry>US; read as August 1 in European mode</entry>
|
<entry>U.S.; read as August 1 in European mode</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>8/1/1999</entry>
|
<entry>8/1/1999</entry>
|
||||||
<entry>European; read as August 1 in US mode</entry>
|
<entry>European; read as August 1 in U.S. mode</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>1/18/1999</entry>
|
<entry>1/18/1999</entry>
|
||||||
<entry>US; read as January 18 in any mode</entry>
|
<entry>U.S.; read as January 18 in any mode</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>19990108</entry>
|
<entry>19990108</entry>
|
||||||
@ -1600,19 +1600,19 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05:06.789</entry>
|
<entry>04:05:06.789</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05:06</entry>
|
<entry>04:05:06</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05</entry>
|
<entry>04:05</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>040506</entry>
|
<entry>040506</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05 AM</entry>
|
<entry>04:05 AM</entry>
|
||||||
@ -1679,19 +1679,19 @@ SELECT b, char_length(b) FROM test2;
|
|||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05:06.789-8</entry>
|
<entry>04:05:06.789-8</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05:06-08:00</entry>
|
<entry>04:05:06-08:00</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>04:05-08:00</entry>
|
<entry>04:05-08:00</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>040506-08</entry>
|
<entry>040506-08</entry>
|
||||||
<entry>ISO-8601</entry>
|
<entry>ISO 8601</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
@ -1911,8 +1911,9 @@ January 8 04:05:06 1999 PST
|
|||||||
|
|
||||||
<literal>'now'</literal> is
|
<literal>'now'</literal> is
|
||||||
evaluated when the value is first interpreted.
|
evaluated when the value is first interpreted.
|
||||||
|
</para>
|
||||||
|
|
||||||
<caution>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
As of <productname>PostgreSQL</> version 7.2,
|
As of <productname>PostgreSQL</> version 7.2,
|
||||||
<literal>'current'</literal> is no longer supported as a
|
<literal>'current'</literal> is no longer supported as a
|
||||||
@ -1920,11 +1921,10 @@ January 8 04:05:06 1999 PST
|
|||||||
Previously,
|
Previously,
|
||||||
<literal>'current'</literal> was stored as a special value,
|
<literal>'current'</literal> was stored as a special value,
|
||||||
and evaluated to <literal>'now'</literal> only when
|
and evaluated to <literal>'now'</literal> only when
|
||||||
used in a math operation or type
|
used in an expression or type
|
||||||
conversion.
|
conversion.
|
||||||
</para>
|
</para>
|
||||||
</caution>
|
</note>
|
||||||
</para>
|
|
||||||
</sect3>
|
</sect3>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -1945,7 +1945,7 @@ January 8 04:05:06 1999 PST
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Output formats can be set to one of the four styles
|
Output formats can be set to one of the four styles
|
||||||
ISO-8601, <acronym>SQL</acronym> (Ingres), traditional
|
ISO 8601, <acronym>SQL</acronym> (Ingres), traditional
|
||||||
PostgreSQL, and German, using the <command>SET DateStyle</command>.
|
PostgreSQL, and German, using the <command>SET DateStyle</command>.
|
||||||
The default is the <acronym>ISO</acronym> format.
|
The default is the <acronym>ISO</acronym> format.
|
||||||
|
|
||||||
@ -1993,14 +1993,14 @@ January 8 04:05:06 1999 PST
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <acronym>SQL</acronym> style has European and non-European
|
The <acronym>SQL</acronym> style has European and non-European
|
||||||
(US) variants,
|
(U.S.) variants,
|
||||||
which determines whether month follows day or vice versa. (See
|
which determines whether month follows day or vice versa. (See
|
||||||
also <xref linkend="datatype-datetime-input">
|
also <xref linkend="datatype-datetime-input">
|
||||||
for how this setting affects interpretation of
|
for how this setting affects interpretation of
|
||||||
input values.)
|
input values.)
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title>Date Order Conventions</title>
|
<title>Date-Order Conventions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="3">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
@ -2082,7 +2082,7 @@ January 8 04:05:06 1999 PST
|
|||||||
<type>time</type> type can.
|
<type>time</type> type can.
|
||||||
Time zones in the real world can have no meaning unless
|
Time zones in the real world can have no meaning unless
|
||||||
associated with a date as well as a time
|
associated with a date as well as a time
|
||||||
since the offset may vary through the year with daylight savings
|
since the offset may vary through the year with daylight-saving
|
||||||
time boundaries.
|
time boundaries.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -2090,7 +2090,7 @@ January 8 04:05:06 1999 PST
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The default time zone is specified as a constant integer offset
|
The default time zone is specified as a constant integer offset
|
||||||
from GMT/UTC. It is not possible to adapt to daylight savings
|
from GMT/UTC. It is not possible to adapt to daylight-saving
|
||||||
time when doing date/time arithmetic across
|
time when doing date/time arithmetic across
|
||||||
<acronym>DST</acronym> boundaries.
|
<acronym>DST</acronym> boundaries.
|
||||||
</para>
|
</para>
|
||||||
@ -2102,20 +2102,20 @@ January 8 04:05:06 1999 PST
|
|||||||
<para>
|
<para>
|
||||||
To address these difficulties, we recommend using date/time
|
To address these difficulties, we recommend using date/time
|
||||||
types that contain both date and time when using time zones. We
|
types that contain both date and time when using time zones. We
|
||||||
recommend <emphasis>not</emphasis> using the SQL92 type TIME
|
recommend <emphasis>not</emphasis> using the SQL92 type <type>time
|
||||||
WITH TIME ZONE (though it is supported by
|
with time zone</type> (though it is supported by
|
||||||
<productname>PostgreSQL</productname> for legacy applications and
|
<productname>PostgreSQL</productname> for legacy applications and
|
||||||
for compatibility with other RDBMS implementations).
|
for compatibility with other RDBMS implementations).
|
||||||
<productname>PostgreSQL</productname>
|
<productname>PostgreSQL</productname>
|
||||||
assumes local time for any type containing only
|
assumes local time for any type containing only
|
||||||
date or time. Further, time zone support is derived from
|
date or time. Further, time zone support is derived from
|
||||||
the underlying operating system
|
the underlying operating system
|
||||||
time zone capabilities, and hence can handle daylight savings time
|
time-zone capabilities, and hence can handle daylight-saving time
|
||||||
and other expected behavior.
|
and other expected behavior.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> obtains time zone support
|
<productname>PostgreSQL</productname> obtains time-zone support
|
||||||
from the underlying operating system for dates between 1902 and
|
from the underlying operating system for dates between 1902 and
|
||||||
2038 (near the typical date limits for Unix-style
|
2038 (near the typical date limits for Unix-style
|
||||||
systems). Outside of this range, all dates are assumed to be
|
systems). Outside of this range, all dates are assumed to be
|
||||||
@ -2131,7 +2131,7 @@ January 8 04:05:06 1999 PST
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
There are several ways to affect the time zone behavior:
|
There are several ways to affect the time-zone behavior:
|
||||||
|
|
||||||
<itemizedlist spacing="compact" mark="bullet">
|
<itemizedlist spacing="compact" mark="bullet">
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -2404,7 +2404,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term><replaceable>x</replaceable></term>
|
<term><replaceable>x</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The x-axis coordinate as a floating point number.
|
The x-axis coordinate as a floating-point number
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2413,7 +2413,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term><replaceable>y</replaceable></term>
|
<term><replaceable>y</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The y-axis coordinate as a floating point number.
|
The y-axis coordinate as a floating-point number
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2449,7 +2449,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The end points of the line segment.
|
The end points of the line segment
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2486,7 +2486,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Opposite corners of the box.
|
Opposite corners of the box
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2587,7 +2587,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
End points of the line segments comprising the boundary of the
|
End points of the line segments comprising the boundary of the
|
||||||
polygon.
|
polygon
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2627,7 +2627,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
|
<term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Center of the circle.
|
Center of the circle
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2636,7 +2636,7 @@ SELECT * FROM test1 WHERE a;
|
|||||||
<term><replaceable>r</replaceable></term>
|
<term><replaceable>r</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Radius of the circle.
|
Radius of the circle
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
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
|
|||||||
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
|
|||||||
<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
|
|||||||
</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
|
|||||||
<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
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
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
|
|||||||
<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>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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);
|
|||||||
</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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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 @@
|
|||||||
<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>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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
|
|||||||
<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
|
|||||||
|
|
||||||
<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
|
|||||||
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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
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.
|
|||||||
<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.
|
|||||||
<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.
|
|||||||
|
|
||||||
<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 \
|
|||||||
<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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
</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
|
|||||||
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.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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>
|
|||||||
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>
|
|||||||
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
|
|||||||
initlocation PGDATA2
|
initlocation PGDATA2
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
The you can restart the server.
|
Then you can restart the server.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
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
|
|||||||
</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
|
|||||||
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
|
|||||||
<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.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
</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
|
|||||||
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
|
|||||||
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>
|
||||||
|
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<!-- $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;
|
|||||||
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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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)
|
|||||||
</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)
|
|||||||
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';
|
|||||||
<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 *
|
|||||||
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)
|
|||||||
</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)
|
|||||||
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 @@
|
|||||||
|
|
||||||
<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 @@
|
|||||||
|
|
||||||
</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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
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
|
|||||||
<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
|
|||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
|
|
||||||
<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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
</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
|
|||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
</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
|
|||||||
<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
|
|||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
</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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
|
|
||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<para>
|
<para>
|
||||||
The preprocessor will prepend two directives to the source:
|
The preprocessor will prepend two directives to the source:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#include <ecpgtype.h>
|
#include <ecpgtype.h>
|
||||||
#include <ecpglib.h>
|
#include <ecpglib.h>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
@ -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];
|
|||||||
<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;
|
|||||||
<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>;
|
|||||||
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>
|
||||||
<tcp|unix>:postgresql://<replaceable>server</replaceable>[:<replaceable>port</replaceable>][/<replaceable>dbname</replaceable>][?<replaceable>options</replaceable>]
|
<tcp|unix>: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>;
|
|||||||
<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;
|
|||||||
<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;
|
|||||||
...
|
...
|
||||||
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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
</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>
|
||||||
|
|
||||||
@ -198,6 +198,15 @@ Postgres documentation
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-s</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Only print errors, no informational messages.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-w</term>
|
<term>-w</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -217,15 +226,6 @@ Postgres documentation
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-s</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Only print errors, no informational messages.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
@ -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
|
|||||||
|
|
||||||
<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
|
|||||||
<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
|
|||||||
|
|
||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
<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
|
|||||||
</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
|
|||||||
</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
|
|||||||
</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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
</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
|
|||||||
</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
|
|||||||
<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
|
|||||||
</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
|
|||||||
<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
|
|||||||
<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).
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
|
|
||||||
<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
|
|||||||
<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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
|
|
||||||
<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>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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 @@
|
|||||||
|
|
||||||
<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 @@
|
|||||||
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 @@
|
|||||||
<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 @@
|
|||||||
<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
|
|||||||
<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.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
</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
|
|||||||
|
|
||||||
<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
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
</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"]
|
|||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
<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
|
|||||||
</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
|
|||||||
|
|
||||||
<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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
<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
|
|||||||
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
|
|||||||
<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
|
|||||||
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">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
|
|
||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
<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
|
|||||||
|
|
||||||
<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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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 @@
|
|||||||
<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 <build top-level directory></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 @@
|
|||||||
|
|
||||||
<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
|
|||||||
|
|
||||||
<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
|
|||||||
|
|
||||||
<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,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.98 2001/11/28 00:13:30 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.99 2001/11/28 20:49:10 petere Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -74,7 +74,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.98 2001/11/28 00:13:30 mom
|
|||||||
file system location of your database system is indicated by the
|
file system location of your database system is indicated by the
|
||||||
<option>-D</option> option, for example
|
<option>-D</option> option, for example
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
<prompt>$</> <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
Note that you must execute this command while being logged in to
|
Note that you must execute this command while being logged in to
|
||||||
the <productname>PostgreSQL</productname> user account, which is described in the previous
|
the <productname>PostgreSQL</productname> user account, which is described in the previous
|
||||||
@ -102,7 +102,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.98 2001/11/28 00:13:30 mom
|
|||||||
root# <userinput>mkdir /usr/local/pgsql/data</userinput>
|
root# <userinput>mkdir /usr/local/pgsql/data</userinput>
|
||||||
root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
|
root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
|
||||||
root# <userinput>su postgres</userinput>
|
root# <userinput>su postgres</userinput>
|
||||||
postgres> <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ NOTICE: Initializing database with en_US collation order.
|
|||||||
<literal>LC_ALL</literal> or <literal>LANG</literal>. The sort order used
|
<literal>LC_ALL</literal> or <literal>LANG</literal>. The sort order used
|
||||||
within a particular database cluster is set by <command>initdb</command>
|
within a particular database cluster is set by <command>initdb</command>
|
||||||
and cannot be changed later, short of dumping all data, rerunning <command>initdb</command>,
|
and cannot be changed later, short of dumping all data, rerunning <command>initdb</command>,
|
||||||
reload data. So it's important to make this choice correctly now.
|
and reloading the data. So it's important to make this choice correctly now.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ NOTICE: Initializing database with en_US collation order.
|
|||||||
to work on. This is done with the <option>-D</option> option. Thus,
|
to work on. This is done with the <option>-D</option> option. Thus,
|
||||||
the simplest way to start the server is, for example,
|
the simplest way to start the server is, for example,
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>postmaster -D /usr/local/pgsql/data</userinput>
|
$ <userinput>postmaster -D /usr/local/pgsql/data</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
which will leave the server running in the foreground. This must
|
which will leave the server running in the foreground. This must
|
||||||
again be done while logged in to the <productname>PostgreSQL</productname> user account. Without
|
again be done while logged in to the <productname>PostgreSQL</productname> user account. Without
|
||||||
@ -182,13 +182,13 @@ NOTICE: Initializing database with en_US collation order.
|
|||||||
To start the <application>postmaster</application> in the
|
To start the <application>postmaster</application> in the
|
||||||
background, use the usual shell syntax:
|
background, use the usual shell syntax:
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>postmaster -D /usr/local/pgsql/data > logfile 2>&1 &</userinput>
|
$ <userinput>postmaster -D /usr/local/pgsql/data > logfile 2>&1 &</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
It is an extremely good idea to keep the server's stdout and stderr
|
It is an extremely good idea to keep the server's stdout and stderr
|
||||||
output around somewhere, as suggested here. It will help both for auditing
|
output around somewhere, as suggested here. It will help both for auditing
|
||||||
purposes and to diagnose problems.
|
purposes and to diagnose problems.
|
||||||
(See <xref linkend="logfile-maintenance"> for a more thorough discussion
|
(See <xref linkend="logfile-maintenance"> for a more thorough discussion
|
||||||
of logfile handling.)
|
of log file handling.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -196,8 +196,8 @@ NOTICE: Initializing database with en_US collation order.
|
|||||||
<primary>TCP/IP</primary>
|
<primary>TCP/IP</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
The postmaster also takes a number of other command line options.
|
The postmaster also takes a number of other command line options.
|
||||||
For more information see the reference page and below under runtime
|
For more information see the reference page and <xref linkend="runtime-config"> below.
|
||||||
configuration. In particular, in order for the postmaster to accept
|
In particular, in order for the server to accept
|
||||||
TCP/IP connections (rather than just Unix domain socket ones), you
|
TCP/IP connections (rather than just Unix domain socket ones), you
|
||||||
must also specify the <option>-i</option> option.
|
must also specify the <option>-i</option> option.
|
||||||
</para>
|
</para>
|
||||||
@ -347,7 +347,7 @@ FATAL: StreamServerPort: bind() failed: Address already in use
|
|||||||
example, trying to start a postmaster on a reserved port number
|
example, trying to start a postmaster on a reserved port number
|
||||||
may draw something like
|
may draw something like
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>postmaster -i -p 666</userinput>
|
$ <userinput>postmaster -i -p 666</userinput>
|
||||||
FATAL: StreamServerPort: bind() failed: Permission denied
|
FATAL: StreamServerPort: bind() failed: Permission denied
|
||||||
Is another postmaster already running on that port?
|
Is another postmaster already running on that port?
|
||||||
</screen>
|
</screen>
|
||||||
@ -405,7 +405,7 @@ IpcSemaphoreCreate: semget(key=5440026, num=16, 01600) failed: No space left on
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Although the possible error conditions on the client side are
|
Although the possible error conditions on the client side are
|
||||||
both virtually infinite and application dependent, a few of them
|
both virtually infinite and application-dependent, a few of them
|
||||||
might be directly related to how the server was started up.
|
might be directly related to how the server was started up.
|
||||||
Conditions other than those shown below should be documented with
|
Conditions other than those shown below should be documented with
|
||||||
the respective client application.
|
the respective client application.
|
||||||
@ -420,7 +420,7 @@ psql: could not connect to server: Connection refused
|
|||||||
This is the generic <quote>I couldn't find a server to talk
|
This is the generic <quote>I couldn't find a server to talk
|
||||||
to</quote> failure. It looks like the above when TCP/IP
|
to</quote> failure. It looks like the above when TCP/IP
|
||||||
communication is attempted. A common mistake is to forget the
|
communication is attempted. A common mistake is to forget the
|
||||||
<option>-i</option> to the postmaster to allow TCP/IP
|
<option>-i</option> option to allow the postmaster to accept TCP/IP
|
||||||
connections.
|
connections.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ env PGOPTIONS='-c geqo=off' psql
|
|||||||
<term><varname>ENABLE_INDEXSCAN</varname> (<type>boolean</type>)</term>
|
<term><varname>ENABLE_INDEXSCAN</varname> (<type>boolean</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Enables or disables the query planner's use of index scan plan
|
Enables or disables the query planner's use of index-scan plan
|
||||||
types. The default is on. This is mostly useful to debug the
|
types. The default is on. This is mostly useful to debug the
|
||||||
query planner.
|
query planner.
|
||||||
</para>
|
</para>
|
||||||
@ -739,8 +739,8 @@ env PGOPTIONS='-c geqo=off' psql
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use genetic query optimization to plan queries with at least
|
Use genetic query optimization to plan queries with at least
|
||||||
this many FROM items involved. (Note that a JOIN construct
|
this many <literal>FROM</> items involved. (Note that a <literal>JOIN</> construct
|
||||||
counts as only one FROM item.) The default is 11. For simpler
|
counts as only one <literal>FROM</> item.) The default is 11. For simpler
|
||||||
queries it is usually best to use the
|
queries it is usually best to use the
|
||||||
deterministic, exhaustive planner. This parameter also controls
|
deterministic, exhaustive planner. This parameter also controls
|
||||||
how hard the optimizer will try to merge subquery
|
how hard the optimizer will try to merge subquery
|
||||||
@ -755,12 +755,12 @@ env PGOPTIONS='-c geqo=off' psql
|
|||||||
<para>
|
<para>
|
||||||
The <firstterm>Key Set Query Optimizer</firstterm>
|
The <firstterm>Key Set Query Optimizer</firstterm>
|
||||||
(<acronym>KSQO</acronym>) causes the query planner to convert
|
(<acronym>KSQO</acronym>) causes the query planner to convert
|
||||||
queries whose WHERE clause contains many OR'ed AND clauses
|
queries whose <literal>WHERE</> clause contains many OR'ed AND clauses
|
||||||
(such as <literal>WHERE (a=1 AND b=2) OR (a=2 AND b=3)
|
(such as <literal>WHERE (a=1 AND b=2) OR (a=2 AND b=3)
|
||||||
...</literal>) into a UNION query. This method can be faster
|
...</literal>) into a union query. This method can be faster
|
||||||
than the default implementation, but it doesn't necessarily
|
than the default implementation, but it doesn't necessarily
|
||||||
give exactly the same results, since UNION implicitly adds a
|
give exactly the same results, since <literal>UNION</> implicitly adds a
|
||||||
SELECT DISTINCT clause to eliminate identical output rows.
|
<literal>SELECT DISTINCT</> clause to eliminate identical output rows.
|
||||||
<acronym>KSQO</acronym> is commonly used when working with products like
|
<acronym>KSQO</acronym> is commonly used when working with products like
|
||||||
<productname>Microsoft Access</productname>, which tend to
|
<productname>Microsoft Access</productname>, which tend to
|
||||||
generate queries of this form.
|
generate queries of this form.
|
||||||
@ -771,7 +771,7 @@ env PGOPTIONS='-c geqo=off' psql
|
|||||||
with many OR'ed AND clauses, but in
|
with many OR'ed AND clauses, but in
|
||||||
<productname>PostgreSQL</productname> 7.0 and later the standard
|
<productname>PostgreSQL</productname> 7.0 and later the standard
|
||||||
planner handles these queries fairly successfully. Hence the
|
planner handles these queries fairly successfully. Hence the
|
||||||
default is OFF.
|
default is off.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -815,7 +815,7 @@ env PGOPTIONS='-c geqo=off' psql
|
|||||||
To use this option, the macro <literal>USE_ASSERT_CHECKING</literal>
|
To use this option, the macro <literal>USE_ASSERT_CHECKING</literal>
|
||||||
must be defined when <productname>PostgreSQL</productname> is built (see the configure option
|
must be defined when <productname>PostgreSQL</productname> is built (see the configure option
|
||||||
<literal>--enable-cassert</literal>). Note that
|
<literal>--enable-cassert</literal>). Note that
|
||||||
<literal>DEBUG_ASSERTIONS</literal> defaults to ON if <productname>PostgreSQL</productname>
|
<literal>DEBUG_ASSERTIONS</literal> defaults to on if <productname>PostgreSQL</productname>
|
||||||
has been built this way.
|
has been built this way.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -1612,7 +1612,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Minimum number of concurrent open transactions to require before
|
Minimum number of concurrent open transactions to require before
|
||||||
performing the COMMIT_DELAY delay. A larger value makes it more
|
performing the <varname>COMMIT_DELAY</> delay. A larger value makes it more
|
||||||
probable that at least one other transaction will become ready to
|
probable that at least one other transaction will become ready to
|
||||||
commit during the delay interval.
|
commit during the delay interval.
|
||||||
</para>
|
</para>
|
||||||
@ -1765,7 +1765,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
passed to the individual backend process via the
|
passed to the individual backend process via the
|
||||||
<option>-o</option> postmaster option, for example,
|
<option>-o</option> postmaster option, for example,
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>postmaster -o '-S 1024 -s'</userinput>
|
$ <userinput>postmaster -o '-S 1024 -s'</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
or via <envar>PGOPTIONS</envar> from the client side, as explained
|
or via <envar>PGOPTIONS</envar> from the client side, as explained
|
||||||
above.
|
above.
|
||||||
@ -2382,7 +2382,7 @@ default:\
|
|||||||
<filename>postmaster.pid</filename> in the data directory. So for
|
<filename>postmaster.pid</filename> in the data directory. So for
|
||||||
example, to do a fast shutdown:
|
example, to do a fast shutdown:
|
||||||
<screen>
|
<screen>
|
||||||
> <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput>
|
$ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -2404,24 +2404,24 @@ default:\
|
|||||||
<acronym>SSL</> to encrypt
|
<acronym>SSL</> to encrypt
|
||||||
client/server communications for increased security. This requires
|
client/server communications for increased security. This requires
|
||||||
<productname>OpenSSL</productname> to be installed on both client
|
<productname>OpenSSL</productname> to be installed on both client
|
||||||
and server systems and support enabled at build-time (see <xref
|
and server systems and support enabled at build time (see <xref
|
||||||
linkend="installation">).
|
linkend="installation">).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
With SSL support compiled in, the <productname>PostgreSQL</> server
|
With SSL support compiled in, the <productname>PostgreSQL</> server
|
||||||
can be started with the argument <option>-l</> (ell) to enable
|
can be started with the argument <option>-l</> (ell) to enable
|
||||||
SSL connections. When starting in SSL mode, the postmaster will look
|
SSL connections. When starting in SSL mode, the server will look
|
||||||
for the files <filename>server.key</> and <filename>server.crt</> in
|
for the files <filename>server.key</> and <filename>server.crt</> in
|
||||||
the data directory. These files should contain the server private key
|
the data directory. These files should contain the server private key
|
||||||
and certificate respectively. These files must be set up correctly
|
and certificate respectively. These files must be set up correctly
|
||||||
before an SSL-enabled server can start. If the private key is protected
|
before an SSL-enabled server can start. If the private key is protected
|
||||||
with a passphrase, the postmaster will prompt for the passphrase and will
|
with a passphrase, the server will prompt for the passphrase and will
|
||||||
not start until it has been entered.
|
not start until it has been entered.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The postmaster will listen for both standard and SSL connections
|
The server will listen for both standard and SSL connections
|
||||||
on the same TCP/IP port, and will negotiate with any connecting
|
on the same TCP/IP port, and will negotiate with any connecting
|
||||||
client whether or not to use SSL.
|
client whether or not to use SSL.
|
||||||
See <xref linkend="client-authentication">
|
See <xref linkend="client-authentication">
|
||||||
@ -2434,7 +2434,7 @@ default:\
|
|||||||
refer to the <productname>OpenSSL</> documentation. A simple self-signed
|
refer to the <productname>OpenSSL</> documentation. A simple self-signed
|
||||||
certificate can be used to get started for testing, but a certificate signed
|
certificate can be used to get started for testing, but a certificate signed
|
||||||
by a <acronym>CA</> (either one of the global <acronym>CAs</> or a local one) should be used in
|
by a <acronym>CA</> (either one of the global <acronym>CAs</> or a local one) should be used in
|
||||||
production so the client can verify the servers identity. To create
|
production so the client can verify the server's identity. To create
|
||||||
a quick self-signed certificate, use the following <productname>OpenSSL</productname> command:
|
a quick self-signed certificate, use the following <productname>OpenSSL</productname> command:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
openssl req -new -text -out cert.req
|
openssl req -new -text -out cert.req
|
||||||
@ -2444,7 +2444,7 @@ openssl req -new -text -out cert.req
|
|||||||
left blank. The script will generate a key that is passphrase protected;
|
left blank. The script will generate a key that is passphrase protected;
|
||||||
it will not accept a pass phrase that is less than four characters long.
|
it will not accept a pass phrase that is less than four characters long.
|
||||||
To remove the passphrase (as you must if you want automatic start-up of
|
To remove the passphrase (as you must if you want automatic start-up of
|
||||||
the postmaster), run the commands
|
the server), run the commands
|
||||||
<programlisting>
|
<programlisting>
|
||||||
openssl rsa -in privkey.pem -out cert.pem
|
openssl rsa -in privkey.pem -out cert.pem
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -2455,7 +2455,7 @@ cp cert.pem <replaceable>$PGDATA</replaceable>/server.key
|
|||||||
cp cert.cert <replaceable>$PGDATA</replaceable>/server.crt
|
cp cert.cert <replaceable>$PGDATA</replaceable>/server.crt
|
||||||
</programlisting>
|
</programlisting>
|
||||||
to turn the certificate into a self-signed certificate and to copy the
|
to turn the certificate into a self-signed certificate and to copy the
|
||||||
key and certificate to where the postmaster will look for them.
|
key and certificate to where the server will look for them.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -2489,12 +2489,12 @@ cp cert.cert <replaceable>$PGDATA</replaceable>/server.crt
|
|||||||
<command>ssh</command> as some user. Then you can establish a secure tunnel with a
|
<command>ssh</command> as some user. Then you can establish a secure tunnel with a
|
||||||
command like this from the client machine:
|
command like this from the client machine:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
> <userinput>ssh -L 3333:foo.com:5432 joe@foo.com</userinput>
|
$ <userinput>ssh -L 3333:foo.com:5432 joe@foo.com</userinput>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The first number in the <option>-L</option> argument, 3333, is the
|
The first number in the <option>-L</option> argument, 3333, is the
|
||||||
port number of your end of the tunnel; it can be chosen freely. The
|
port number of your end of the tunnel; it can be chosen freely. The
|
||||||
second number, 5432, is the remote end of the tunnel -- the port
|
second number, 5432, is the remote end of the tunnel -- the port
|
||||||
number your backend is using. The name or the address in between
|
number your server is using. The name or the address in between
|
||||||
the port numbers is the host with the database server you are going
|
the port numbers is the host with the database server you are going
|
||||||
to connect to. In order to connect to the database server using
|
to connect to. In order to connect to the database server using
|
||||||
this tunnel, you connect to port 3333 on the local machine:
|
this tunnel, you connect to port 3333 on the local machine:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
|||||||
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
|
|||||||
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>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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> )
|
|||||||
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> )
|
|||||||
|
|
||||||
<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> )
|
|||||||
|
|
||||||
<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.
|
|||||||
|
|
||||||
<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
|
|||||||
<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);
|
|||||||
<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>
|
|||||||
</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>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $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 @@
|
|||||||
|
|
||||||
<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 @@
|
|||||||
<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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
</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>
|
||||||
|
Reference in New Issue
Block a user