mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Fixups in content and markup for 7.0 release.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.13 2000/01/14 22:11:31 petere Exp $
|
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.14 2000/05/02 20:01:51 thomas Exp $
|
||||||
#
|
#
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -67,17 +67,18 @@ vpath %.sgml ./ref
|
|||||||
|
|
||||||
MANSOURCES= $(wildcard ref/*.sgml)
|
MANSOURCES= $(wildcard ref/*.sgml)
|
||||||
|
|
||||||
APPLICATIONS= createdb.sgml createuser.sgml \
|
APPLICATIONS= createdb.sgml createlang.sgml createuser.sgml \
|
||||||
createlang.sgml \
|
dropdb.sgml droplang.sgml dropuser.sgml \
|
||||||
dropdb.sgml dropuser.sgml \
|
ecpg-ref.sgml \
|
||||||
droplang.sgml \
|
|
||||||
initdb.sgml initlocation.sgml \
|
initdb.sgml initlocation.sgml \
|
||||||
ipcclean.sgml \
|
ipcclean.sgml \
|
||||||
pg_dump.sgml \
|
pg_dump.sgml \
|
||||||
pg_dumpall.sgml \
|
pg_dumpall.sgml \
|
||||||
|
pg_passwd.sgml \
|
||||||
pg_upgrade.sgml \
|
pg_upgrade.sgml \
|
||||||
pgaccess-ref.sgml \
|
pgaccess-ref.sgml \
|
||||||
pgadmin-ref.sgml \
|
pgadmin-ref.sgml \
|
||||||
|
pgctl-ref.sgml \
|
||||||
pgtclsh.sgml \
|
pgtclsh.sgml \
|
||||||
pgtksh.sgml \
|
pgtksh.sgml \
|
||||||
postgres-ref.sgml \
|
postgres-ref.sgml \
|
||||||
@ -87,8 +88,9 @@ APPLICATIONS= createdb.sgml createuser.sgml \
|
|||||||
|
|
||||||
COMMANDS= abort.sgml alter_group.sgml alter_table.sgml alter_user.sgml \
|
COMMANDS= abort.sgml alter_group.sgml alter_table.sgml alter_user.sgml \
|
||||||
begin.sgml \
|
begin.sgml \
|
||||||
close.sgml cluster.sgml commit.sgml copy.sgml \
|
close.sgml cluster.sgml comment.sgml commit.sgml copy.sgml \
|
||||||
create_aggregate.sgml create_database.sgml create_function.sgml create_group.sgml \
|
create_aggregate.sgml create_constraint.sgml create_database.sgml \
|
||||||
|
create_function.sgml create_group.sgml \
|
||||||
create_index.sgml \
|
create_index.sgml \
|
||||||
create_language.sgml create_operator.sgml create_rule.sgml create_sequence.sgml \
|
create_language.sgml create_operator.sgml create_rule.sgml create_sequence.sgml \
|
||||||
create_table.sgml create_table_as.sgml create_trigger.sgml create_type.sgml \
|
create_table.sgml create_table_as.sgml create_trigger.sgml create_type.sgml \
|
||||||
@ -98,12 +100,12 @@ COMMANDS= abort.sgml alter_group.sgml alter_table.sgml alter_user.sgml \
|
|||||||
drop_index.sgml \
|
drop_index.sgml \
|
||||||
drop_language.sgml drop_operator.sgml drop_rule.sgml drop_sequence.sgml \
|
drop_language.sgml drop_operator.sgml drop_rule.sgml drop_sequence.sgml \
|
||||||
drop_table.sgml drop_trigger.sgml drop_type.sgml drop_user.sgml drop_view.sgml \
|
drop_table.sgml drop_trigger.sgml drop_type.sgml drop_user.sgml drop_view.sgml \
|
||||||
explain.sgml fetch.sgml grant.sgml \
|
end.sgml explain.sgml fetch.sgml grant.sgml \
|
||||||
insert.sgml listen.sgml load.sgml lock.sgml move.sgml \
|
insert.sgml listen.sgml load.sgml lock.sgml move.sgml \
|
||||||
notify.sgml \
|
notify.sgml \
|
||||||
reset.sgml revoke.sgml rollback.sgml \
|
reindex.sgml reset.sgml revoke.sgml rollback.sgml \
|
||||||
select.sgml select_into.sgml set.sgml show.sgml \
|
select.sgml select_into.sgml set.sgml show.sgml \
|
||||||
unlisten.sgml update.sgml vacuum.sgml
|
truncate.sgml unlisten.sgml update.sgml vacuum.sgml
|
||||||
|
|
||||||
FUNCTIONS= current_date.sgml current_time.sgml current_timestamp.sgml current_user.sgml
|
FUNCTIONS= current_date.sgml current_time.sgml current_timestamp.sgml current_user.sgml
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.21 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.22 2000/05/02 20:01:51 thomas Exp $
|
||||||
|
|
||||||
Postgres Administrator's Guide.
|
Postgres Administrator's Guide.
|
||||||
Derived from postgres.sgml.
|
Derived from postgres.sgml.
|
||||||
@ -34,27 +34,27 @@ Derived from postgres.sgml.
|
|||||||
<!entity biblio SYSTEM "biblio.sgml">
|
<!entity biblio SYSTEM "biblio.sgml">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<Book Id="admin">
|
<book id="admin">
|
||||||
|
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<Title>PostgreSQL Administrator's Guide</Title>
|
<title>PostgreSQL Administrator's Guide</title>
|
||||||
<BookInfo>
|
<bookinfo>
|
||||||
<ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<BookBiblio>
|
<bookbiblio>
|
||||||
<AuthorGroup>
|
<authorgroup>
|
||||||
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
</AuthorGroup>
|
</authorgroup>
|
||||||
<!-- editor in authorgroup is not supported
|
<!-- editor in authorgroup is not supported
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
-->
|
-->
|
||||||
<Editor>
|
<editor>
|
||||||
<FirstName>Thomas</FirstName>
|
<firstname>Thomas</firstname>
|
||||||
<SurName>Lockhart</SurName>
|
<surname>Lockhart</surname>
|
||||||
<Affiliation>
|
<affiliation>
|
||||||
<OrgName>Caltech/JPL</OrgName>
|
<orgname>Caltech/JPL</orgname>
|
||||||
</Affiliation>
|
</affiliation>
|
||||||
</Editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
@ -63,17 +63,17 @@ Derived from postgres.sgml.
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Date>(last updated 1999-06-01)</Date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</BookBiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<LegalNotice>
|
<legalnotice>
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</Para>
|
</para>
|
||||||
</LegalNotice>
|
</legalnotice>
|
||||||
|
|
||||||
</BookInfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -88,20 +88,20 @@ Your name here...
|
|||||||
</Dedication>
|
</Dedication>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Preface id="preface">
|
<preface id="preface">
|
||||||
<Title>Summary</Title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<ProductName>PostgreSQL</ProductName> is an open-source descendant
|
<productname>PostgreSQL</productname> is an open-source descendant
|
||||||
of this original Berkeley code.
|
of this original Berkeley code.
|
||||||
</Para>
|
</para>
|
||||||
</Preface>
|
</preface>
|
||||||
|
|
||||||
&intro-ag;
|
&intro-ag;
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ Don't bother with an index until we get some index entries.
|
|||||||
</index>
|
</index>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Book>
|
</book>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.11 2000/04/11 05:39:06 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.12 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="advanced">
|
<chapter id="advanced">
|
||||||
@ -103,12 +103,12 @@ SELECT c.name, c.altitude
|
|||||||
+----------+----------+
|
+----------+----------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Here the <quote>*</quote> after cities indicates that the query should
|
Here the "*" after cities indicates that the query should
|
||||||
be run over cities and all classes below cities in the
|
be run over cities and all classes below cities in the
|
||||||
inheritance hierarchy. Many of the commands that we
|
inheritance hierarchy. Many of the commands that we
|
||||||
have already discussed (<command>SELECT</command>,
|
have already discussed (<command>SELECT</command>,
|
||||||
<command>UPDATE</command> and <command>DELETE</command>)
|
<command>UPDATE</command> and <command>DELETE</command>)
|
||||||
support this <quote>*</quote> notation, as do others, like
|
support this inheritance notation using "*" as do other commands like
|
||||||
<command>ALTER</command>.
|
<command>ALTER</command>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.13 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<bibliography id="biblio">
|
<bibliography id="biblio">
|
||||||
@ -15,7 +15,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<productname>Postgres</productname> development team
|
<productname>Postgres</productname> development team
|
||||||
are available at
|
are available at
|
||||||
<ulink url="http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/">
|
<ulink url="http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/">
|
||||||
http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/</ulink>
|
the University of California, Berkeley, Computer Science
|
||||||
|
Department web site</ulink>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<bibliodiv>
|
<bibliodiv>
|
||||||
@ -235,7 +236,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
</editor>
|
</editor>
|
||||||
|
|
||||||
<pubdate>1998-10-01</pubdate>
|
<pubdate>2000-05-01</pubdate>
|
||||||
<publisher>
|
<publisher>
|
||||||
<publishername>The PostgreSQL Global Development Group</publishername>
|
<publishername>The PostgreSQL Global Development Group</publishername>
|
||||||
</publisher>
|
</publisher>
|
||||||
@ -261,7 +262,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
</editor>
|
</editor>
|
||||||
|
|
||||||
<pubdate>1998-10-01</pubdate>
|
<pubdate>2000-05-01</pubdate>
|
||||||
<publisher>
|
<publisher>
|
||||||
<publishername>The PostgreSQL Global Development Group</publishername>
|
<publishername>The PostgreSQL Global Development Group</publishername>
|
||||||
</publisher>
|
</publisher>
|
||||||
@ -287,7 +288,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
</editor>
|
</editor>
|
||||||
|
|
||||||
<pubdate>1998-10-01</pubdate>
|
<pubdate>2000-05-01</pubdate>
|
||||||
<publisher>
|
<publisher>
|
||||||
<publishername>The PostgreSQL Global Development Group</publishername>
|
<publishername>The PostgreSQL Global Development Group</publishername>
|
||||||
</publisher>
|
</publisher>
|
||||||
@ -313,7 +314,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
</editor>
|
</editor>
|
||||||
|
|
||||||
<pubdate>1998-10-01</pubdate>
|
<pubdate>2000-05-01</pubdate>
|
||||||
<publisher>
|
<publisher>
|
||||||
<publishername>The PostgreSQL Global Development Group</publishername>
|
<publishername>The PostgreSQL Global Development Group</publishername>
|
||||||
</publisher>
|
</publisher>
|
||||||
@ -339,7 +340,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thom
|
|||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
</editor>
|
</editor>
|
||||||
|
|
||||||
<pubdate>1998-10-01</pubdate>
|
<pubdate>2000-05-01</pubdate>
|
||||||
<publisher>
|
<publisher>
|
||||||
<publishername>The PostgreSQL Global Development Group</publishername>
|
<publishername>The PostgreSQL Global Development Group</publishername>
|
||||||
</publisher>
|
</publisher>
|
||||||
@ -585,6 +586,7 @@ http://simon.cs.cornell.edu/home/praveen/papers/partindex.de95.ps.Z
|
|||||||
</ulink>
|
</ulink>
|
||||||
</title>
|
</title>
|
||||||
<titleabbrev id="SESHADRI95">
|
<titleabbrev id="SESHADRI95">
|
||||||
|
Seshardri, 1995
|
||||||
</titleabbrev>
|
</titleabbrev>
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.2 1998/12/29 02:24:13 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.3 2000/05/02 20:01:51 thomas Exp $
|
||||||
|
|
||||||
Transcribed from the original bki.man.5 documentation
|
Transcribed from the original bki.man.5 documentation
|
||||||
- Thomas Lockhart 1998-08-03
|
- Thomas Lockhart 1998-08-03
|
||||||
@ -37,25 +37,28 @@ Related information may be found in documentation for
|
|||||||
and the <acronym>SQL</acronym> command <command>CREATE DATABASE</command>.
|
and the <acronym>SQL</acronym> command <command>CREATE DATABASE</command>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title><acronym>BKI</acronym> File Format</title>
|
<title><acronym>BKI</acronym> File Format</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <productname>Postgres</productname> backend interprets <acronym>BKI</acronym> files as described below. This
|
The <productname>Postgres</productname> backend interprets
|
||||||
description will be easier to understand if the <filename>global1.bki.source</filename> file is
|
<acronym>BKI</acronym> files as described below. This
|
||||||
at hand as an example. (As explained above, this .source file isn't quite
|
description will be easier to understand if the
|
||||||
a <acronym>BKI</acronym> file, but you'll be able to guess what the resulting <acronym>BKI</acronym> file would be
|
<filename>global1.bki.source</filename> file is
|
||||||
anyway).
|
at hand as an example. (As explained above, this .source file isn't quite
|
||||||
</para>
|
a <acronym>BKI</acronym> file, but you'll be able to guess what
|
||||||
|
the resulting <acronym>BKI</acronym> file would be
|
||||||
|
anyway).
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Commands are composed of a command name followed by space separated
|
Commands are composed of a command name followed by space separated
|
||||||
arguments. Arguments to a command which begin with a <quote>$</quote> are
|
arguments. Arguments to a command which begin with a "$" are
|
||||||
treated specially. If <quote>$$</quote> are the first two characters, then
|
treated specially. If "$$" are the first two characters, then
|
||||||
the first <quote>$</quote> is ignored and the argument is then processed
|
the first "$" is ignored and the argument is then processed
|
||||||
normally. If the <quote>$</quote> is followed by space, then it is treated
|
normally. If the "$" is followed by space, then it is treated
|
||||||
as a NULL
|
as a NULL
|
||||||
value. Otherwise, the characters following the <quote>$</quote> are
|
value. Otherwise, the characters following the "$" are
|
||||||
interpreted as the name of a macro causing the argument to be replaced
|
interpreted as the name of a macro causing the argument to be replaced
|
||||||
with the macro's value. It is an error for this macro to be
|
with the macro's value. It is an error for this macro to be
|
||||||
undefined.
|
undefined.
|
||||||
@ -137,7 +140,7 @@ etc., for its attribute values and
|
|||||||
<replaceable class="parameter">oid_value</replaceable>
|
<replaceable class="parameter">oid_value</replaceable>
|
||||||
for its OID. If
|
for its OID. If
|
||||||
<replaceable class="parameter">oid_value</replaceable>
|
<replaceable class="parameter">oid_value</replaceable>
|
||||||
is not <quote>0</quote>, then this value will be used as the instance's
|
is not zero (0), then this value will be used as the instance's
|
||||||
object identifier. Otherwise, it is an error.
|
object identifier. Otherwise, it is an error.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -398,7 +401,7 @@ to
|
|||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following set of commands will create the <quote>pg_opclass</quote>
|
The following set of commands will create the <literal>pg_opclass</literal>
|
||||||
class containing the
|
class containing the
|
||||||
<parameter>int_ops</parameter>
|
<parameter>int_ops</parameter>
|
||||||
collection as an object with an OID of
|
collection as an object with an OID of
|
||||||
@ -414,3 +417,20 @@ close pg_opclass
|
|||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
<chapter id="config">
|
<chapter>
|
||||||
<title id="install-config">Configuration Options</title>
|
<title>Configuration Options</title>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Parameters for Configuration (<application>configure</application>)</title>
|
<title>Parameters for Configuration
|
||||||
|
(<application>configure</application>)</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The full set of parameters available in <application>configure</application>
|
The full set of parameters available in <application>configure</application>
|
||||||
can be obtained by typing
|
can be obtained by typing
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ ./configure --help
|
$ ./configure --help
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
The following parameters may be of interest to installers:
|
<para>
|
||||||
|
The following parameters may be of interest to installers:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
Directories to install PostgreSQL in:
|
Directories to install PostgreSQL in:
|
||||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||||
[/usr/local/pgsql]
|
[/usr/local/pgsql]
|
||||||
@ -54,191 +56,198 @@ Features and packages:
|
|||||||
--with-CXX=<replaceable>compiler</replaceable>
|
--with-CXX=<replaceable>compiler</replaceable>
|
||||||
use specific C++ compiler
|
use specific C++ compiler
|
||||||
--without-CXX prevent building C++ code
|
--without-CXX prevent building C++ code
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
Some systems may have trouble building a specific feature of
|
<para>
|
||||||
<productname>Postgres</productname>. For example, systems with a damaged
|
Some systems may have trouble building a specific feature of
|
||||||
C++ compiler may need to specify <option>--without-CXX</option> to instruct
|
<productname>Postgres</productname>. For example, systems with a damaged
|
||||||
the build procedure to skip construction of <filename>libpq++</filename>.
|
C++ compiler may need to specify <option>--without-CXX</option> to instruct
|
||||||
</para>
|
the build procedure to skip construction of <filename>libpq++</filename>.
|
||||||
<para>
|
</para>
|
||||||
Use the <option>--with-includes</option> and
|
|
||||||
<option>--with-libraries</option> options if you want to build
|
<para>
|
||||||
<productname>Postgres</productname> using include files or libraries
|
Use the <option>--with-includes</option> and
|
||||||
that are not installed in your system's standard search path. For
|
<option>--with-libraries</option> options if you want to build
|
||||||
example, you might use these to build with an experimental version of
|
<productname>Postgres</productname> using include files or libraries
|
||||||
Tcl. If you need to specify more than one nonstandard directory for
|
that are not installed in your system's standard search path. For
|
||||||
include files or libraries, do it like this:
|
example, you might use these to build with an experimental version of
|
||||||
<programlisting>
|
Tcl. If you need to specify more than one nonstandard directory for
|
||||||
--with-includes="/opt/tcl/include /opt/perl5/include"
|
include files or libraries, do it like this:
|
||||||
</programlisting>
|
|
||||||
</para>
|
<programlisting>
|
||||||
<para>
|
--with-includes="/opt/tcl/include /opt/perl5/include"
|
||||||
</para>
|
</programlisting>
|
||||||
</sect1>
|
</para>
|
||||||
<sect1>
|
</sect1>
|
||||||
<title>Parameters for Building (<application>make</application>)</title>
|
|
||||||
|
<sect1>
|
||||||
|
<title>Parameters for Building (<application>make</application>)</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Many installation-related parameters can be set in the building
|
Many installation-related parameters can be set in the building
|
||||||
stage of <productname>Postgres</productname> installation.
|
stage of <productname>Postgres</productname> installation.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
In most cases, these parameters should be placed in a file,
|
<para>
|
||||||
<filename>Makefile.custom</filename>, intended just for that purpose.
|
In most cases, these parameters should be placed in a file,
|
||||||
The default distribution does not contain this optional file, so you
|
<filename>Makefile.custom</filename>, intended just for that purpose.
|
||||||
will create it using a text editor of your choice. When upgrading installations,
|
The default distribution does not contain this optional file, so you
|
||||||
you can simply copy your old Makefile.custom to the new installation before
|
will create it using a text editor of your choice. When upgrading installations,
|
||||||
doing the build.
|
you can simply copy your old Makefile.custom to the new installation before
|
||||||
</para>
|
doing the build.
|
||||||
<para>
|
</para>
|
||||||
Alternatively, you can set variables on the <application>make</application>
|
|
||||||
command line:
|
<para>
|
||||||
<synopsis>
|
Alternatively, you can set variables on the <application>make</application>
|
||||||
make [ <replaceable>variable</replaceable>=<replaceable class="parameter">value</replaceable> [...] ]
|
command line:
|
||||||
</synopsis>
|
|
||||||
</para>
|
<programlisting>
|
||||||
<para>
|
make [ <replaceable>variable</replaceable>=<replaceable>value</replaceable> [...] ]
|
||||||
A few of the many variables that can be specified are:
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A few of the many variables that can be specified are:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>POSTGRESDIR</envar>
|
<envar>POSTGRESDIR</envar>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Top of the installation tree.
|
Top of the installation tree.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>BINDIR</envar>
|
<envar>BINDIR</envar>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Location of applications and utilities.
|
Location of applications and utilities.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>LIBDIR</envar>
|
<envar>LIBDIR</envar>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Location of object libraries, including shared libraries.
|
Location of object libraries, including shared libraries.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>HEADERDIR</envar>
|
<envar>HEADERDIR</envar>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Location of include files.
|
Location of include files.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>ODBCINST</envar>
|
<envar>ODBCINST</envar>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Location of installation-wide <application>psqlODBC</application>
|
Location of installation-wide <application>psqlODBC</application>
|
||||||
(<acronym>ODBC</acronym>) configuration file.
|
(<acronym>ODBC</acronym>) configuration file.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There are other optional parameters which are not as commonly used.
|
There are other optional parameters which are not as commonly used.
|
||||||
Many of those listed below are appropriate when doing
|
Many of those listed below are appropriate when doing
|
||||||
<application>Postgres</application> server code development.
|
<application>Postgres</application> server code development.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>CFLAGS</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Set flags for the C compiler.
|
||||||
|
Should be assigned with "+=" to retain relevant default parameters.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>YFLAGS</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Set flags for the yacc/bison parser. <option>-v</option> might be
|
||||||
|
used to help diagnose problems building a new parser.
|
||||||
|
Should be assigned with "+=" to retain relevant default parameters.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>USE_TCL</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Enable Tcl interface building.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>HSTYLE</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
DocBook <acronym>HTML</acronym> style sheets for building the
|
||||||
|
documentation from scratch.
|
||||||
|
Not used unless you are developing new documentation from the
|
||||||
|
DocBook-compatible <acronym>SGML</acronym> source documents in
|
||||||
|
<filename>doc/src/sgml/</filename>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>PSTYLE</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
DocBook style sheets for building printed documentation from scratch.
|
||||||
|
Not used unless you are developing new documentation from the
|
||||||
|
DocBook-compatible <acronym>SGML</acronym> source documents in
|
||||||
|
<filename>doc/src/sgml/</filename>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Here is an example <filename>Makefile.custom</filename> for a
|
||||||
|
PentiumPro Linux system:
|
||||||
|
|
||||||
<variablelist>
|
<programlisting>
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<envar>CFLAGS</envar>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Set flags for the C compiler.
|
|
||||||
Should be assigned with "+=" to retain relevant default parameters.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<envar>YFLAGS</envar>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Set flags for the yacc/bison parser. <option>-v</option> might be
|
|
||||||
used to help diagnose problems building a new parser.
|
|
||||||
Should be assigned with "+=" to retain relevant default parameters.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<envar>USE_TCL</envar>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Enable Tcl interface building.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<envar>HSTYLE</envar>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
DocBook <acronym>HTML</acronym> style sheets for building the
|
|
||||||
documentation from scratch.
|
|
||||||
Not used unless you are developing new documentation from the
|
|
||||||
DocBook-compatible <acronym>SGML</acronym> source documents in
|
|
||||||
<filename>doc/src/sgml/</filename>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<envar>PSTYLE</envar>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
DocBook style sheets for building printed documentation from scratch.
|
|
||||||
Not used unless you are developing new documentation from the
|
|
||||||
DocBook-compatible <acronym>SGML</acronym> source documents in
|
|
||||||
<filename>doc/src/sgml/</filename>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Here is an example <filename>Makefile.custom</filename> for a
|
|
||||||
PentiumPro Linux system:
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
# Makefile.custom
|
# Makefile.custom
|
||||||
# Thomas Lockhart 1999-06-01
|
# Thomas Lockhart 1999-06-01
|
||||||
|
|
||||||
@ -249,21 +258,22 @@ CFLAGS+= -m486 -O2
|
|||||||
|
|
||||||
HSTYLE= /home/tgl/SGML/db118.d/docbook/html
|
HSTYLE= /home/tgl/SGML/db118.d/docbook/html
|
||||||
PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
<Sect1>
|
|
||||||
<Title>Locale Support</Title>
|
<sect1>
|
||||||
|
<title>Locale Support</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<Note>
|
<note>
|
||||||
<Para>
|
<para>
|
||||||
Written by Oleg Bartunov.
|
Written by Oleg Bartunov.
|
||||||
See <ULink url="http://www.sai.msu.su/~megera/postgres/">Oleg's web page</ULink>
|
See <ulink url="http://www.sai.msu.su/~megera/postgres/">Oleg's web page</ulink>
|
||||||
for additional information on locale and Russian language support.
|
for additional information on locale and Russian language support.
|
||||||
|
|
||||||
</Para>
|
</para>
|
||||||
</Note>
|
</note>
|
||||||
While doing a project for a company in Moscow, Russia,
|
While doing a project for a company in Moscow, Russia,
|
||||||
I encountered the problem that postgresql had no
|
I encountered the problem that postgresql had no
|
||||||
support of national alphabets. After looking for possible workarounds
|
support of national alphabets. After looking for possible workarounds
|
||||||
@ -271,7 +281,7 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
I'm not a C-programer but already had some experience with locale programming
|
I'm not a C-programer but already had some experience with locale programming
|
||||||
when I work with perl
|
when I work with perl
|
||||||
(debugging) and glimpse. After several days of digging through
|
(debugging) and glimpse. After several days of digging through
|
||||||
the <ProductName>Postgres</ProductName> source tree I made very minor corections to
|
the <productname>Postgres</productname> source tree I made very minor corections to
|
||||||
src/backend/utils/adt/varlena.c and src/backend/main/main.c and got what I needed!
|
src/backend/utils/adt/varlena.c and src/backend/main/main.c and got what I needed!
|
||||||
I did support only for
|
I did support only for
|
||||||
<envar>LC_CTYPE</envar> and <envar>LC_COLLATE</envar>,
|
<envar>LC_CTYPE</envar> and <envar>LC_COLLATE</envar>,
|
||||||
@ -280,13 +290,13 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
and (to my surprise) it was
|
and (to my surprise) it was
|
||||||
incorporated into the <productname>Postgres</productname> distribution.
|
incorporated into the <productname>Postgres</productname> distribution.
|
||||||
</para>
|
</para>
|
||||||
<Para>
|
<para>
|
||||||
People often complain that locale doesn't work for them.
|
People often complain that locale doesn't work for them.
|
||||||
There are several common mistakes:
|
There are several common mistakes:
|
||||||
|
|
||||||
<ItemizedList>
|
<itemizedlist>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
Didn't properly configure postgresql before compilation.
|
Didn't properly configure postgresql before compilation.
|
||||||
You must run configure with --enable-locale option to enable locale support.
|
You must run configure with --enable-locale option to enable locale support.
|
||||||
Didn't setup environment correctly when starting postmaster.
|
Didn't setup environment correctly when starting postmaster.
|
||||||
@ -297,24 +307,24 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
I use following shell script
|
I use following shell script
|
||||||
(runpostgres):
|
(runpostgres):
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export LC_CTYPE=koi8-r
|
export LC_CTYPE=koi8-r
|
||||||
export LC_COLLATE=koi8-r
|
export LC_COLLATE=koi8-r
|
||||||
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
|
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
and run it from rc.local as
|
and run it from rc.local as
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
/bin/su - postgres -c "/home/postgres/runpostgres"
|
/bin/su - postgres -c "/home/postgres/runpostgres"
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
Broken locale support in OS (for example, locale support in libc
|
Broken locale support in OS (for example, locale support in libc
|
||||||
under Linux several times has changed
|
under Linux several times has changed
|
||||||
and this caused a lot of problems). Latest perl has also support of
|
and this caused a lot of problems). Latest perl has also support of
|
||||||
@ -333,10 +343,10 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
perl: warning: Falling back to the standard locale ("C").
|
perl: warning: Falling back to the standard locale ("C").
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
Wrong location of locale files!
|
Wrong location of locale files!
|
||||||
|
|
||||||
Possible locations include:
|
Possible locations include:
|
||||||
@ -348,15 +358,15 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
Under Linux I did a symbolic link between <filename>/usr/lib/locale</filename> and
|
Under Linux I did a symbolic link between <filename>/usr/lib/locale</filename> and
|
||||||
<filename>/usr/share/locale</filename> to be sure that
|
<filename>/usr/share/locale</filename> to be sure that
|
||||||
the next libc will not break my locale.
|
the next libc will not break my locale.
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
</ItemizedList>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>What are the Benefits?</Title>
|
<title>What are the Benefits?</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
You can use ~* and order by operators for strings contain characters
|
You can use ~* and order by operators for strings contain characters
|
||||||
from national alphabets. Non-english users
|
from national alphabets. Non-english users
|
||||||
definitely need that. If you won't use locale stuff just undefine
|
definitely need that. If you won't use locale stuff just undefine
|
||||||
@ -364,20 +374,20 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>What are the Drawbacks?</Title>
|
<title>What are the Drawbacks?</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
There is one evident drawback of using locale - its speed!
|
There is one evident drawback of using locale - its speed!
|
||||||
So, use locale only if you really need it.
|
So, use locale only if you really need it.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Kerberos Authentication</Title>
|
<title>Kerberos Authentication</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<productname>Kerberos</productname> is an industry-standard secure authentication
|
<productname>Kerberos</productname> is an industry-standard secure authentication
|
||||||
system suitable for distributed computing over a public network.
|
system suitable for distributed computing over a public network.
|
||||||
</para>
|
</para>
|
||||||
@ -388,7 +398,7 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
<para>
|
<para>
|
||||||
The
|
The
|
||||||
<productname>Kerberos</productname>
|
<productname>Kerberos</productname>
|
||||||
authentication system is not distributed with <Productname>Postgres</Productname>. Versions of
|
authentication system is not distributed with <productname>Postgres</productname>. Versions of
|
||||||
<productname>Kerberos</productname>
|
<productname>Kerberos</productname>
|
||||||
are typically available as optional software from operating system
|
are typically available as optional software from operating system
|
||||||
vendors. In addition, a source code distribution may be obtained through
|
vendors. In addition, a source code distribution may be obtained through
|
||||||
@ -414,9 +424,9 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
<ulink url="info-kerberos@athena.mit.edu">MIT Project Athena</ulink>.
|
<ulink url="info-kerberos@athena.mit.edu">MIT Project Athena</ulink>.
|
||||||
Note that <acronym>FAQL</acronym>s
|
Note that <acronym>FAQL</acronym>s
|
||||||
(Frequently-Asked Questions Lists) are periodically posted to the
|
(Frequently-Asked Questions Lists) are periodically posted to the
|
||||||
<ulink url="mailto:kerberos@ATHENA.MIT.EDU"><productname>Kerberos</productname> mailing list</ulink>
|
<ulink url="mailto:kerberos@athena.mit.edu"><productname>Kerberos</productname> mailing list</ulink>
|
||||||
(send
|
(send
|
||||||
<ulink url="mailto:kerberos-request@ATHENA.MIT.EDU">mail to subscribe</ulink>),
|
<ulink url="mailto:kerberos-request@athena.mit.edu">mail to subscribe</ulink>),
|
||||||
and
|
and
|
||||||
<ulink url="news:comp.protocols.kerberos">USENET news group</ulink>.
|
<ulink url="news:comp.protocols.kerberos">USENET news group</ulink>.
|
||||||
</para>
|
</para>
|
||||||
@ -435,19 +445,19 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
is somehow readable by the <productname>Postgres</productname> account.
|
is somehow readable by the <productname>Postgres</productname> account.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<Productname>Postgres</Productname> and its clients can be compiled to use
|
<productname>Postgres</productname> and its clients can be compiled to use
|
||||||
either Version 4 or Version 5 of the MIT
|
either Version 4 or Version 5 of the MIT
|
||||||
<productname>Kerberos</productname>
|
<productname>Kerberos</productname>
|
||||||
protocols by setting the
|
protocols by setting the
|
||||||
<envar>KRBVERS</envar>
|
<envar>KRBVERS</envar>
|
||||||
variable in the file <filename>src/Makefile.global</filename> to the
|
variable in the file <filename>src/Makefile.global</filename> to the
|
||||||
appropriate value. You can also change the location where
|
appropriate value. You can also change the location where
|
||||||
<Productname>Postgres</Productname>
|
<productname>Postgres</productname>
|
||||||
expects to find the associated libraries, header files and its own
|
expects to find the associated libraries, header files and its own
|
||||||
server key file.
|
server key file.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
After compilation is complete, <Productname>Postgres</Productname>
|
After compilation is complete, <productname>Postgres</productname>
|
||||||
must be registered as a <productname>Kerberos</productname>
|
must be registered as a <productname>Kerberos</productname>
|
||||||
service. See the
|
service. See the
|
||||||
<citetitle>Kerberos Operations Notes</citetitle>
|
<citetitle>Kerberos Operations Notes</citetitle>
|
||||||
@ -459,7 +469,7 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
<title>Operation</title>
|
<title>Operation</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After initial installation, <Productname>Postgres</Productname>
|
After initial installation, <productname>Postgres</productname>
|
||||||
should operate in all ways as a normal
|
should operate in all ways as a normal
|
||||||
<productname>Kerberos</productname>
|
<productname>Kerberos</productname>
|
||||||
service. For details on the use of authentication, see the
|
service. For details on the use of authentication, see the
|
||||||
@ -477,13 +487,13 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
User principal names (anames) are assumed to
|
User principal names (anames) are assumed to
|
||||||
contain the actual Unix/<Productname>Postgres</Productname> user name
|
contain the actual Unix/<productname>Postgres</productname> user name
|
||||||
in the first component.
|
in the first component.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The <Productname>Postgres</Productname> service is assumed to be have two components,
|
The <productname>Postgres</productname> service is assumed to be have two components,
|
||||||
the service name and a hostname, canonicalized as in Version 4 (i.e., with all domain
|
the service name and a hostname, canonicalized as in Version 4 (i.e., with all domain
|
||||||
suffixes removed).
|
suffixes removed).
|
||||||
</para>
|
</para>
|
||||||
@ -491,6 +501,7 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title>Kerberos Parameter Examples</title>
|
<title>Kerberos Parameter Examples</title>
|
||||||
@ -543,3 +554,20 @@ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
|
|||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.7 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.8 2000/05/02 20:01:51 thomas Exp $
|
||||||
CVS code repository
|
CVS code repository
|
||||||
Thomas Lockhart
|
Thomas Lockhart
|
||||||
-->
|
-->
|
||||||
@ -88,7 +88,7 @@ $ cvs checkout -r REL6_4 tc
|
|||||||
1.6
|
1.6
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
then the tag <quote><literal>TAG</literal></quote> will reference
|
then the tag "<literal>TAG</literal>" will reference
|
||||||
file1-1.2, file2-1.3, etc.
|
file1-1.2, file2-1.3, etc.
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@ -606,7 +606,7 @@ $ which cvsup
|
|||||||
who are actively maintaining the code base originally developed by
|
who are actively maintaining the code base originally developed by
|
||||||
<ulink
|
<ulink
|
||||||
url="http://www.research.digital.com/SRC/modula-3/html/home.html">the DEC Systems Research Center</ulink>.
|
url="http://www.research.digital.com/SRC/modula-3/html/home.html">the DEC Systems Research Center</ulink>.
|
||||||
The <quote>PM3</quote> <productname>RPM</productname> distribution is roughly
|
The <productname>PM3</productname> <productname>RPM</productname> distribution is roughly
|
||||||
30MB compressed. At the time of writing, the 1.1.10-1 release
|
30MB compressed. At the time of writing, the 1.1.10-1 release
|
||||||
installed cleanly on RH-5.2, whereas the 1.1.11-1 release is
|
installed cleanly on RH-5.2, whereas the 1.1.11-1 release is
|
||||||
apparently built for another release (RH-6.0?) and does not run on RH-5.2.
|
apparently built for another release (RH-6.0?) and does not run on RH-5.2.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.29 2000/04/14 15:08:56 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.30 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="datatype">
|
<chapter id="datatype">
|
||||||
@ -262,9 +262,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.29 2000/04/14 15:08:56 th
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
The original <productname>Postgres</productname> v4.2 code received from
|
Floating point numbers are allowed to retain
|
||||||
Berkeley rounded all double precision floating point results to six digits for
|
|
||||||
output. Starting with v6.1, floating point numbers are allowed to retain
|
|
||||||
most of the intrinsic precision of the type (typically 15 digits for doubles,
|
most of the intrinsic precision of the type (typically 15 digits for doubles,
|
||||||
6 digits for 4-byte floats).
|
6 digits for 4-byte floats).
|
||||||
Other types with underlying floating point fields (e.g. geometric
|
Other types with underlying floating point fields (e.g. geometric
|
||||||
@ -277,8 +275,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.29 2000/04/14 15:08:56 th
|
|||||||
<title>Numeric Types</title>
|
<title>Numeric Types</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Numeric types consist of two- and four-byte integers and four- and eight-byte
|
Numeric types consist of two- and four-byte integers, four- and eight-byte
|
||||||
floating point numbers.
|
floating point numbers and fixed-precision decimals.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -299,7 +297,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.29 2000/04/14 15:08:56 th
|
|||||||
<entry>decimal</entry>
|
<entry>decimal</entry>
|
||||||
<entry>variable</entry>
|
<entry>variable</entry>
|
||||||
<entry>User-specified precision</entry>
|
<entry>User-specified precision</entry>
|
||||||
<entry>no limit</entry>
|
<entry>~8000 digits</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>float4</entry>
|
<entry>float4</entry>
|
||||||
@ -554,13 +552,13 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
<title>Date/Time Types</title>
|
<title>Date/Time Types</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> supports the full set of
|
<productname>Postgres</productname> supports the full set of
|
||||||
<acronym>SQL</acronym> date and time types.
|
<acronym>SQL</acronym> date and time types.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Date/Time Types</title>
|
<title><productname>Postgres</productname> Date/Time Types</title>
|
||||||
<titleabbrev>Date/Time</titleabbrev>
|
<titleabbrev>Date/Time</titleabbrev>
|
||||||
<tgroup cols="4">
|
<tgroup cols="4">
|
||||||
<thead>
|
<thead>
|
||||||
@ -576,7 +574,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>timestamp</type></entry>
|
<entry><type>timestamp</type></entry>
|
||||||
<entry>for data containing both date and time</entry>
|
<entry>both date and time</entry>
|
||||||
<entry>8 bytes</entry>
|
<entry>8 bytes</entry>
|
||||||
<entry>4713 BC</entry>
|
<entry>4713 BC</entry>
|
||||||
<entry>AD 1465001</entry>
|
<entry>AD 1465001</entry>
|
||||||
@ -584,7 +582,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>timestamp with time zone</type></entry>
|
<entry><type>timestamp with time zone</type></entry>
|
||||||
<entry>date and time including time zone</entry>
|
<entry>date and time with time zone</entry>
|
||||||
<entry>8 bytes</entry>
|
<entry>8 bytes</entry>
|
||||||
<entry>1903 AD</entry>
|
<entry>1903 AD</entry>
|
||||||
<entry>2037 AD</entry>
|
<entry>2037 AD</entry>
|
||||||
@ -600,7 +598,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>date</type></entry>
|
<entry><type>date</type></entry>
|
||||||
<entry>for data containing only dates</entry>
|
<entry>dates only</entry>
|
||||||
<entry>4 bytes</entry>
|
<entry>4 bytes</entry>
|
||||||
<entry>4713 BC</entry>
|
<entry>4713 BC</entry>
|
||||||
<entry>32767 AD</entry>
|
<entry>32767 AD</entry>
|
||||||
@ -608,7 +606,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>time</type></entry>
|
<entry><type>time</type></entry>
|
||||||
<entry>for data containing only times of the day</entry>
|
<entry>times of day only</entry>
|
||||||
<entry>4 bytes</entry>
|
<entry>4 bytes</entry>
|
||||||
<entry>00:00:00.00</entry>
|
<entry>00:00:00.00</entry>
|
||||||
<entry>23:59:59.99</entry>
|
<entry>23:59:59.99</entry>
|
||||||
@ -616,7 +614,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>time with time zone</type></entry>
|
<entry><type>time with time zone</type></entry>
|
||||||
<entry>times of the day</entry>
|
<entry>times of day only</entry>
|
||||||
<entry>4 bytes</entry>
|
<entry>4 bytes</entry>
|
||||||
<entry>00:00:00.00+12</entry>
|
<entry>00:00:00.00+12</entry>
|
||||||
<entry>23:59:59.99-12</entry>
|
<entry>23:59:59.99-12</entry>
|
||||||
@ -628,13 +626,17 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
To ensure compatibility to earlier versions of <productname>PostgreSQL</productname>
|
To ensure compatibility to earlier versions of <productname>Postgres</productname>
|
||||||
we also continue to provide <type>datetime</type> (equivalent to <type>timestamp</type>) and
|
we also continue to provide <type>datetime</type> (equivalent to <type>timestamp</type>) and
|
||||||
<type>timespan</type> (equivalent to <type>interval</type>). The types <type>abstime</type>
|
<type>timespan</type> (equivalent to <type>interval</type>),
|
||||||
|
however support for these is now restricted to having an
|
||||||
|
implicit translation to <type>timestamp</type> and
|
||||||
|
<type>interval</type>.
|
||||||
|
The types <type>abstime</type>
|
||||||
and <type>reltime</type> are lower precision types which are used internally.
|
and <type>reltime</type> are lower precision types which are used internally.
|
||||||
You are discouraged from using any of these types in new
|
You are discouraged from using any of these types in new
|
||||||
applications and are encouraged to move any old
|
applications and are encouraged to move any old
|
||||||
ones over when appropriate. Any or all of these types might disappear in a future release.
|
ones over when appropriate. Any or all of these internal types might disappear in a future release.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
@ -648,11 +650,11 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
<acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible,
|
<acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible,
|
||||||
traditional <productname>Postgres</productname>, and others.
|
traditional <productname>Postgres</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. The command
|
exists to specify how it should be interpreted in ambiguous cases. The command
|
||||||
<literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal>
|
<literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal>
|
||||||
specifies the variant <quote>month before day</quote>, the command
|
specifies the variant "month before day", the command
|
||||||
<literal>SET DateStyle TO 'European'</literal> sets the variant
|
<literal>SET DateStyle TO 'European'</literal> sets the variant
|
||||||
<quote>day before month</quote>. The <literal>ISO</literal> style
|
"day before month". The <literal>ISO</literal> style
|
||||||
is the default but this default can be changed at compile time or at run time.
|
is the default but this default can be changed at compile time or at run time.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -672,7 +674,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
The following are possible inputs for the <type>date</type> type.
|
The following are possible inputs for the <type>date</type> type.
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Date Input</title>
|
<title><productname>Postgres</productname> Date Input</title>
|
||||||
<titleabbrev>Date Inputs</titleabbrev>
|
<titleabbrev>Date Inputs</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
@ -702,10 +704,6 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
<entry>1/18/1999</entry>
|
<entry>1/18/1999</entry>
|
||||||
<entry>US; read as January 18 in any mode</entry>
|
<entry>US; read as January 18 in any mode</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry>1999.008</entry>
|
|
||||||
<entry>Year and day of year</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry>19990108</entry>
|
<entry>19990108</entry>
|
||||||
<entry>ISO-8601 year, month, day</entry>
|
<entry>ISO-8601 year, month, day</entry>
|
||||||
@ -724,7 +722,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>January 8, 99 BC</entry>
|
<entry>January 8, 99 BC</entry>
|
||||||
<entry>Year 99 before the common era</entry>
|
<entry>Year 99 before the Common Era</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
@ -733,7 +731,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Month Abbreviations</title>
|
<title><productname>Postgres</productname> Month Abbreviations</title>
|
||||||
<titleabbrev>Month Abbreviations</titleabbrev>
|
<titleabbrev>Month Abbreviations</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
@ -800,7 +798,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Day of Week Abbreviations</title>
|
<title><productname>Postgres</productname> Day of Week Abbreviations</title>
|
||||||
<titleabbrev>Day of Week Abbreviations</titleabbrev>
|
<titleabbrev>Day of Week Abbreviations</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
@ -850,7 +848,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
The following are valid <type>time</type> inputs.
|
The following are valid <type>time</type> inputs.
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Time Input</title>
|
<title><productname>Postgres</productname> Time Input</title>
|
||||||
<titleabbrev>Time Inputs</titleabbrev>
|
<titleabbrev>Time Inputs</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
@ -904,13 +902,14 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
<title>time with time zone</title>
|
<title>time with time zone</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This type is defined by SQL92, but the definition exhibits
|
This type is defined by SQL92, but the definition exhibits
|
||||||
fundamental deficiencies which renders the type near useless. In
|
fundamental deficiencies which renders the type nearly useless. In
|
||||||
most cases, a combination of <type>date</type>,
|
most cases, a combination of <type>date</type>,
|
||||||
<type>time</type>, and <type>timestamp with time zone</type>
|
<type>time</type>, and <type>timestamp</type>
|
||||||
should provide a complete range of date/time functionality
|
should provide a complete range of date/time functionality
|
||||||
required by an application.
|
required by any application.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -919,7 +918,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
as follows:
|
as follows:
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Time With Time
|
<title><productname>Postgres</productname> Time With Time
|
||||||
Zone Input</title>
|
Zone Input</title>
|
||||||
<titleabbrev>Time With Time Zone Inputs</titleabbrev>
|
<titleabbrev>Time With Time Zone Inputs</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
@ -959,89 +958,97 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceabl
|
|||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
<title>timestamp</title>
|
<title>timestamp</title>
|
||||||
<para>
|
|
||||||
Valid input for the <type>timestamp</type> type consists of a concatenation
|
|
||||||
of a date and a time, followed by an optional <literal>AD</literal> or
|
|
||||||
<literal>BC</literal>, followed by an optional time zone. (See below.)
|
|
||||||
Thus
|
|
||||||
<programlisting>
|
|
||||||
1999-01-08 04:05:06 -8:00
|
|
||||||
</programlisting>
|
|
||||||
is a valid <type>timestamp</type> value, which is <acronym>ISO</acronym>-compliant.
|
|
||||||
In addition, the wide-spread format
|
|
||||||
<programlisting>
|
|
||||||
January 8 04:05:06 1999 PST
|
|
||||||
</programlisting>
|
|
||||||
is supported.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<table tocentry="1" id="timezone">
|
Valid input for the <type>timestamp</type> type consists of a concatenation
|
||||||
<title id="timezone-title"><productname>PostgreSQL</productname> Time Zone Input</title>
|
of a date and a time, followed by an optional <literal>AD</literal> or
|
||||||
<titleabbrev>Time Zone Inputs</titleabbrev>
|
<literal>BC</literal>, followed by an optional time zone. (See below.)
|
||||||
<tgroup cols="2">
|
Thus
|
||||||
<thead>
|
|
||||||
<row>
|
<programlisting>
|
||||||
<entry>Time Zone</entry>
|
1999-01-08 04:05:06 -8:00
|
||||||
<entry>Description</entry>
|
</programlisting>
|
||||||
</row>
|
|
||||||
</thead>
|
is a valid <type>timestamp</type> value, which is <acronym>ISO</acronym>-compliant.
|
||||||
<tbody>
|
In addition, the wide-spread format
|
||||||
<row>
|
|
||||||
<entry>PST</entry>
|
<programlisting>
|
||||||
<entry>Pacific Standard Time</entry>
|
January 8 04:05:06 1999 PST
|
||||||
</row>
|
</programlisting>
|
||||||
<row>
|
is supported.
|
||||||
<entry>-8:00</entry>
|
</para>
|
||||||
<entry>ISO-8601 offset for PST</entry>
|
|
||||||
</row>
|
<para>
|
||||||
<row>
|
<table tocentry="1" id="timezone">
|
||||||
<entry>-800</entry>
|
<title id="timezone-title"><productname>Postgres</productname> Time Zone Input</title>
|
||||||
<entry>ISO-8601 offset for PST</entry>
|
<titleabbrev>Time Zone Inputs</titleabbrev>
|
||||||
</row>
|
<tgroup cols="2">
|
||||||
<row>
|
<thead>
|
||||||
<entry>-8</entry>
|
<row>
|
||||||
<entry>ISO-8601 offset for PST</entry>
|
<entry>Time Zone</entry>
|
||||||
</row>
|
<entry>Description</entry>
|
||||||
</tbody>
|
</row>
|
||||||
</tgroup>
|
</thead>
|
||||||
</table>
|
<tbody>
|
||||||
</para>
|
<row>
|
||||||
|
<entry>PST</entry>
|
||||||
|
<entry>Pacific Standard Time</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>-8:00</entry>
|
||||||
|
<entry>ISO-8601 offset for PST</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>-800</entry>
|
||||||
|
<entry>ISO-8601 offset for PST</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>-8</entry>
|
||||||
|
<entry>ISO-8601 offset for PST</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
</para>
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
<title>interval</title>
|
<title>interval</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<type>interval</type>s can be specified with the following syntax:
|
<type>interval</type>s can be specified with the following syntax:
|
||||||
<programlisting>
|
|
||||||
|
<programlisting>
|
||||||
Quantity Unit [Quantity Unit...] [Direction]
|
Quantity Unit [Quantity Unit...] [Direction]
|
||||||
@ Quantity Unit [Direction]
|
@ Quantity Unit [Direction]
|
||||||
</programlisting>
|
</programlisting>
|
||||||
where: <literal>Quantity</literal> is ..., <literal>-1</literal>,
|
|
||||||
<literal>0</literal>, <literal>1</literal>, <literal>2</literal>, ...;
|
where: <literal>Quantity</literal> is ..., <literal>-1</literal>,
|
||||||
<literal>Unit</literal> is <literal>second</literal>,
|
<literal>0</literal>, <literal>1</literal>, <literal>2</literal>, ...;
|
||||||
<literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
|
<literal>Unit</literal> is <literal>second</literal>,
|
||||||
<literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
|
<literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
|
||||||
<literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>,
|
<literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
|
||||||
or abbreviations or plurals of these units;
|
<literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>,
|
||||||
<literal>Direction</literal> can be <literal>ago</literal> or
|
or abbreviations or plurals of these units;
|
||||||
empty.
|
<literal>Direction</literal> can be <literal>ago</literal> or
|
||||||
</para>
|
empty.
|
||||||
</sect3>
|
</para>
|
||||||
|
</sect3>
|
||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
<title>Special values</title>
|
<title>Special values</title>
|
||||||
<para>
|
|
||||||
The following <acronym>SQL</acronym>-compatible functions can be used as date or time
|
<para>
|
||||||
input for the corresponding datatype: <literal>CURRENT_DATE</literal>,
|
The following <acronym>SQL</acronym>-compatible functions can be used as date or time
|
||||||
<literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
|
input for the corresponding datatype: <literal>CURRENT_DATE</literal>,
|
||||||
</para>
|
<literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
|
||||||
<para>
|
</para>
|
||||||
<productname>PostgreSQL</productname> also supports several special constants for
|
<para>
|
||||||
convenience.
|
<productname>Postgres</productname> also supports several special constants for
|
||||||
|
convenience.
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgresSQL</productname> Special Date/Time Constants</title>
|
<title><productname>Postgres</productname> Special Date/Time Constants</title>
|
||||||
<titleabbrev>Constants</titleabbrev>
|
<titleabbrev>Constants</titleabbrev>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
@ -1110,7 +1117,7 @@ January 8 04:05:06 1999 PST
|
|||||||
The default is the <acronym>ISO</acronym> format.
|
The default is the <acronym>ISO</acronym> format.
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Date/Time Output Styles</title>
|
<title><productname>Postgres</productname> Date/Time Output Styles</title>
|
||||||
<titleabbrev>Styles</titleabbrev>
|
<titleabbrev>Styles</titleabbrev>
|
||||||
<tgroup cols="3">
|
<tgroup cols="3">
|
||||||
<thead>
|
<thead>
|
||||||
@ -1148,7 +1155,7 @@ January 8 04:05:06 1999 PST
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The output of the <type>date</type> and <type>time</type> styles is of course
|
The output of the <type>date</type> and <type>time</type> styles is of course
|
||||||
only the date or time part in accordance with the above examples
|
only the date or time part in accordance with the above examples.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1157,22 +1164,25 @@ January 8 04:05:06 1999 PST
|
|||||||
at Date/Time Input, how this setting affects interpretation of input values.)
|
at Date/Time Input, how this setting affects interpretation of input values.)
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>PostgreSQL</productname> Date Order Conventions</title>
|
<title><productname>Postgres</productname> Date Order Conventions</title>
|
||||||
<titleabbrev>Order</titleabbrev>
|
<titleabbrev>Date Order</titleabbrev>
|
||||||
<tgroup cols="3">
|
<tgroup cols="3">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Style Specification</entry>
|
<entry>Style Specification</entry>
|
||||||
|
<entry>Description</entry>
|
||||||
<entry>Example</entry>
|
<entry>Example</entry>
|
||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>European</entry>
|
<entry>European</entry>
|
||||||
|
<entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
|
||||||
<entry>17/12/1997 15:37:16.00 MET</entry>
|
<entry>17/12/1997 15:37:16.00 MET</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>US</entry>
|
<entry>US</entry>
|
||||||
|
<entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry>
|
||||||
<entry>12/17/1997 07:37:16.00 PST</entry>
|
<entry>12/17/1997 07:37:16.00 PST</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1181,9 +1191,10 @@ January 8 04:05:06 1999 PST
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<type>interval</type> output looks like the input format, expect that units like
|
<type>interval</type> output looks like the input format, except that units like
|
||||||
<literal>week</literal> or <literal>century</literal> are converted to years and days.
|
<literal>week</literal> or <literal>century</literal> are converted to years and days.
|
||||||
In ISO mode the output looks like
|
In ISO mode the output looks like
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
[ Quantity Units [ ... ] ] [ Days ] Hours:Minutes [ ago ]
|
[ Quantity Units [ ... ] ] [ Days ] Hours:Minutes [ ago ]
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -1219,7 +1230,7 @@ January 8 04:05:06 1999 PST
|
|||||||
<title>Time Zones</title>
|
<title>Time Zones</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> endeavors to be compatible with
|
<productname>Postgres</productname> endeavors to be compatible with
|
||||||
<acronym>SQL92</acronym> definitions for typical usage.
|
<acronym>SQL92</acronym> definitions for typical usage.
|
||||||
However, the <acronym>SQL92</acronym> standard has an odd mix of date and
|
However, the <acronym>SQL92</acronym> standard has an odd mix of date and
|
||||||
time types and capabilities. Two obvious problems are:
|
time types and capabilities. Two obvious problems are:
|
||||||
@ -1249,7 +1260,7 @@ January 8 04:05:06 1999 PST
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To address these difficulties, <productname>PostgreSQL</productname>
|
To address these difficulties, <productname>Postgres</productname>
|
||||||
associates time zones only with date and time
|
associates time zones only with date and time
|
||||||
types which contain both date and time,
|
types which contain both date and time,
|
||||||
and assumes local time for any type containing only
|
and assumes local time for any type containing only
|
||||||
@ -1260,7 +1271,7 @@ January 8 04:05:06 1999 PST
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> obtains time zone support
|
<productname>Postgres</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
|
||||||
@ -1322,7 +1333,7 @@ January 8 04:05:06 1999 PST
|
|||||||
<title>Internals</title>
|
<title>Internals</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> uses Julian dates
|
<productname>Postgres</productname> uses Julian dates
|
||||||
for all date/time calculations. They have the nice property of correctly
|
for all date/time calculations. They have the nice property of correctly
|
||||||
predicting/calculating any date more recent than 4713BC
|
predicting/calculating any date more recent than 4713BC
|
||||||
to far into the future, using the assumption that the length of the
|
to far into the future, using the assumption that the length of the
|
||||||
@ -1476,13 +1487,32 @@ January 8 04:05:06 1999 PST
|
|||||||
<para>
|
<para>
|
||||||
<type>point</type> is specified using the following syntax:
|
<type>point</type> is specified using the following syntax:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
( x , y )
|
( <replaceable>x</replaceable> , <replaceable>y</replaceable> )
|
||||||
x , y
|
<replaceable>x</replaceable> , <replaceable>y</replaceable>
|
||||||
where
|
</synopsis>
|
||||||
x is the x-axis coordinate as a floating point number
|
|
||||||
y is the y-axis coordinate as a floating point number
|
where the arguments are
|
||||||
</programlisting>
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable>x</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The x-axis coordinate as a floating point number.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable>y</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The y-axis coordinate as a floating point number.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -1495,13 +1525,26 @@ where
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<type>lseg</type> is specified using the following syntax:
|
<type>lseg</type> is specified using the following syntax:
|
||||||
<programlisting>
|
|
||||||
( ( x1 , y1 ) , ( x2 , y2 ) )
|
<synopsis>
|
||||||
( x1 , y1 ) , ( x2 , y2 )
|
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
|
||||||
x1 , y1 , x2 , y2
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
|
||||||
where
|
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
|
||||||
(x1,y1) and (x2,y2) are the endpoints of the segment
|
</synopsis>
|
||||||
</programlisting>
|
|
||||||
|
where the arguments are
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</term>
|
||||||
|
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The endpoints of the line segment.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -1516,14 +1559,28 @@ where
|
|||||||
<para>
|
<para>
|
||||||
<type>box</type> is specified using the following syntax:
|
<type>box</type> is specified using the following syntax:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
( ( x1 , y1 ) , ( x2 , y2 ) )
|
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
|
||||||
( x1 , y1 ) , ( x2 , y2 )
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
|
||||||
x1 , y1 , x2 , y2
|
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
|
||||||
where
|
</synopsis>
|
||||||
(x1,y1) and (x2,y2) are opposite corners
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
where the arguments are
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</term>
|
||||||
|
<term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Opposite corners of the box.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
Boxes are output using the first syntax.
|
Boxes are output using the first syntax.
|
||||||
The corners are reordered on input to store
|
The corners are reordered on input to store
|
||||||
the lower left corner first and the upper right corner last.
|
the lower left corner first and the upper right corner last.
|
||||||
@ -1546,24 +1603,37 @@ where
|
|||||||
<function>isopen(p)</function>
|
<function>isopen(p)</function>
|
||||||
and
|
and
|
||||||
<function>isclosed(p)</function>
|
<function>isclosed(p)</function>
|
||||||
are supplied to select either type in a query.
|
are supplied to test for either type in a query.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<type>path</type> is specified using the following syntax:
|
<type>path</type> is specified using the following syntax:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
( ( x1 , y1 ) , ... , ( xn , yn ) )
|
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
|
||||||
[ ( x1 , y1 ) , ... , ( xn , yn ) ]
|
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) ]
|
||||||
( x1 , y1 ) , ... , ( xn , yn )
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
|
||||||
( x1 , y1 , ... , xn , yn )
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
|
||||||
x1 , y1 , ... , xn , yn
|
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
|
||||||
where
|
</synopsis>
|
||||||
(x1,y1),...,(xn,yn) are points 1 through n
|
|
||||||
a leading "[" indicates an open path
|
|
||||||
a leading "(" indicates a closed path
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
where the arguments are
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Endpoints of the line segments comprising the path.
|
||||||
|
A leading square bracket ("[") indicates an open path, while
|
||||||
|
a leading parenthesis ("(") indicates a closed path.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
Paths are output using the first syntax.
|
Paths are output using the first syntax.
|
||||||
Note that <productname>Postgres</productname> versions prior to
|
Note that <productname>Postgres</productname> versions prior to
|
||||||
v6.1 used a format for paths which had a single leading parenthesis,
|
v6.1 used a format for paths which had a single leading parenthesis,
|
||||||
@ -1587,19 +1657,33 @@ where
|
|||||||
<para>
|
<para>
|
||||||
<type>polygon</type> is specified using the following syntax:
|
<type>polygon</type> is specified using the following syntax:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
( ( x1 , y1 ) , ... , ( xn , yn ) )
|
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
|
||||||
( x1 , y1 ) , ... , ( xn , yn )
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
|
||||||
( x1 , y1 , ... , xn , yn )
|
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
|
||||||
x1 , y1 , ... , xn , yn
|
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
|
||||||
where
|
</synopsis>
|
||||||
(x1,y1),...,(xn,yn) are points 1 through n
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
where the arguments are
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Endpoints of the line segments comprising the boundary of the
|
||||||
|
polygon.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
Polygons are output using the first syntax.
|
Polygons are output using the first syntax.
|
||||||
Note that <productname>Postgres</productname> versions prior to
|
Note that <productname>Postgres</productname> versions prior to
|
||||||
v6.1 used a format for polygons which had a single leading parenthesis, the list
|
v6.1 used a format for polygons which had a single leading parenthesis, the list
|
||||||
of x-axis coordinates, the list of y-axis coordinates,
|
of x-axis coordinates, the list of y-axis coordinates,
|
||||||
followed by a closing parenthesis.
|
followed by a closing parenthesis.
|
||||||
The built-in function <function>upgradepoly</function> is supplied to convert
|
The built-in function <function>upgradepoly</function> is supplied to convert
|
||||||
polygons dumped and reloaded from pre-v6.1 databases.
|
polygons dumped and reloaded from pre-v6.1 databases.
|
||||||
@ -1616,16 +1700,37 @@ where
|
|||||||
<para>
|
<para>
|
||||||
<type>circle</type> is specified using the following syntax:
|
<type>circle</type> is specified using the following syntax:
|
||||||
|
|
||||||
<programlisting>
|
<synopsis>
|
||||||
< ( x , y ) , r >
|
< ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> >
|
||||||
( ( x , y ) , r )
|
( ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> )
|
||||||
( x , y ) , r
|
( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable>
|
||||||
x , y , r
|
<replaceable>x</replaceable> , <replaceable>y</replaceable> , <replaceable>r</replaceable>
|
||||||
where
|
</synopsis>
|
||||||
(x,y) is the center of the circle
|
|
||||||
r is the radius of the circle
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
|
where the arguments are
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Center of the circle.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable>r</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Radius of the circle.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
Circles are output using the first syntax.
|
Circles are output using the first syntax.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.8 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.9 2000/05/02 20:01:51 thomas Exp $
|
||||||
Date/time details
|
Date/time details
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ Date/time details
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<quote>Julian Day</quote> is different from <quote>Julian Date</quote>.
|
"Julian Day" is different from "Julian Date".
|
||||||
|
|
||||||
The Julian calendar was introduced by Julius Caesar in 45 BC. It was
|
The Julian calendar was introduced by Julius Caesar in 45 BC. It was
|
||||||
in common use until the 1582, when countries started changing to the
|
in common use until the 1582, when countries started changing to the
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.10 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="dfunc">
|
<chapter id="dfunc">
|
||||||
@ -7,105 +7,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.9 2000/03/31 03:27:40 thomas
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
<!--
|
|
||||||
.SH "Compiling Dynamically-Loaded C Functions"
|
|
||||||
.PP
|
|
||||||
Different operating systems require different procedures for compiling
|
|
||||||
C source files so that Postgres can load them dynamically. This section
|
|
||||||
discusses the required compiler and loader options on each system.
|
|
||||||
.PP
|
|
||||||
Under Linux ELF, object files can be generated by specifing the compiler
|
|
||||||
flag -fpic.
|
|
||||||
.PP
|
|
||||||
Under Ultrix, all object files that Postgres is expected to load
|
|
||||||
dynamically must be compiled using
|
|
||||||
.IR /bin/cc
|
|
||||||
with the \*(lq-G 0\*(rq option turned on. The object file name in the
|
|
||||||
.IR as
|
|
||||||
clause should end in \*(lq.o\*(rq.
|
|
||||||
.PP
|
|
||||||
Under HP-UX, DEC OSF/1, AIX and SunOS 4, all object files must be
|
|
||||||
turned into
|
|
||||||
.IR "shared libraries"
|
|
||||||
using the operating system's native object file loader,
|
|
||||||
.IR ld(1).
|
|
||||||
.PP
|
|
||||||
Under HP-UX, an object file must be compiled using the native HP-UX C
|
|
||||||
compiler,
|
|
||||||
.IR /bin/cc ,
|
|
||||||
with both the \*(lq+z\*(rq and \*(lq+u\*(rq flags turned on. The
|
|
||||||
first flag turns the object file into \*(lqposition-independent
|
|
||||||
code\*(rq (PIC); the second flag removes some alignment restrictions
|
|
||||||
that the PA-RISC architecture normally enforces. The object file must
|
|
||||||
then be turned into a shared library using the HP-UX loader,
|
|
||||||
.IR /bin/ld .
|
|
||||||
The command lines to compile a C source file, \*(lqfoo.c\*(rq, look
|
|
||||||
like:
|
|
||||||
.nf
|
|
||||||
cc <other flags> +z +u -c foo.c
|
|
||||||
ld <other flags> -b -o foo.sl foo.o
|
|
||||||
.fi
|
|
||||||
The object file name in the
|
|
||||||
.BR as
|
|
||||||
clause should end in \*(lq.sl\*(rq.
|
|
||||||
.PP
|
|
||||||
An extra step is required under versions of HP-UX prior to 9.00. If
|
|
||||||
the Postgres header file
|
|
||||||
.nf
|
|
||||||
include/c.h
|
|
||||||
.fi
|
|
||||||
is not included in the source file, then the following line must also
|
|
||||||
be added at the top of every source file:
|
|
||||||
.nf
|
|
||||||
#pragma HP_ALIGN HPUX_NATURAL_S500
|
|
||||||
.fi
|
|
||||||
However, this line must not appear in programs compiled under HP-UX
|
|
||||||
9.00 or later.
|
|
||||||
.PP
|
|
||||||
Under DEC OSF/1, an object file must be compiled and then turned
|
|
||||||
into a shared library using the OSF/1 loader,
|
|
||||||
.IR /bin/ld .
|
|
||||||
In this case, the command lines look like:
|
|
||||||
.nf
|
|
||||||
cc <other flags> -c foo.c
|
|
||||||
ld <other flags> -shared -expect_unresolved '*' -o foo.so foo.o
|
|
||||||
.fi
|
|
||||||
The object file name in the
|
|
||||||
.BR as
|
|
||||||
clause should end in \*(lq.so\*(rq.
|
|
||||||
.PP
|
|
||||||
Under SunOS 4, an object file must be compiled and then turned into a
|
|
||||||
shared library using the SunOS 4 loader,
|
|
||||||
.IR /bin/ld .
|
|
||||||
The command lines look like:
|
|
||||||
.nf
|
|
||||||
cc <other flags> -PIC -c foo.c
|
|
||||||
ld <other flags> -dc -dp -Bdynamic -o foo.so foo.o
|
|
||||||
.fi
|
|
||||||
The object file name in the
|
|
||||||
.BR as
|
|
||||||
clause should end in \*(lq.so\*(rq.
|
|
||||||
.PP
|
|
||||||
Under AIX, object files are compiled normally but building the shared
|
|
||||||
library requires a couple of steps. First, create the object file:
|
|
||||||
.nf
|
|
||||||
cc <other flags> -c foo.c
|
|
||||||
.fi
|
|
||||||
You must then create a symbol \*(lqexports\*(rq file for the object
|
|
||||||
file:
|
|
||||||
.nf
|
|
||||||
mkldexport foo.o `pwd` > foo.exp
|
|
||||||
.fi
|
|
||||||
Finally, you can create the shared library:
|
|
||||||
.nf
|
|
||||||
ld <other flags> -H512 -T512 -o foo.so -e _nostart \e
|
|
||||||
-bI:.../lib/postgres.exp -bE:foo.exp foo.o \e
|
|
||||||
-lm -lc 2>/dev/null
|
|
||||||
.fi
|
|
||||||
You should look at the Postgres User's Manual for an explanation of this
|
|
||||||
procedure.
|
|
||||||
-->
|
|
||||||
|
|
||||||
After you have created and registered a user-defined
|
After you have created and registered a user-defined
|
||||||
function, your work is essentially done.
|
function, your work is essentially done.
|
||||||
<productname>Postgres</productname>,
|
<productname>Postgres</productname>,
|
||||||
@ -120,8 +21,6 @@ procedure.
|
|||||||
describes how to perform the compilation and
|
describes how to perform the compilation and
|
||||||
link-editing required before you can load your user-defined
|
link-editing required before you can load your user-defined
|
||||||
functions into a running <productname>Postgres</productname> server.
|
functions into a running <productname>Postgres</productname> server.
|
||||||
Note that
|
|
||||||
this process has changed as of Version 4.2.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -155,10 +54,11 @@ procedure.
|
|||||||
You should expect to read (and reread, and re-reread) the
|
You should expect to read (and reread, and re-reread) the
|
||||||
manual pages for the C compiler, cc(1), and the link
|
manual pages for the C compiler, cc(1), and the link
|
||||||
editor, ld(1), if you have specific questions. In
|
editor, ld(1), if you have specific questions. In
|
||||||
addition, the regression test suites in the directory
|
addition, the contrib area (<filename>PGROOT/contrib</filename>)
|
||||||
<filename>PGROOT/src/regress</filename> contain several
|
and the regression test suites in the directory
|
||||||
working examples of this process. If you copy what these
|
<filename>PGROOT/src/test/regress</filename> contain several
|
||||||
tests do, you should not have any problems.
|
working examples of this process. If you copy an example then
|
||||||
|
you should not have any problems.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -248,6 +148,29 @@ procedure.
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<sect1>
|
||||||
|
<title>Linux</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Under Linux ELF, object files can be generated by specifying the compiler
|
||||||
|
flag -fpic.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For example,
|
||||||
|
<programlisting>
|
||||||
|
# simple Linux example
|
||||||
|
% cc -fpic -c <replaceable>foo.c</replaceable>
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
produces an object file called <replaceable>foo.o</replaceable>
|
||||||
|
that can then be
|
||||||
|
dynamically loaded into <productname>Postgres</productname>.
|
||||||
|
No additional loading or link-editing must be performed.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<!--
|
||||||
<sect1>
|
<sect1>
|
||||||
<title><acronym>ULTRIX</acronym></title>
|
<title><acronym>ULTRIX</acronym></title>
|
||||||
|
|
||||||
@ -271,6 +194,7 @@ procedure.
|
|||||||
No additional loading or link-editing must be performed.
|
No additional loading or link-editing must be performed.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
-->
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title><acronym>DEC OSF/1</acronym></title>
|
<title><acronym>DEC OSF/1</acronym></title>
|
||||||
@ -327,14 +251,15 @@ procedure.
|
|||||||
file with special compiler flags and a shared library
|
file with special compiler flags and a shared library
|
||||||
must be produced.
|
must be produced.
|
||||||
The necessary steps with HP-UX are as follows. The +z
|
The necessary steps with HP-UX are as follows. The +z
|
||||||
flag to the HP-UX C compiler produces so-called
|
flag to the HP-UX C compiler produces
|
||||||
"Position Independent Code" (PIC) and the +u flag
|
<firstterm>Position Independent Code</firstterm> (PIC)
|
||||||
removes
|
and the +u flag removes
|
||||||
some alignment restrictions that the PA-RISC architecture
|
some alignment restrictions that the PA-RISC architecture
|
||||||
normally enforces. The object file must be turned
|
normally enforces. The object file must be turned
|
||||||
into a shared library using the HP-UX link editor with
|
into a shared library using the HP-UX link editor with
|
||||||
the -b option. This sounds complicated but is actually
|
the -b option. This sounds complicated but is actually
|
||||||
very simple, since the commands to do it are just:
|
very simple, since the commands to do it are just:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
# simple HP-UX example
|
# simple HP-UX example
|
||||||
% cc +z +u -c foo.c
|
% cc +z +u -c foo.c
|
||||||
@ -375,6 +300,95 @@ procedure.
|
|||||||
command line.
|
command line.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Future integration: Create separate sections for these operating
|
||||||
|
systems and integrate the info from this old man page.
|
||||||
|
- thomas 2000-04-21
|
||||||
|
|
||||||
|
Under HP-UX, DEC OSF/1, AIX and SunOS 4, all object files must be
|
||||||
|
turned into
|
||||||
|
.IR "shared libraries"
|
||||||
|
using the operating system's native object file loader,
|
||||||
|
.IR ld(1).
|
||||||
|
.PP
|
||||||
|
Under HP-UX, an object file must be compiled using the native HP-UX C
|
||||||
|
compiler,
|
||||||
|
.IR /bin/cc ,
|
||||||
|
with both the \*(lq+z\*(rq and \*(lq+u\*(rq flags turned on. The
|
||||||
|
first flag turns the object file into \*(lqposition-independent
|
||||||
|
code\*(rq (PIC); the second flag removes some alignment restrictions
|
||||||
|
that the PA-RISC architecture normally enforces. The object file must
|
||||||
|
then be turned into a shared library using the HP-UX loader,
|
||||||
|
.IR /bin/ld .
|
||||||
|
The command lines to compile a C source file, \*(lqfoo.c\*(rq, look
|
||||||
|
like:
|
||||||
|
.nf
|
||||||
|
cc <other flags> +z +u -c foo.c
|
||||||
|
ld <other flags> -b -o foo.sl foo.o
|
||||||
|
.fi
|
||||||
|
The object file name in the
|
||||||
|
.BR as
|
||||||
|
clause should end in \*(lq.sl\*(rq.
|
||||||
|
.PP
|
||||||
|
An extra step is required under versions of HP-UX prior to 9.00. If
|
||||||
|
the Postgres header file
|
||||||
|
.nf
|
||||||
|
include/c.h
|
||||||
|
.fi
|
||||||
|
is not included in the source file, then the following line must also
|
||||||
|
be added at the top of every source file:
|
||||||
|
.nf
|
||||||
|
#pragma HP_ALIGN HPUX_NATURAL_S500
|
||||||
|
.fi
|
||||||
|
However, this line must not appear in programs compiled under HP-UX
|
||||||
|
9.00 or later.
|
||||||
|
.PP
|
||||||
|
Under DEC OSF/1, an object file must be compiled and then turned
|
||||||
|
into a shared library using the OSF/1 loader,
|
||||||
|
.IR /bin/ld .
|
||||||
|
In this case, the command lines look like:
|
||||||
|
.nf
|
||||||
|
cc <other flags> -c foo.c
|
||||||
|
ld <other flags> -shared -expect_unresolved '*' -o foo.so foo.o
|
||||||
|
.fi
|
||||||
|
The object file name in the
|
||||||
|
.BR as
|
||||||
|
clause should end in \*(lq.so\*(rq.
|
||||||
|
.PP
|
||||||
|
Under SunOS 4, an object file must be compiled and then turned into a
|
||||||
|
shared library using the SunOS 4 loader,
|
||||||
|
.IR /bin/ld .
|
||||||
|
The command lines look like:
|
||||||
|
.nf
|
||||||
|
cc <other flags> -PIC -c foo.c
|
||||||
|
ld <other flags> -dc -dp -Bdynamic -o foo.so foo.o
|
||||||
|
.fi
|
||||||
|
The object file name in the
|
||||||
|
.BR as
|
||||||
|
clause should end in \*(lq.so\*(rq.
|
||||||
|
.PP
|
||||||
|
Under AIX, object files are compiled normally but building the shared
|
||||||
|
library requires a couple of steps. First, create the object file:
|
||||||
|
.nf
|
||||||
|
cc <other flags> -c foo.c
|
||||||
|
.fi
|
||||||
|
You must then create a symbol \*(lqexports\*(rq file for the object
|
||||||
|
file:
|
||||||
|
.nf
|
||||||
|
mkldexport foo.o `pwd` > foo.exp
|
||||||
|
.fi
|
||||||
|
Finally, you can create the shared library:
|
||||||
|
.nf
|
||||||
|
ld <other flags> -H512 -T512 -o foo.so -e _nostart \e
|
||||||
|
-bI:.../lib/postgres.exp -bE:foo.exp foo.o \e
|
||||||
|
-lm -lc 2>/dev/null
|
||||||
|
.fi
|
||||||
|
You should look at the Postgres User's Manual for an explanation of this
|
||||||
|
procedure.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,29 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.25 2000/02/02 16:22:45 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.26 2000/05/02 20:01:51 thomas Exp $
|
||||||
Documentation Guide
|
Documentation Guide
|
||||||
Thomas Lockhart
|
Thomas Lockhart
|
||||||
|
|
||||||
Revision 1.15 1999/05/27 15:49:07 thomas
|
|
||||||
Markup fixes.
|
|
||||||
Update for v6.5 release.
|
|
||||||
|
|
||||||
Revision 1.12 1998/12/18 16:17:29 thomas
|
|
||||||
Include more details on editing with Emacs.
|
|
||||||
Remove mention of the old "migration" flat files.
|
|
||||||
Change URLs for resources to point to areas, not particular files.
|
|
||||||
That way things stay correct even when version of tools change.
|
|
||||||
Suggested by Vince Vielhaber.
|
|
||||||
|
|
||||||
Revision 1.11 1998/10/30 19:36:57 thomas
|
|
||||||
Minor editing and markup changes as a result of preparing the Postscript
|
|
||||||
documentation for v6.4.
|
|
||||||
Bigger updates to the installation instructions (install and config).
|
|
||||||
|
|
||||||
Revision 1.8 1998/08/17 16:17:07 thomas
|
|
||||||
Bring document list closer to up to day.
|
|
||||||
Add a note on sgml-tools that they are now working with jade and so
|
|
||||||
may become the toolset of choice in the future.
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<appendix label="DG2" id="docguide">
|
<appendix label="DG2" id="docguide">
|
||||||
@ -45,7 +23,7 @@ Add a note on sgml-tools that they are now working with jade and so
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The purpose of documentation is to make <productname>Postgres</productname>
|
The purpose of documentation is to make <productname>Postgres</productname>
|
||||||
easier to learn, use, and develop.
|
easier to learn, use, and extend..
|
||||||
The documentation set should describe the <productname>Postgres</productname>
|
The documentation set should describe the <productname>Postgres</productname>
|
||||||
system, language, and interfaces.
|
system, language, and interfaces.
|
||||||
It should be able to answer
|
It should be able to answer
|
||||||
@ -61,18 +39,26 @@ Add a note on sgml-tools that they are now working with jade and so
|
|||||||
formats:
|
formats:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>
|
<listitem>
|
||||||
|
<para>
|
||||||
Plain text for pre-installation information.
|
Plain text for pre-installation information.
|
||||||
</para></listitem>
|
</para>
|
||||||
<listitem><para>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
<acronym>HTML</acronym>, for on-line browsing and reference.
|
<acronym>HTML</acronym>, for on-line browsing and reference.
|
||||||
</para></listitem>
|
</para>
|
||||||
<listitem><para>
|
</listitem>
|
||||||
Hardcopy, for in-depth reading and reference.
|
<listitem>
|
||||||
</para></listitem>
|
<para>
|
||||||
<listitem><para>
|
Hardcopy (Postscript or PDF), for in-depth reading and reference.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
<acronym>man pages</acronym>, for quick reference.
|
<acronym>man pages</acronym>, for quick reference.
|
||||||
</para></listitem>
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -983,7 +969,7 @@ $ make man
|
|||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Hardcopy Generation for v6.5</title>
|
<title>Hardcopy Generation for v7.0</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The hardcopy Postscript documentation is generated by converting the
|
The hardcopy Postscript documentation is generated by converting the
|
||||||
@ -1084,14 +1070,14 @@ $ make man
|
|||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Export the result as <quote>ASCII Layout</quote>.
|
Export the result as "ASCII Layout".
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Using emacs or vi, clean up the tabular information in
|
Using emacs or vi, clean up the tabular information in
|
||||||
<filename>INSTALL</filename>. Remove the <quote>mailto</quote>
|
<filename>INSTALL</filename>. Remove the "mailto"
|
||||||
<acronym>URLs</acronym> for the porting contributors to shrink
|
<acronym>URLs</acronym> for the porting contributors to shrink
|
||||||
the column heights.
|
the column heights.
|
||||||
</para>
|
</para>
|
||||||
@ -1104,19 +1090,21 @@ $ make man
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Several areas are addressed while generating Postscript
|
Several areas are addressed while generating Postscript
|
||||||
hardcopy.
|
hardcopy, including RTF repair, ToC generation, and page break
|
||||||
|
adjustments.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<procedure>
|
<procedure>
|
||||||
<title>Applixware <acronym>RTF</acronym> Cleanup</title>
|
<title>Applixware <acronym>RTF</acronym> Cleanup</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Applixware does not seem to do a complete job of importing <acronym>RTF</acronym>
|
<application>jade</application>, an integral part of the
|
||||||
generated by jade/MSS. In particular, all text is given the
|
hardcopy procedure, omits specifying a default style for body
|
||||||
<quote>Header1</quote> style attribute label, although the text
|
text. In the past, this undiagnosed problem led to a long process
|
||||||
formatting itself is acceptable. Also, the Table of Contents page
|
of Table of Contents (ToC) generation. However, with great help
|
||||||
numbers do not refer to the section listed in the table, but rather
|
from the ApplixWare folks the symptom was diagnosed and a
|
||||||
refer to the page of the ToC itself.</para>
|
workaround is available.
|
||||||
|
</para>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
@ -1128,6 +1116,35 @@ $ make man
|
|||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
|
||||||
|
<step performance="required">
|
||||||
|
<para>
|
||||||
|
Repair the RTF file to correctly specify all
|
||||||
|
styles, in particular the default style. The field can be added
|
||||||
|
using <application>vi</application> or the following small
|
||||||
|
<application>sed</application> procedure:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
#!/bin/sh
|
||||||
|
# fixrtf.sh
|
||||||
|
# Utility to repair slight damage in RTF files generated by jade
|
||||||
|
# Thomas Lockhart <lockhart@alumni.caltech.edu>
|
||||||
|
#
|
||||||
|
for i in $* ; do
|
||||||
|
mv $i $i.orig
|
||||||
|
cat $i.orig | sed 's#\\stylesheet#\\stylesheet{\\s0 Normal;}#' > $i
|
||||||
|
done
|
||||||
|
|
||||||
|
exit
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
where the script is adding <literal>{\s0 Normal;}</literal> as
|
||||||
|
the zero-th style in the document. According to ApplixWare, the
|
||||||
|
RTF standard would prohibit adding an implicit zero-th style,
|
||||||
|
though M$Word happens to handle this case.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Open a new document in <productname>Applix Words</productname> and
|
Open a new document in <productname>Applix Words</productname> and
|
||||||
@ -1137,55 +1154,152 @@ $ make man
|
|||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Print out the existing Table of Contents, to mark up in the following
|
Generate a new ToC using ApplixWare.
|
||||||
few steps.
|
</para>
|
||||||
|
|
||||||
|
<substeps>
|
||||||
|
<step>
|
||||||
|
<para>
|
||||||
|
Select the existing ToC lines, from the beginning of the first
|
||||||
|
character on the first line to the last character of the last
|
||||||
|
line.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step>
|
||||||
|
<para>
|
||||||
|
Build a new ToC using
|
||||||
|
<literal>Tools.BookBuilding.CreateToC</literal>. Select the
|
||||||
|
first three levels of headers for inclusion in the ToC.
|
||||||
|
This will
|
||||||
|
replace the existing lines imported in the RTF with a native
|
||||||
|
ApplixWare ToC.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step>
|
||||||
|
<para>
|
||||||
|
Adjust the ToC formatting by using
|
||||||
|
<literal>Format.Style</literal>, selecting each of the three
|
||||||
|
ToC styles, and adjusting the indents for <literal>First</literal> and
|
||||||
|
<literal>Left</literal>. Use the following values:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<title>Indent Formatting for Table of Contents</title>
|
||||||
|
<tgroup cols="3">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry>
|
||||||
|
Style
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
First Indent (inches)
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
Left Indent (inches)
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>
|
||||||
|
<literal>TOC-Heading 1</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>0.6</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>0.6</literal>
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>
|
||||||
|
<literal>TOC-Heading 2</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>1.0</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>1.0</literal>
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>
|
||||||
|
<literal>TOC-Heading 3</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>1.4</literal>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<literal>1.4</literal>
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
</substeps>
|
||||||
|
</step>
|
||||||
|
|
||||||
|
<step performance="required">
|
||||||
|
<para>
|
||||||
|
Work through the document to:
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Adjust page breaks.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Adjust table column widths.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Insert figures into the document. Center each figure on the page using
|
||||||
|
the centering margins button on the ApplixWare toolbar.
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
Not all documents have figures.
|
||||||
|
You can grep the <acronym>SGML</acronym> source files for
|
||||||
|
the string "<literal>graphic</literal>" to identify those parts of the
|
||||||
|
documentation which may have figures. A few figures are replicated in
|
||||||
|
various parts of the documentation.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Insert figures into the document. Center each figure on the page using
|
Replace the right-justified page numbers in the Examples and
|
||||||
the centering margins button.</para>
|
Figures portions of the ToC with
|
||||||
|
|
||||||
<para>
|
|
||||||
Not all documents have figures.
|
|
||||||
You can grep the <acronym>SGML</acronym> source files for
|
|
||||||
the string <quote>graphic</quote> to identify those parts of the
|
|
||||||
documentation which may have figures. A few figures are replicated in
|
|
||||||
various parts of the documentation.
|
|
||||||
</para>
|
|
||||||
</step>
|
|
||||||
|
|
||||||
<step performance="required">
|
|
||||||
<para>
|
|
||||||
Work through the document, adjusting page breaks and table column
|
|
||||||
widths.
|
|
||||||
</para>
|
|
||||||
</step>
|
|
||||||
|
|
||||||
<step performance="required">
|
|
||||||
<para>
|
|
||||||
If a bibliography is present, Applix Words seems to mark all remaining
|
|
||||||
text after the first title as having an underlined attribute. Select
|
|
||||||
all remaining text, turn off underlining using the underlining button,
|
|
||||||
then explicitly underline each document and book title.
|
|
||||||
</para>
|
|
||||||
</step>
|
|
||||||
|
|
||||||
<step performance="required">
|
|
||||||
<para>
|
|
||||||
Work through the document, marking up the ToC hardcopy with the actual
|
|
||||||
page number of each ToC entry.
|
|
||||||
</para>
|
|
||||||
</step>
|
|
||||||
|
|
||||||
<step performance="required">
|
|
||||||
<para>
|
|
||||||
Replace the right-justified incorrect page numbers in the ToC with
|
|
||||||
correct values. This only takes a few minutes per document.
|
correct values. This only takes a few minutes per document.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
<step performance="required">
|
||||||
|
<para>
|
||||||
|
If a bibliography is present, remove the <firstterm>short
|
||||||
|
form</firstterm> reference title from each entry. The
|
||||||
|
<productname>DocBook</productname> stylesheets from Norm Walsh
|
||||||
|
seem to print these out, even though this is a subset of the
|
||||||
|
information immediately following.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Save the document as native Applix Words format to allow easier last
|
Save the document as native Applix Words format to allow easier last
|
||||||
@ -1195,7 +1309,7 @@ $ make man
|
|||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
<quote>Print</quote> the document
|
"Print" the document
|
||||||
to a file in Postscript format.
|
to a file in Postscript format.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.13 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.14 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
@ -32,16 +32,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.13 2000/03/31 03:27:40 thomas
|
|||||||
This describes an embedded <acronym>SQL</acronym> in <acronym>C</acronym>
|
This describes an embedded <acronym>SQL</acronym> in <acronym>C</acronym>
|
||||||
package for <productname>Postgres</productname>.
|
package for <productname>Postgres</productname>.
|
||||||
|
|
||||||
It is written by <ulink url="">Linus Tolke</ulink>
|
It is written by <ulink url="linus@epact.se">Linus Tolke</ulink>
|
||||||
and <ulink url="">Michael Meskes</ulink>.
|
and <ulink url="meskes@debian.org">Michael Meskes</ulink>.
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy and use in the same way as you are allowed
|
Permission is granted to copy and use in the same way as you are allowed
|
||||||
to copy and use the rest of the <productname>PostgreSQL</productname>.
|
to copy and use the rest of <productname>PostgreSQL</productname>.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Why Embedded <acronym>SQL</acronym>?</title>
|
<title>Why Embedded <acronym>SQL</acronym>?</title>
|
||||||
|
|
||||||
@ -472,8 +473,9 @@ struct sqlca
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following list shows all the known incompatibilities. If you find one
|
The following list shows all the known incompatibilities. If you find one
|
||||||
not listed please notify <ulink url="">Michael
|
not listed please notify
|
||||||
Meskes</ulink>. Note, however, that we list only incompatibilities from
|
<ulink url="meskes@debian.org">Michael Meskes</ulink>.
|
||||||
|
Note, however, that we list only incompatibilities from
|
||||||
a precompiler of another RDBMS to <application>ecpg</application> and not
|
a precompiler of another RDBMS to <application>ecpg</application> and not
|
||||||
additional <application>ecpg</application> features that these RDBMS do not
|
additional <application>ecpg</application> features that these RDBMS do not
|
||||||
have.
|
have.
|
||||||
@ -977,7 +979,7 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ",
|
|||||||
This request is modified
|
This request is modified
|
||||||
by the input variables, i.e. the variables that where not known at
|
by the input variables, i.e. the variables that where not known at
|
||||||
compile time but are to be entered in the request. Where the variables
|
compile time but are to be entered in the request. Where the variables
|
||||||
should go the string contains <quote>;</quote>.
|
should go the string contains ";".
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -38,8 +38,8 @@ $ export PATH
|
|||||||
to the <FileName>.profile</FileName> file in your home directory.
|
to the <FileName>.profile</FileName> file in your home directory.
|
||||||
From now on, we will assume that you have added the
|
From now on, we will assume that you have added the
|
||||||
<ProductName>Postgres</ProductName> bin directory to your path. In addition, we
|
<ProductName>Postgres</ProductName> bin directory to your path. In addition, we
|
||||||
will make frequent reference to <Quote>setting a shell
|
will make frequent reference to "setting a shell
|
||||||
variable</Quote> or <Quote>setting an environment variable</Quote> throughout
|
variable" or "setting an environment variable" throughout
|
||||||
this document. If you did not fully understand the
|
this document. If you did not fully understand the
|
||||||
last paragraph on modifying your search path, you
|
last paragraph on modifying your search path, you
|
||||||
should consult the Unix manual pages that describe your
|
should consult the Unix manual pages that describe your
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<title id="sql-funcs">SQL Functions</title>
|
<title id="sql-funcs">SQL Functions</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<quote><acronym>SQL</acronym> functions</quote> are constructs
|
<firstterm><acronym>SQL</acronym> functions</firstterm> are constructs
|
||||||
defined by the <acronym>SQL92</acronym> standard which have
|
defined by the <acronym>SQL92</acronym> standard which have
|
||||||
function-like syntax but which can not be implemented as simple
|
function-like syntax but which can not be implemented as simple
|
||||||
functions.
|
functions.
|
||||||
@ -476,24 +476,6 @@
|
|||||||
<entry>preserve months and years</entry>
|
<entry>preserve months and years</entry>
|
||||||
<entry>age('now', timestamp '1957-06-13')</entry>
|
<entry>age('now', timestamp '1957-06-13')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry>timestamp(abstime)</entry>
|
|
||||||
<entry>timestamp</entry>
|
|
||||||
<entry>convert to timestamp</entry>
|
|
||||||
<entry>timestamp(abstime 'now')</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>timestamp(date)</entry>
|
|
||||||
<entry>timestamp</entry>
|
|
||||||
<entry>convert to timestamp</entry>
|
|
||||||
<entry>timestamp(date 'today')</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>timestamp(date,time)</entry>
|
|
||||||
<entry>timestamp</entry>
|
|
||||||
<entry>convert to timestamp</entry>
|
|
||||||
<entry>timestamp(timestamp '1998-02-24',time '23:07');</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry>date_part(text,timestamp)</entry>
|
<entry>date_part(text,timestamp)</entry>
|
||||||
<entry>float8</entry>
|
<entry>float8</entry>
|
||||||
@ -513,10 +495,10 @@
|
|||||||
<entry>date_trunc('month',abstime 'now')</entry>
|
<entry>date_trunc('month',abstime 'now')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>isfinite(abstime)</entry>
|
<entry>interval(reltime)</entry>
|
||||||
<entry>bool</entry>
|
<entry>interval</entry>
|
||||||
<entry>a finite time?</entry>
|
<entry>convert to interval</entry>
|
||||||
<entry>isfinite(abstime 'now')</entry>
|
<entry>interval(reltime '4 hours')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>isfinite(timestamp)</entry>
|
<entry>isfinite(timestamp)</entry>
|
||||||
@ -537,10 +519,22 @@
|
|||||||
<entry>reltime(interval '4 hrs')</entry>
|
<entry>reltime(interval '4 hrs')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>interval(reltime)</entry>
|
<entry>timestamp(date)</entry>
|
||||||
<entry>interval</entry>
|
<entry>timestamp</entry>
|
||||||
<entry>convert to interval</entry>
|
<entry>convert to timestamp</entry>
|
||||||
<entry>interval(reltime '4 hours')</entry>
|
<entry>timestamp(date 'today')</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>timestamp(date,time)</entry>
|
||||||
|
<entry>timestamp</entry>
|
||||||
|
<entry>convert to timestamp</entry>
|
||||||
|
<entry>timestamp(timestamp '1998-02-24',time '23:07');</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>to_char(timestamp,text)</entry>
|
||||||
|
<entry>text</entry>
|
||||||
|
<entry>convert to string</entry>
|
||||||
|
<entry>to_char(timestamp '1998-02-24','DD');</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
@ -673,6 +667,10 @@
|
|||||||
<entry>HH12</entry>
|
<entry>HH12</entry>
|
||||||
<entry>hour of day (01-12)</entry>
|
<entry>hour of day (01-12)</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>HH24</entry>
|
||||||
|
<entry>hour of day (00-23)</entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>MI</entry>
|
<entry>MI</entry>
|
||||||
<entry>minute (00-59)</entry>
|
<entry>minute (00-59)</entry>
|
||||||
@ -810,7 +808,7 @@
|
|||||||
<entry>month in Roman Numerals (I-XII; I=JAN) - upper case</entry>
|
<entry>month in Roman Numerals (I-XII; I=JAN) - upper case</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>rn</entry>
|
<entry>rm</entry>
|
||||||
<entry>month in Roman Numerals (I-XII; I=JAN) - lower case</entry>
|
<entry>month in Roman Numerals (I-XII; I=JAN) - lower case</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -874,29 +872,34 @@
|
|||||||
<para>
|
<para>
|
||||||
<function>to_timestamp</function> and <function>to_date</function>
|
<function>to_timestamp</function> and <function>to_date</function>
|
||||||
skip blank space if the <literal>FX</literal> option is
|
skip blank space if the <literal>FX</literal> option is
|
||||||
not use. <literal>FX</literal> Must be specified as the first item
|
not used. <literal>FX</literal> must be specified as the first item
|
||||||
in the template.
|
in the template.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
'\' - must be use as double \\, example '\\HH\\MI\\SS'
|
Backslash ("<literal>\</literal>") must be specified with a double backslash
|
||||||
|
("<literal>\\</literal>"); for example <literal>'\\HH\\MI\\SS'</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
'"' - string between a quotation marks is skipen and not is parsed.
|
A double quote ('"') between quotation marks is skipped and is not parsed.
|
||||||
If you want write '"' to output you must use \\", example '\\"YYYY Month\\"'.
|
If you want to write a double quote to output you must preceed
|
||||||
|
it with a double backslash (<literal>'\\"</literal>), for
|
||||||
|
example <literal>'\\"YYYY Month\\"'</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
text - the PostgreSQL's to_char() support text without '"', but string
|
<function>to_char</function> supports text without a leading
|
||||||
between a quotation marks is fastly and you have guarantee, that a text
|
double quote ('"'), but any string
|
||||||
not will interpreted as a keyword (format-picture), exapmle '"Hello Year: "YYYY'.
|
between a quotation marks is rapidly handled and you are
|
||||||
|
guaranteed that it will not be interpreted as a template
|
||||||
|
keyword (example: <literal>'"Hello Year: "YYYY'</literal>).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@ -1213,19 +1216,19 @@
|
|||||||
<row>
|
<row>
|
||||||
<entry>area(object)</entry>
|
<entry>area(object)</entry>
|
||||||
<entry>float8</entry>
|
<entry>float8</entry>
|
||||||
<entry>area of circle, ...</entry>
|
<entry>area of item</entry>
|
||||||
<entry>area(box '((0,0),(1,1))')</entry>
|
<entry>area(box '((0,0),(1,1))')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>box(box,box)</entry>
|
<entry>box(box,box)</entry>
|
||||||
<entry>box</entry>
|
<entry>box</entry>
|
||||||
<entry>boxes to intersection box</entry>
|
<entry>intersection box</entry>
|
||||||
<entry>box(box '((0,0),(1,1))',box '((0.5,0.5),(2,2))')</entry>
|
<entry>box(box '((0,0),(1,1))',box '((0.5,0.5),(2,2))')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>center(object)</entry>
|
<entry>center(object)</entry>
|
||||||
<entry>point</entry>
|
<entry>point</entry>
|
||||||
<entry>center of circle, ...</entry>
|
<entry>center of item</entry>
|
||||||
<entry>center(box '((0,0),(1,2))')</entry>
|
<entry>center(box '((0,0),(1,2))')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@ -1255,15 +1258,9 @@
|
|||||||
<row>
|
<row>
|
||||||
<entry>length(object)</entry>
|
<entry>length(object)</entry>
|
||||||
<entry>float8</entry>
|
<entry>float8</entry>
|
||||||
<entry>length of line segment, ...</entry>
|
<entry>length of item</entry>
|
||||||
<entry>length(path '((-1,0),(1,0))')</entry>
|
<entry>length(path '((-1,0),(1,0))')</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry>length(path)</entry>
|
|
||||||
<entry>float8</entry>
|
|
||||||
<entry>length of path</entry>
|
|
||||||
<entry>length(path '((0,0),(1,1),(2,0))')</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry>pclose(path)</entry>
|
<entry>pclose(path)</entry>
|
||||||
<entry>path</entry>
|
<entry>path</entry>
|
||||||
@ -1324,91 +1321,91 @@ Not defined by this name. Implements the intersection operator '#'
|
|||||||
<row>
|
<row>
|
||||||
<entry>box(circle)</entry>
|
<entry>box(circle)</entry>
|
||||||
<entry>box</entry>
|
<entry>box</entry>
|
||||||
<entry>convert circle to box</entry>
|
<entry>circle to box</entry>
|
||||||
<entry>box('((0,0),2.0)'::circle)</entry>
|
<entry>box('((0,0),2.0)'::circle)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>box(point,point)</entry>
|
<entry>box(point,point)</entry>
|
||||||
<entry>box</entry>
|
<entry>box</entry>
|
||||||
<entry>convert points to box</entry>
|
<entry>points to box</entry>
|
||||||
<entry>box('(0,0)'::point,'(1,1)'::point)</entry>
|
<entry>box('(0,0)'::point,'(1,1)'::point)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>box(polygon)</entry>
|
<entry>box(polygon)</entry>
|
||||||
<entry>box</entry>
|
<entry>box</entry>
|
||||||
<entry>convert polygon to box</entry>
|
<entry>polygon to box</entry>
|
||||||
<entry>box('((0,0),(1,1),(2,0))'::polygon)</entry>
|
<entry>box('((0,0),(1,1),(2,0))'::polygon)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>circle(box)</entry>
|
<entry>circle(box)</entry>
|
||||||
<entry>circle</entry>
|
<entry>circle</entry>
|
||||||
<entry>convert to circle</entry>
|
<entry>to circle</entry>
|
||||||
<entry>circle('((0,0),(1,1))'::box)</entry>
|
<entry>circle('((0,0),(1,1))'::box)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>circle(point,float8)</entry>
|
<entry>circle(point,float8)</entry>
|
||||||
<entry>circle</entry>
|
<entry>circle</entry>
|
||||||
<entry>convert to circle</entry>
|
<entry>point to circle</entry>
|
||||||
<entry>circle('(0,0)'::point,2.0)</entry>
|
<entry>circle('(0,0)'::point,2.0)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>lseg(box)</entry>
|
<entry>lseg(box)</entry>
|
||||||
<entry>lseg</entry>
|
<entry>lseg</entry>
|
||||||
<entry>convert diagonal to lseg</entry>
|
<entry>box diagonal to lseg</entry>
|
||||||
<entry>lseg('((-1,0),(1,0))'::box)</entry>
|
<entry>lseg('((-1,0),(1,0))'::box)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>lseg(point,point)</entry>
|
<entry>lseg(point,point)</entry>
|
||||||
<entry>lseg</entry>
|
<entry>lseg</entry>
|
||||||
<entry>convert to lseg</entry>
|
<entry>points to lseg</entry>
|
||||||
<entry>lseg('(-1,0)'::point,'(1,0)'::point)</entry>
|
<entry>lseg('(-1,0)'::point,'(1,0)'::point)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>path(polygon)</entry>
|
<entry>path(polygon)</entry>
|
||||||
<entry>point</entry>
|
<entry>point</entry>
|
||||||
<entry>convert to path</entry>
|
<entry>polygon to path</entry>
|
||||||
<entry>path('((0,0),(1,1),(2,0))'::polygon)</entry>
|
<entry>path('((0,0),(1,1),(2,0))'::polygon)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>point(circle)</entry>
|
<entry>point(circle)</entry>
|
||||||
<entry>point</entry>
|
<entry>point</entry>
|
||||||
<entry>convert to point (center)</entry>
|
<entry>center</entry>
|
||||||
<entry>point('((0,0),2.0)'::circle)</entry>
|
<entry>point('((0,0),2.0)'::circle)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>point(lseg,lseg)</entry>
|
<entry>point(lseg,lseg)</entry>
|
||||||
<entry>point</entry>
|
<entry>point</entry>
|
||||||
<entry>convert to point (intersection)</entry>
|
<entry>intersection</entry>
|
||||||
<entry>point('((-1,0),(1,0))'::lseg, '((-2,-2),(2,2))'::lseg)</entry>
|
<entry>point('((-1,0),(1,0))'::lseg, '((-2,-2),(2,2))'::lseg)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>point(polygon)</entry>
|
<entry>point(polygon)</entry>
|
||||||
<entry>point</entry>
|
<entry>point</entry>
|
||||||
<entry>center of polygon</entry>
|
<entry>center</entry>
|
||||||
<entry>point('((0,0),(1,1),(2,0))'::polygon)</entry>
|
<entry>point('((0,0),(1,1),(2,0))'::polygon)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>polygon(box)</entry>
|
<entry>polygon(box)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert to polygon with 12 points</entry>
|
<entry>12 point polygon</entry>
|
||||||
<entry>polygon('((0,0),(1,1))'::box)</entry>
|
<entry>polygon('((0,0),(1,1))'::box)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>polygon(circle)</entry>
|
<entry>polygon(circle)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert to 12-point polygon</entry>
|
<entry>12-point polygon</entry>
|
||||||
<entry>polygon('((0,0),2.0)'::circle)</entry>
|
<entry>polygon('((0,0),2.0)'::circle)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>polygon(<replaceable class="parameter">npts</replaceable>,circle)</entry>
|
<entry>polygon(<replaceable class="parameter">npts</replaceable>,circle)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert to <replaceable class="parameter">npts</replaceable> polygon</entry>
|
<entry><replaceable class="parameter">npts</replaceable> polygon</entry>
|
||||||
<entry>polygon(12,'((0,0),2.0)'::circle)</entry>
|
<entry>polygon(12,'((0,0),2.0)'::circle)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>polygon(path)</entry>
|
<entry>polygon(path)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert to polygon</entry>
|
<entry>path to polygon</entry>
|
||||||
<entry>polygon('((0,0),(1,1),(2,0))'::path)</entry>
|
<entry>polygon('((0,0),(1,1),(2,0))'::path)</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1438,19 +1435,19 @@ Not defined by this name. Implements the intersection operator '#'
|
|||||||
<row>
|
<row>
|
||||||
<entry>revertpoly(polygon)</entry>
|
<entry>revertpoly(polygon)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert pre-v6.1 polygon</entry>
|
<entry>to pre-v6.1</entry>
|
||||||
<entry>revertpoly('((0,0),(1,1),(2,0))'::polygon)</entry>
|
<entry>revertpoly('((0,0),(1,1),(2,0))'::polygon)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>upgradepath(path)</entry>
|
<entry>upgradepath(path)</entry>
|
||||||
<entry>path</entry>
|
<entry>path</entry>
|
||||||
<entry>convert pre-v6.1 path</entry>
|
<entry>to pre-v6.1</entry>
|
||||||
<entry>upgradepath('(1,3,0,0,1,1,2,0)'::path)</entry>
|
<entry>upgradepath('(1,3,0,0,1,1,2,0)'::path)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>upgradepoly(polygon)</entry>
|
<entry>upgradepoly(polygon)</entry>
|
||||||
<entry>polygon</entry>
|
<entry>polygon</entry>
|
||||||
<entry>convert pre-v6.1 polygon</entry>
|
<entry>to pre-v6.1</entry>
|
||||||
<entry>upgradepoly('(0,1,2,0,1,0)'::polygon)</entry>
|
<entry>upgradepoly('(0,1,2,0,1,0)'::polygon)</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.7 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.8 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
@ -189,7 +189,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.7 2000/03/31 03:27:40 thom
|
|||||||
<title><productname>PostgreSQL</productname></title>
|
<title><productname>PostgreSQL</productname></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By 1996, it became clear that the name <quote>Postgres95</quote> would
|
By 1996, it became clear that the name "Postgres95" would
|
||||||
not stand the test of time. We chose a new name,
|
not stand the test of time. We chose a new name,
|
||||||
<productname>PostgreSQL</productname>, to reflect the relationship
|
<productname>PostgreSQL</productname>, to reflect the relationship
|
||||||
between the original <productname>Postgres</productname> and the more
|
between the original <productname>Postgres</productname> and the more
|
||||||
|
@ -354,7 +354,8 @@ CREATE MEMSTORE ON <table> COLUMNS <cols>
|
|||||||
is an index built over a subset of a table; the subset is defined by
|
is an index built over a subset of a table; the subset is defined by
|
||||||
a predicate. <productname>Postgres</productname>
|
a predicate. <productname>Postgres</productname>
|
||||||
supported partial indices with arbitrary
|
supported partial indices with arbitrary
|
||||||
predicates. I believe IBM's db2 for as/400 supports partial indices
|
predicates. I believe IBM's <productname>DB2</productname>
|
||||||
|
for AS/400 supports partial indices
|
||||||
using single-clause predicates.
|
using single-clause predicates.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.6 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.7 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="inherit">
|
<chapter id="inherit">
|
||||||
@ -78,12 +78,12 @@ SELECT c.name, c.altitude
|
|||||||
Madison | 845
|
Madison | 845
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Here the <quote>*</quote> after cities indicates that the query should
|
Here the "*" after cities indicates that the query should
|
||||||
be run over cities and all classes below cities in the
|
be run over cities and all classes below cities in the
|
||||||
inheritance hierarchy. Many of the commands that we
|
inheritance hierarchy. Many of the commands that we
|
||||||
have already discussed -- <command>SELECT</command>,
|
have already discussed -- <command>SELECT</command>,
|
||||||
<command>UPDATE</command> and <command>DELETE</command> --
|
<command>UPDATE</command> and <command>DELETE</command> --
|
||||||
support this <quote>*</quote> notation, as do others, like
|
support this "*" notation, as do others, like
|
||||||
<command>ALTER TABLE</command>.
|
<command>ALTER TABLE</command>.
|
||||||
</para>
|
</para>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/install.sgml,v 1.40 2000/04/14 23:04:44 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/install.sgml,v 1.41 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="install">
|
<chapter id="install">
|
||||||
@ -33,7 +33,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/install.sgml,v 1.40 2000/04/14 23:04:
|
|||||||
work with other <application>make</application> programs. On GNU/Linux systems
|
work with other <application>make</application> programs. On GNU/Linux systems
|
||||||
GNU make is the default tool, on other systems you may find that
|
GNU make is the default tool, on other systems you may find that
|
||||||
GNU <application>make</application> is installed under the name
|
GNU <application>make</application> is installed under the name
|
||||||
<quote>gmake</quote>.
|
<literal>gmake</literal>.
|
||||||
We will use that name from now on to indicate <acronym>GNU</acronym>
|
We will use that name from now on to indicate <acronym>GNU</acronym>
|
||||||
<application>make</application>, no matter what name it has on your system.
|
<application>make</application>, no matter what name it has on your system.
|
||||||
To test for <acronym>GNU</acronym> <application>make</application> enter
|
To test for <acronym>GNU</acronym> <application>make</application> enter
|
||||||
@ -612,23 +612,28 @@ libpq.so.2.1: cannot open shared object file: No such file or directory
|
|||||||
Run the regression tests against the installed server (using the sequential
|
Run the regression tests against the installed server (using the sequential
|
||||||
test method). If you didn't run the tests before installation, you should
|
test method). If you didn't run the tests before installation, you should
|
||||||
definitely do it now.
|
definitely do it now.
|
||||||
For detailed instructions see <xref endterm="regress-title"
|
For detailed instructions see
|
||||||
linkend="regress">.
|
<xref endterm="regress-title" linkend="regress">.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To start <quote>playing around</quote>, set up the paths as explained above
|
To start experimenting with <productname>Postgres</productname>,
|
||||||
|
set up the paths as explained above
|
||||||
and start the server. To create a database, type
|
and start the server. To create a database, type
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
> createdb testdb
|
> createdb testdb
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Then enter
|
Then enter
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
> psql testdb
|
> psql testdb
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
to connect to that database. At the prompt you can enter SQL commands
|
to connect to that database. At the prompt you can enter SQL commands
|
||||||
and start experimenting.
|
and start experimenting.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.10 2000/05/02 20:01:51 thomas Exp $
|
||||||
|
|
||||||
Postgres quick Installation Guide.
|
Postgres quick Installation Guide.
|
||||||
- thomas 1998-10-26
|
- thomas 1998-10-26
|
||||||
@ -28,27 +28,27 @@ Postgres quick Installation Guide.
|
|||||||
<!entity biblio SYSTEM "biblio.sgml">
|
<!entity biblio SYSTEM "biblio.sgml">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<book>
|
<book id="installation">
|
||||||
|
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<title>PostgreSQL Installation Guide</title>
|
<title>PostgreSQL Installation Guide</title>
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
<releaseinfo>Covering v6.5 for general release</releaseinfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<bookbiblio>
|
<bookbiblio>
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
<!-- editor in authorgroup is not supported
|
<!-- editor in authorgroup is not supported
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
-->
|
-->
|
||||||
<editor>
|
<editor>
|
||||||
<firstname>Thomas</firstname>
|
<firstname>Thomas</firstname>
|
||||||
<surname>Lockhart</surname>
|
<surname>Lockhart</surname>
|
||||||
<affiliation>
|
<affiliation>
|
||||||
<orgname>Caltech/JPL</orgname>
|
<orgname>Caltech/JPL</orgname>
|
||||||
</affiliation>
|
</affiliation>
|
||||||
</editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
@ -57,17 +57,17 @@ Postgres quick Installation Guide.
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<date>(last updated 1999-06-01)</date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</bookbiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</para>
|
</para>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -82,38 +82,38 @@ Your name here...
|
|||||||
</Dedication>
|
</Dedication>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<preface>
|
<preface>
|
||||||
<title>Summary</title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>Postgres</productname>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<productname>PostgreSQL</productname> is an open-source descendant
|
<productname>PostgreSQL</productname> is an open-source descendant
|
||||||
of this original Berkeley code.
|
of this original Berkeley code.
|
||||||
</para>
|
</para>
|
||||||
</preface>
|
</preface>
|
||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This installation procedure makes some assumptions about the desired configuration
|
This installation procedure makes some assumptions about the desired configuration
|
||||||
and runtime environment for your system. This may be adequate for many installations,
|
and runtime environment for your system. This may be adequate for many installations,
|
||||||
and is almost certainly adequate for a first installation. But you may want to
|
and is almost certainly adequate for a first installation. But you may want to
|
||||||
do an initial installation up to the point of unpacking the source tree
|
do an initial installation up to the point of unpacking the source tree
|
||||||
and installing documentation, and then print or browse the
|
and installing documentation, and then print or browse the
|
||||||
<citetitle>Administrator's Guide</citetitle>.</para>
|
<citetitle>Administrator's Guide</citetitle>.</para>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
&ports;
|
&ports;
|
||||||
&install;
|
&install;
|
||||||
&config;
|
&config;
|
||||||
&release;
|
&release;
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<INDEX> </INDEX>
|
<INDEX> </INDEX>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.15 2000/04/19 21:21:38 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.16 2000/05/02 20:01:51 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="libpqplusplus">
|
<chapter id="libpqplusplus">
|
||||||
@ -719,7 +719,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.15 2000/04/19 21:21:
|
|||||||
<function>PgDatabase::PutLine</function>
|
<function>PgDatabase::PutLine</function>
|
||||||
or when the last string has been received from the backend using
|
or when the last string has been received from the backend using
|
||||||
<function>PgDatabase::GetLine</function>.
|
<function>PgDatabase::GetLine</function>.
|
||||||
It must be issued or the backend may get <quote>out of sync</quote> with
|
It must be issued or the backend may get "out of sync" with
|
||||||
the frontend. Upon return from this function, the backend is ready to
|
the frontend. Upon return from this function, the backend is ready to
|
||||||
receive the next query.
|
receive the next query.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.37 2000/04/25 16:39:07 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.38 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="libpq-chapter">
|
<chapter id="libpq-chapter">
|
||||||
@ -8,11 +8,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.37 2000/04/25 16:39:07 momji
|
|||||||
<para>
|
<para>
|
||||||
<filename>libpq</filename> is the <acronym>C</acronym>
|
<filename>libpq</filename> is the <acronym>C</acronym>
|
||||||
application programmer's interface to
|
application programmer's interface to
|
||||||
<productname>PostgreSQL</productname>. <filename>libpq</filename> is a set
|
<productname>Postgres</productname>. <filename>libpq</filename> is a set
|
||||||
of library routines that allow client programs to pass queries to the
|
of library routines that allow client programs to pass queries to the
|
||||||
<productname>Postgres</productname> backend server and to receive the
|
<productname>Postgres</productname> backend server and to receive the
|
||||||
results of these queries. <filename>libpq</filename> is also the
|
results of these queries. <filename>libpq</filename> is also the
|
||||||
underlying engine for several other <productname>PostgreSQL</productname>
|
underlying engine for several other <productname>Postgres</productname>
|
||||||
application interfaces, including <filename>libpq++</filename> (C++),
|
application interfaces, including <filename>libpq++</filename> (C++),
|
||||||
<filename>libpgtcl</filename> (Tcl), <productname>Perl</productname>, and
|
<filename>libpgtcl</filename> (Tcl), <productname>Perl</productname>, and
|
||||||
<filename>ecpg</filename>. So some aspects of libpq's behavior will be
|
<filename>ecpg</filename>. So some aspects of libpq's behavior will be
|
||||||
@ -415,7 +415,7 @@ struct PQconninfoOption
|
|||||||
is leaked for each call to PQconndefaults().
|
is leaked for each call to PQconndefaults().
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In PostgreSQL versions before 7.0, PQconndefaults() returned a pointer
|
In Postgres versions before 7.0, PQconndefaults() returned a pointer
|
||||||
to a static array, rather than a dynamically allocated array. That
|
to a static array, rather than a dynamically allocated array. That
|
||||||
wasn't thread-safe, so the behavior has been changed.
|
wasn't thread-safe, so the behavior has been changed.
|
||||||
</para>
|
</para>
|
||||||
@ -484,7 +484,7 @@ libpq application programmers should be careful to
|
|||||||
maintain the PGconn abstraction. Use the accessor functions below to get
|
maintain the PGconn abstraction. Use the accessor functions below to get
|
||||||
at the contents of PGconn. Avoid directly referencing the fields of the
|
at the contents of PGconn. Avoid directly referencing the fields of the
|
||||||
PGconn structure because they are subject to change in the future.
|
PGconn structure because they are subject to change in the future.
|
||||||
(Beginning in <productname>PostgreSQL</productname> release 6.4, the
|
(Beginning in <productname>Postgres</productname> release 6.4, the
|
||||||
definition of struct PGconn is not even provided in <filename>libpq-fe.h</filename>.
|
definition of struct PGconn is not even provided in <filename>libpq-fe.h</filename>.
|
||||||
If you have old code that accesses PGconn fields directly, you can keep using it
|
If you have old code that accesses PGconn fields directly, you can keep using it
|
||||||
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
|
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
|
||||||
@ -985,7 +985,7 @@ and is not thread-safe.
|
|||||||
<function>PQprint</function>
|
<function>PQprint</function>
|
||||||
Prints out all the tuples and, optionally, the
|
Prints out all the tuples and, optionally, the
|
||||||
attribute names to the specified output stream.
|
attribute names to the specified output stream.
|
||||||
<synopsis>
|
<synopsis>
|
||||||
void PQprint(FILE* fout, /* output stream */
|
void PQprint(FILE* fout, /* output stream */
|
||||||
const PGresult *res,
|
const PGresult *res,
|
||||||
const PQprintOpt *po);
|
const PQprintOpt *po);
|
||||||
@ -998,11 +998,11 @@ struct {
|
|||||||
pqbool expanded; /* expand tables */
|
pqbool expanded; /* expand tables */
|
||||||
pqbool pager; /* use pager for output if needed */
|
pqbool pager; /* use pager for output if needed */
|
||||||
char *fieldSep; /* field separator */
|
char *fieldSep; /* field separator */
|
||||||
char *tableOpt; /* insert to HTML <table ...> */
|
char *tableOpt; /* insert to HTML <replaceable>table ...</replaceable> */
|
||||||
char *caption; /* HTML <caption> */
|
char *caption; /* HTML <replaceable>caption</replaceable> */
|
||||||
char **fieldName; /* null terminated array of replacement field names */
|
char **fieldName; /* null terminated array of replacement field names */
|
||||||
} PQprintOpt;
|
} PQprintOpt;
|
||||||
</synopsis>
|
</synopsis>
|
||||||
This function was formerly used by <application>psql</application>
|
This function was formerly used by <application>psql</application>
|
||||||
to print query results, but this is no longer the case and this
|
to print query results, but this is no longer the case and this
|
||||||
function is no longer actively supported.
|
function is no longer actively supported.
|
||||||
@ -1342,7 +1342,7 @@ is not currently open or the backend is not currently processing a query.
|
|||||||
<title>Fast Path</title>
|
<title>Fast Path</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> provides a fast path interface to send
|
<productname>Postgres</productname> provides a fast path interface to send
|
||||||
function calls to the backend. This is a trapdoor into system internals and
|
function calls to the backend. This is a trapdoor into system internals and
|
||||||
can be a potential security hole. Most users will not need this feature.
|
can be a potential security hole. Most users will not need this feature.
|
||||||
|
|
||||||
@ -1398,7 +1398,7 @@ typedef struct {
|
|||||||
<title>Asynchronous Notification</title>
|
<title>Asynchronous Notification</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> supports asynchronous notification via the
|
<productname>Postgres</productname> supports asynchronous notification via the
|
||||||
LISTEN and NOTIFY commands. A backend registers its interest in a particular
|
LISTEN and NOTIFY commands. A backend registers its interest in a particular
|
||||||
notification condition with the LISTEN command (and can stop listening
|
notification condition with the LISTEN command (and can stop listening
|
||||||
with the UNLISTEN command). All backends listening on a
|
with the UNLISTEN command). All backends listening on a
|
||||||
@ -1438,7 +1438,7 @@ be sure to free it with <function>free()</function> to avoid a memory leak.
|
|||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
In <productname>PostgreSQL</productname> 6.4 and later,
|
In <productname>Postgres</productname> 6.4 and later,
|
||||||
the <literal>be_pid</literal> is the notifying backend's,
|
the <literal>be_pid</literal> is the notifying backend's,
|
||||||
whereas in earlier versions it was always your own backend's <acronym>PID</acronym>.
|
whereas in earlier versions it was always your own backend's <acronym>PID</acronym>.
|
||||||
</para>
|
</para>
|
||||||
@ -1484,7 +1484,7 @@ if any notifications came in during the processing of the query.
|
|||||||
<title>Functions Associated with the COPY Command</title>
|
<title>Functions Associated with the COPY Command</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The COPY command in <productname>PostgreSQL</productname> has options to read from
|
The COPY command in <productname>Postgres</productname> has options to read from
|
||||||
or write to the network connection used by <filename>libpq</filename>.
|
or write to the network connection used by <filename>libpq</filename>.
|
||||||
Therefore, functions are necessary to access this network
|
Therefore, functions are necessary to access this network
|
||||||
connection directly so applications may take advantage of this capability.
|
connection directly so applications may take advantage of this capability.
|
||||||
@ -1568,7 +1568,7 @@ The data returned will not extend beyond a newline character. If possible
|
|||||||
a whole line will be returned at one time. But if the buffer offered by
|
a whole line will be returned at one time. But if the buffer offered by
|
||||||
the caller is too small to hold a line sent by the backend, then a partial
|
the caller is too small to hold a line sent by the backend, then a partial
|
||||||
data line will be returned. This can be detected by testing whether the
|
data line will be returned. This can be detected by testing whether the
|
||||||
last returned byte is <quote><literal>\n</literal></quote> or not.
|
last returned byte is "<literal>\n</literal>" or not.
|
||||||
The returned string is not null-terminated. (If you want to add a
|
The returned string is not null-terminated. (If you want to add a
|
||||||
terminating null, be sure to pass a bufsize one smaller than the room
|
terminating null, be sure to pass a bufsize one smaller than the room
|
||||||
actually available.)
|
actually available.)
|
||||||
@ -1585,7 +1585,7 @@ int PQputline(PGconn *conn,
|
|||||||
const char *string);
|
const char *string);
|
||||||
</synopsis>
|
</synopsis>
|
||||||
Note the application must explicitly send the two
|
Note the application must explicitly send the two
|
||||||
characters <quote><literal>\.</literal></quote> on a final line to indicate to
|
characters "<literal>\.</literal>" on a final line to indicate to
|
||||||
the backend that it has finished sending its data.
|
the backend that it has finished sending its data.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -1615,7 +1615,7 @@ specified directly.
|
|||||||
sent to the backend using <function>PQputline</function> or when the
|
sent to the backend using <function>PQputline</function> or when the
|
||||||
last string has been received from the backend
|
last string has been received from the backend
|
||||||
using <function>PGgetline</function>. It must be issued or the backend
|
using <function>PGgetline</function>. It must be issued or the backend
|
||||||
may get <quote>out of sync</quote> with the frontend. Upon
|
may get "out of sync" with the frontend. Upon
|
||||||
return from this function, the backend is ready to
|
return from this function, the backend is ready to
|
||||||
receive the next query.
|
receive the next query.
|
||||||
The return value is 0 on successful completion,
|
The return value is 0 on successful completion,
|
||||||
@ -1718,7 +1718,7 @@ PQsetNoticeProcessor(PGconn *conn,
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By default, <application>libpq</application> prints <quote>notice</quote>
|
By default, <application>libpq</application> prints "notice"
|
||||||
messages from the backend on <filename>stderr</filename>,
|
messages from the backend on <filename>stderr</filename>,
|
||||||
as well as a few error messages that it generates by itself.
|
as well as a few error messages that it generates by itself.
|
||||||
This behavior can be overridden by supplying a callback function that
|
This behavior can be overridden by supplying a callback function that
|
||||||
@ -1777,14 +1777,14 @@ Without a host name, libpq will connect using a local Unix domain socket.
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<envar>PGPORT</envar> sets the default port or local Unix domain socket
|
<envar>PGPORT</envar> sets the default port or local Unix domain socket
|
||||||
file extension for communicating with the <productname>PostgreSQL</productname>
|
file extension for communicating with the <productname>Postgres</productname>
|
||||||
backend.
|
backend.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<envar>PGDATABASE</envar> sets the default
|
<envar>PGDATABASE</envar> sets the default
|
||||||
<productname>PostgreSQL</productname> database name.
|
<productname>Postgres</productname> database name.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -1802,8 +1802,8 @@ sets the password used if the backend demands password authentication.
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<envar>PGREALM</envar> sets the Kerberos realm to use with
|
<envar>PGREALM</envar> sets the Kerberos realm to use with
|
||||||
<productname>PostgreSQL</productname>, if it is different from the local realm.
|
<productname>Postgres</productname>, if it is different from the local realm.
|
||||||
If <envar>PGREALM</envar> is set, <productname>PostgreSQL</productname>
|
If <envar>PGREALM</envar> is set, <productname>Postgres</productname>
|
||||||
applications will attempt authentication with servers for this realm and use
|
applications will attempt authentication with servers for this realm and use
|
||||||
separate ticket files to avoid conflicts with local
|
separate ticket files to avoid conflicts with local
|
||||||
ticket files. This environment variable is only
|
ticket files. This environment variable is only
|
||||||
@ -1813,7 +1813,7 @@ used if Kerberos authentication is selected by the backend.
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<envar>PGOPTIONS</envar> sets additional runtime options for
|
<envar>PGOPTIONS</envar> sets additional runtime options for
|
||||||
the <productname>PostgreSQL</productname> backend.
|
the <productname>Postgres</productname> backend.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -1878,7 +1878,7 @@ for information on correct values for these environment variables.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<filename>libpq</filename> is thread-safe as of
|
<filename>libpq</filename> is thread-safe as of
|
||||||
<productname>PostgreSQL</productname> 7.0, so long as no two threads
|
<productname>Postgres</productname> 7.0, so long as no two threads
|
||||||
attempt to manipulate the same PGconn object at the same time. In particular,
|
attempt to manipulate the same PGconn object at the same time. In particular,
|
||||||
you can't issue concurrent queries from different threads through the same
|
you can't issue concurrent queries from different threads through the same
|
||||||
connection object. (If you need to run concurrent queries, start up multiple
|
connection object. (If you need to run concurrent queries, start up multiple
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.2 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.3 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="lisp">
|
<chapter id="lisp">
|
||||||
@ -31,8 +31,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.2 2000/03/31 03:27:41 t
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The code (version 0.2) is available under GNU GPL from
|
The code (version 0.2) is available under GNU GPL from
|
||||||
<ulink url="http://www.chez.com/emarsden/downloads/pg.el">
|
<ulink url="http://www.chez.com/emarsden/downloads/pg.el">Eric Marsden</ulink>
|
||||||
http://www.chez.com/emarsden/downloads/pg.el</ulink>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.10 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.11 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="largeObjects">
|
<chapter id="largeObjects">
|
||||||
@ -288,235 +288,235 @@ SELECT lo_export(image.raster, '/tmp/motd') from image
|
|||||||
<para>
|
<para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/*--------------------------------------------------------------
|
/*--------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* testlo.c--
|
* testlo.c--
|
||||||
* test using large objects with libpq
|
* test using large objects with libpq
|
||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* /usr/local/devel/pglite/cvs/src/doc/manual.me,v 1.16 1995/09/01 23:55:00 jolly Exp
|
* /usr/local/devel/pglite/cvs/src/doc/manual.me,v 1.16 1995/09/01 23:55:00 jolly Exp
|
||||||
*
|
*
|
||||||
*--------------------------------------------------------------
|
*--------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "libpq-fe.h"
|
#include "libpq-fe.h"
|
||||||
#include "libpq/libpq-fs.h"
|
#include "libpq/libpq-fs.h"
|
||||||
|
|
||||||
#define BUFSIZE 1024
|
#define BUFSIZE 1024
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* importFile * import file "in_filename" into database as large object "lobjOid"
|
* importFile * import file "in_filename" into database as large object "lobjOid"
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Oid importFile(PGconn *conn, char *filename)
|
Oid importFile(PGconn *conn, char *filename)
|
||||||
{
|
{
|
||||||
Oid lobjId;
|
Oid lobjId;
|
||||||
int lobj_fd;
|
int lobj_fd;
|
||||||
char buf[BUFSIZE];
|
char buf[BUFSIZE];
|
||||||
int nbytes, tmp;
|
int nbytes, tmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* open the file to be read in
|
* open the file to be read in
|
||||||
*/
|
*/
|
||||||
fd = open(filename, O_RDONLY, 0666);
|
fd = open(filename, O_RDONLY, 0666);
|
||||||
if (fd < 0) { /* error */
|
if (fd < 0) { /* error */
|
||||||
fprintf(stderr, "can't open unix file %s\n", filename);
|
fprintf(stderr, "can't open unix file %s\n", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* create the large object
|
* create the large object
|
||||||
*/
|
*/
|
||||||
lobjId = lo_creat(conn, INV_READ|INV_WRITE);
|
lobjId = lo_creat(conn, INV_READ|INV_WRITE);
|
||||||
if (lobjId == 0) {
|
if (lobjId == 0) {
|
||||||
fprintf(stderr, "can't create large object\n");
|
fprintf(stderr, "can't create large object\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
|
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
|
||||||
/*
|
/*
|
||||||
* read in from the Unix file and write to the inversion file
|
* read in from the Unix file and write to the inversion file
|
||||||
*/
|
*/
|
||||||
while ((nbytes = read(fd, buf, BUFSIZE)) > 0) {
|
while ((nbytes = read(fd, buf, BUFSIZE)) > 0) {
|
||||||
tmp = lo_write(conn, lobj_fd, buf, nbytes);
|
tmp = lo_write(conn, lobj_fd, buf, nbytes);
|
||||||
if (tmp < nbytes) {
|
if (tmp < nbytes) {
|
||||||
fprintf(stderr, "error while reading large object\n");
|
fprintf(stderr, "error while reading large object\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
(void) lo_close(conn, lobj_fd);
|
(void) lo_close(conn, lobj_fd);
|
||||||
|
|
||||||
return lobjId;
|
return lobjId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pickout(PGconn *conn, Oid lobjId, int start, int len)
|
void pickout(PGconn *conn, Oid lobjId, int start, int len)
|
||||||
{
|
{
|
||||||
int lobj_fd;
|
int lobj_fd;
|
||||||
char* buf;
|
char* buf;
|
||||||
int nbytes;
|
int nbytes;
|
||||||
int nread;
|
int nread;
|
||||||
|
|
||||||
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
||||||
if (lobj_fd < 0) {
|
if (lobj_fd < 0) {
|
||||||
fprintf(stderr,"can't open large object %d\n",
|
fprintf(stderr,"can't open large object %d\n",
|
||||||
lobjId);
|
lobjId);
|
||||||
}
|
}
|
||||||
|
|
||||||
lo_lseek(conn, lobj_fd, start, SEEK_SET);
|
lo_lseek(conn, lobj_fd, start, SEEK_SET);
|
||||||
buf = malloc(len+1);
|
buf = malloc(len+1);
|
||||||
|
|
||||||
nread = 0;
|
nread = 0;
|
||||||
while (len - nread > 0) {
|
while (len - nread > 0) {
|
||||||
nbytes = lo_read(conn, lobj_fd, buf, len - nread);
|
nbytes = lo_read(conn, lobj_fd, buf, len - nread);
|
||||||
buf[nbytes] = ' ';
|
buf[nbytes] = ' ';
|
||||||
fprintf(stderr,">>> %s", buf);
|
fprintf(stderr,">>> %s", buf);
|
||||||
nread += nbytes;
|
nread += nbytes;
|
||||||
}
|
}
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
lo_close(conn, lobj_fd);
|
lo_close(conn, lobj_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void overwrite(PGconn *conn, Oid lobjId, int start, int len)
|
void overwrite(PGconn *conn, Oid lobjId, int start, int len)
|
||||||
{
|
{
|
||||||
int lobj_fd;
|
int lobj_fd;
|
||||||
char* buf;
|
char* buf;
|
||||||
int nbytes;
|
int nbytes;
|
||||||
int nwritten;
|
int nwritten;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
||||||
if (lobj_fd < 0) {
|
if (lobj_fd < 0) {
|
||||||
fprintf(stderr,"can't open large object %d\n",
|
fprintf(stderr,"can't open large object %d\n",
|
||||||
lobjId);
|
lobjId);
|
||||||
}
|
}
|
||||||
|
|
||||||
lo_lseek(conn, lobj_fd, start, SEEK_SET);
|
lo_lseek(conn, lobj_fd, start, SEEK_SET);
|
||||||
buf = malloc(len+1);
|
buf = malloc(len+1);
|
||||||
|
|
||||||
for (i=0;i<len;i++)
|
for (i=0;i<len;i++)
|
||||||
buf[i] = 'X';
|
buf[i] = 'X';
|
||||||
buf[i] = ' ';
|
buf[i] = ' ';
|
||||||
|
|
||||||
nwritten = 0;
|
nwritten = 0;
|
||||||
while (len - nwritten > 0) {
|
while (len - nwritten > 0) {
|
||||||
nbytes = lo_write(conn, lobj_fd, buf + nwritten, len - nwritten);
|
nbytes = lo_write(conn, lobj_fd, buf + nwritten, len - nwritten);
|
||||||
nwritten += nbytes;
|
nwritten += nbytes;
|
||||||
}
|
}
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
lo_close(conn, lobj_fd);
|
lo_close(conn, lobj_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* exportFile * export large object "lobjOid" to file "out_filename"
|
* exportFile * export large object "lobjOid" to file "out_filename"
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void exportFile(PGconn *conn, Oid lobjId, char *filename)
|
void exportFile(PGconn *conn, Oid lobjId, char *filename)
|
||||||
{
|
{
|
||||||
int lobj_fd;
|
int lobj_fd;
|
||||||
char buf[BUFSIZE];
|
char buf[BUFSIZE];
|
||||||
int nbytes, tmp;
|
int nbytes, tmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* create an inversion "object"
|
* create an inversion "object"
|
||||||
*/
|
*/
|
||||||
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
||||||
if (lobj_fd < 0) {
|
if (lobj_fd < 0) {
|
||||||
fprintf(stderr,"can't open large object %d\n",
|
fprintf(stderr,"can't open large object %d\n",
|
||||||
lobjId);
|
lobjId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* open the file to be written to
|
* open the file to be written to
|
||||||
*/
|
*/
|
||||||
fd = open(filename, O_CREAT|O_WRONLY, 0666);
|
fd = open(filename, O_CREAT|O_WRONLY, 0666);
|
||||||
if (fd < 0) { /* error */
|
if (fd < 0) { /* error */
|
||||||
fprintf(stderr, "can't open unix file %s\n",
|
fprintf(stderr, "can't open unix file %s\n",
|
||||||
filename);
|
filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* read in from the Unix file and write to the inversion file
|
* read in from the Unix file and write to the inversion file
|
||||||
*/
|
*/
|
||||||
while ((nbytes = lo_read(conn, lobj_fd, buf, BUFSIZE)) > 0) {
|
while ((nbytes = lo_read(conn, lobj_fd, buf, BUFSIZE)) > 0) {
|
||||||
tmp = write(fd, buf, nbytes);
|
tmp = write(fd, buf, nbytes);
|
||||||
if (tmp < nbytes) {
|
if (tmp < nbytes) {
|
||||||
fprintf(stderr,"error while writing %s\n",
|
fprintf(stderr,"error while writing %s\n",
|
||||||
filename);
|
filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) lo_close(conn, lobj_fd);
|
(void) lo_close(conn, lobj_fd);
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
exit_nicely(PGconn* conn)
|
exit_nicely(PGconn* conn)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *in_filename, *out_filename;
|
char *in_filename, *out_filename;
|
||||||
char *database;
|
char *database;
|
||||||
Oid lobjOid;
|
Oid lobjOid;
|
||||||
PGconn *conn;
|
PGconn *conn;
|
||||||
PGresult *res;
|
PGresult *res;
|
||||||
|
|
||||||
if (argc != 4) {
|
if (argc != 4) {
|
||||||
fprintf(stderr, "Usage: %s database_name in_filename out_filename\n",
|
fprintf(stderr, "Usage: %s database_name in_filename out_filename\n",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
database = argv[1];
|
database = argv[1];
|
||||||
in_filename = argv[2];
|
in_filename = argv[2];
|
||||||
out_filename = argv[3];
|
out_filename = argv[3];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set up the connection
|
* set up the connection
|
||||||
*/
|
*/
|
||||||
conn = PQsetdb(NULL, NULL, NULL, NULL, database);
|
conn = PQsetdb(NULL, NULL, NULL, NULL, database);
|
||||||
|
|
||||||
/* check to see that the backend connection was successfully made */
|
/* check to see that the backend connection was successfully made */
|
||||||
if (PQstatus(conn) == CONNECTION_BAD) {
|
if (PQstatus(conn) == CONNECTION_BAD) {
|
||||||
fprintf(stderr,"Connection to database '%s' failed.\n", database);
|
fprintf(stderr,"Connection to database '%s' failed.\n", database);
|
||||||
fprintf(stderr,"%s",PQerrorMessage(conn));
|
fprintf(stderr,"%s",PQerrorMessage(conn));
|
||||||
exit_nicely(conn);
|
exit_nicely(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
res = PQexec(conn, "begin");
|
res = PQexec(conn, "begin");
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
|
||||||
printf("importing file %s\n", in_filename);
|
printf("importing file %s\n", in_filename);
|
||||||
/* lobjOid = importFile(conn, in_filename); */
|
/* lobjOid = importFile(conn, in_filename); */
|
||||||
lobjOid = lo_import(conn, in_filename);
|
lobjOid = lo_import(conn, in_filename);
|
||||||
/*
|
/*
|
||||||
printf("as large object %d.\n", lobjOid);
|
printf("as large object %d.\n", lobjOid);
|
||||||
|
|
||||||
printf("picking out bytes 1000-2000 of the large object\n");
|
printf("picking out bytes 1000-2000 of the large object\n");
|
||||||
pickout(conn, lobjOid, 1000, 1000);
|
pickout(conn, lobjOid, 1000, 1000);
|
||||||
|
|
||||||
printf("overwriting bytes 1000-2000 of the large object with X's\n");
|
printf("overwriting bytes 1000-2000 of the large object with X's\n");
|
||||||
overwrite(conn, lobjOid, 1000, 1000);
|
overwrite(conn, lobjOid, 1000, 1000);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
printf("exporting large object to file %s\n", out_filename);
|
printf("exporting large object to file %s\n", out_filename);
|
||||||
/* exportFile(conn, lobjOid, out_filename); */
|
/* exportFile(conn, lobjOid, out_filename); */
|
||||||
lo_export(conn, lobjOid,out_filename);
|
lo_export(conn, lobjOid,out_filename);
|
||||||
|
|
||||||
res = PQexec(conn, "end");
|
res = PQexec(conn, "end");
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.7 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.8 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="manage-ag">
|
<chapter id="manage-ag">
|
||||||
@ -133,9 +133,9 @@ Type: \copyright for distribution terms
|
|||||||
White space (i.e., spaces, tabs and newlines) may be
|
White space (i.e., spaces, tabs and newlines) may be
|
||||||
used freely in <acronym>SQL</acronym> queries.
|
used freely in <acronym>SQL</acronym> queries.
|
||||||
Single-line comments are denoted by two dashes
|
Single-line comments are denoted by two dashes
|
||||||
(<quote>--</quote>). Everything after the dashes up to the end of the
|
("<literal>--</literal>"). Everything after the dashes up to the end of the
|
||||||
line is ignored. Multiple-line comments, and comments within a line,
|
line is ignored. Multiple-line comments, and comments within a line,
|
||||||
are denoted by <quote>/* ... */</quote>, a convention borrowed
|
are denoted by "<literal>/* ... */</literal>", a convention borrowed
|
||||||
from <productname>Ingres</productname>.
|
from <productname>Ingres</productname>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.9 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.10 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="manage">
|
<Chapter Id="manage">
|
||||||
@ -46,7 +46,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.9 2000/03/31 03:27:41
|
|||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
To create a new database named <Quote>mydb</Quote> from the command line, type
|
To create a new database named <literal>mydb</literal> from the command line, type
|
||||||
<ProgramListing>
|
<ProgramListing>
|
||||||
% createdb mydb
|
% createdb mydb
|
||||||
</ProgramListing>
|
</ProgramListing>
|
||||||
@ -93,7 +93,7 @@ ERROR: CREATE DATABASE: Permission denied.
|
|||||||
Consult with the site administrator
|
Consult with the site administrator
|
||||||
regarding preconfigured alternate database locations.
|
regarding preconfigured alternate database locations.
|
||||||
Any valid environment variable name may be used to reference an alternate location,
|
Any valid environment variable name may be used to reference an alternate location,
|
||||||
although using variable names with a prefix of <quote>PGDATA</quote> is recommended
|
although using variable names with a prefix of <envar>PGDATA</envar> is recommended
|
||||||
to avoid confusion
|
to avoid confusion
|
||||||
and conflict with other variables.
|
and conflict with other variables.
|
||||||
</Para>
|
</Para>
|
||||||
@ -185,7 +185,7 @@ enter, edit, and execute <Acronym>SQL</Acronym> commands.
|
|||||||
library. This allows you to submit <Acronym>SQL</Acronym> commands
|
library. This allows you to submit <Acronym>SQL</Acronym> commands
|
||||||
from C and get answers and status messages back to
|
from C and get answers and status messages back to
|
||||||
your program. This interface is discussed further
|
your program. This interface is discussed further
|
||||||
in section ??.
|
in <citetitle>The PostgreSQL Programmer's Guide</citetitle>.
|
||||||
</Para>
|
</Para>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</ItemizedList>
|
</ItemizedList>
|
||||||
@ -217,7 +217,7 @@ This prompt indicates that psql is listening
|
|||||||
to you and that you can type <Acronym>SQL</Acronym> queries into a
|
to you and that you can type <Acronym>SQL</Acronym> queries into a
|
||||||
workspace maintained by the terminal monitor.
|
workspace maintained by the terminal monitor.
|
||||||
The <Application>psql</Application> program responds to escape codes that begin
|
The <Application>psql</Application> program responds to escape codes that begin
|
||||||
with the backslash character, <Quote>\</Quote> For example, you
|
with the backslash character, "<literal>\</literal>". For example, you
|
||||||
can get help on the syntax of various
|
can get help on the syntax of various
|
||||||
<ProductName>PostgreSQL</ProductName> <Acronym>SQL</Acronym> commands by typing:
|
<ProductName>PostgreSQL</ProductName> <Acronym>SQL</Acronym> commands by typing:
|
||||||
<ProgramListing>
|
<ProgramListing>
|
||||||
@ -232,7 +232,7 @@ mydb=> \g
|
|||||||
</ProgramListing>
|
</ProgramListing>
|
||||||
|
|
||||||
This tells the server to process the query. If you
|
This tells the server to process the query. If you
|
||||||
terminate your query with a semicolon, the <Quote>\g</Quote> is not
|
terminate your query with a semicolon, the "<literal>\g</literal>" is not
|
||||||
necessary.
|
necessary.
|
||||||
<Application>psql</Application> will automatically process semicolon terminated queries.
|
<Application>psql</Application> will automatically process semicolon terminated queries.
|
||||||
To read queries from a file, say myFile, instead of
|
To read queries from a file, say myFile, instead of
|
||||||
@ -251,9 +251,9 @@ mydb=> \q
|
|||||||
prompt.)
|
prompt.)
|
||||||
White space (i.e., spaces, tabs and newlines) may be
|
White space (i.e., spaces, tabs and newlines) may be
|
||||||
used freely in <Acronym>SQL</Acronym> queries. Single-line comments are denoted by
|
used freely in <Acronym>SQL</Acronym> queries. Single-line comments are denoted by
|
||||||
<Quote>--</Quote>. Everything after the dashes up to the end of the
|
"<literal>--</literal>". Everything after the dashes up to the end of the
|
||||||
line is ignored. Multiple-line comments, and comments within a line,
|
line is ignored. Multiple-line comments, and comments within a line,
|
||||||
are denoted by <Quote>/* ... */</Quote>
|
are denoted by "<literal>/* ... */</literal>".
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Sect2>
|
<Sect2>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.9 2000/04/07 13:30:58 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.10 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<sect1 id="terminology">
|
<sect1 id="terminology">
|
||||||
@ -75,35 +75,35 @@ $Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.9 2000/04/07 13:30:58 tho
|
|||||||
<title>Notation</title>
|
<title>Notation</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<quote>...</quote> or <filename>/usr/local/pgsql/</filename>
|
"<literal>...</literal>" or <filename>/usr/local/pgsql/</filename>
|
||||||
at the front of a file name is used to represent the
|
at the front of a file name is used to represent the
|
||||||
path to the <Productname>Postgres</Productname> superuser's home directory.
|
path to the <Productname>Postgres</Productname> superuser's home directory.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In a command synopsis, brackets
|
In a command synopsis, brackets
|
||||||
(<quote>[</quote> and <quote>]</quote>) indicate an optional phrase or keyword.
|
("<literal>[</literal>" and "<literal>]</literal>") indicate an optional phrase or keyword.
|
||||||
Anything in braces
|
Anything in braces
|
||||||
(<quote>{</quote> and <quote>}</quote>) and containing vertical bars
|
("<literal>{</literal>" and "<literal>}</literal>") and containing vertical bars
|
||||||
(<quote>|</quote>)
|
("<literal>|</literal>")
|
||||||
indicates that you must choose one.
|
indicates that you must choose one.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In examples, parentheses (<quote>(</quote> and <quote>)</quote>) are
|
In examples, parentheses ("<literal>(</literal>" and "<literal>)</literal>") are
|
||||||
used to group boolean
|
used to group boolean
|
||||||
expressions. <quote>|</quote> is the boolean operator OR.
|
expressions. "<literal>|</literal>" is the boolean operator OR.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Examples will show commands executed from various accounts and programs.
|
Examples will show commands executed from various accounts and programs.
|
||||||
Commands executed from the root account will be preceeded with
|
Commands executed from the root account will be preceeded with
|
||||||
<quote>></quote>.
|
"<literal>></literal>".
|
||||||
Commands executed from the <Productname>Postgres</Productname>
|
Commands executed from the <Productname>Postgres</Productname>
|
||||||
superuser account will be preceeded with <quote>%</quote>, while commands
|
superuser account will be preceeded with "<literal>%</literal>", while commands
|
||||||
executed from an unprivileged user's account will be preceeded with
|
executed from an unprivileged user's account will be preceeded with
|
||||||
<quote>$</quote>.
|
"<literal>$</literal>".
|
||||||
<acronym>SQL</acronym> commands will be preceeded with <quote>=></quote>
|
<acronym>SQL</acronym> commands will be preceeded with "<literal>=></literal>"
|
||||||
or will have no leading prompt, depending on the context.
|
or will have no leading prompt, depending on the context.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.15 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="odbc">
|
<chapter id="odbc">
|
||||||
@ -125,7 +125,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
can I write it using <acronym>ODBC</acronym> calls
|
can I write it using <acronym>ODBC</acronym> calls
|
||||||
to the <productname>Postgres</productname> server,
|
to the <productname>Postgres</productname> server,
|
||||||
or is that only when another database program
|
or is that only when another database program
|
||||||
like MS SQL Server or Access needs to access the data?</quote>
|
like MS SQL Server or Access needs to access the data?
|
||||||
|
</quote>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The <acronym>ODBC</acronym> <acronym>API</acronym>
|
The <acronym>ODBC</acronym> <acronym>API</acronym>
|
||||||
@ -171,8 +172,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
<productname>ApplixWare</productname> has an
|
<productname>ApplixWare</productname> has an
|
||||||
<acronym>ODBC</acronym> database interface
|
<acronym>ODBC</acronym> database interface
|
||||||
supported on at least some platforms.
|
supported on at least some platforms.
|
||||||
<productname>ApplixWare</productname> v4.4.1 has been
|
<productname>ApplixWare</productname> v4.4.2 has been
|
||||||
demonstrated under Linux with <productname>Postgres</productname> v6.4
|
demonstrated under Linux with <productname>Postgres</productname> v7.0
|
||||||
using the <productname>psqlODBC</productname>
|
using the <productname>psqlODBC</productname>
|
||||||
driver contained in the <productname>Postgres</productname> distribution.
|
driver contained in the <productname>Postgres</productname> distribution.
|
||||||
</para>
|
</para>
|
||||||
@ -253,20 +254,36 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
command-line argument for <application>src/configure</application>:
|
command-line argument for <application>src/configure</application>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% ./configure --with-odbc
|
% ./configure --with-odbc
|
||||||
% make
|
% make
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Rebuild the <productname>Postgres</productname> distribution:
|
Rebuild the <productname>Postgres</productname> distribution:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make install
|
% make install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
|
<step performance="optional">
|
||||||
|
<para>
|
||||||
|
Install the ODBC catalog extensions available in
|
||||||
|
<filename>PGROOT/contrib/odbc/odbc.sql</filename>:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
% psql -e template1 < $PGROOT/contrib/odbc/odbc.sql
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
where specifying <literal>template1</literal> as the target
|
||||||
|
database will ensure that all subsequent new databases will
|
||||||
|
have these same definitions.
|
||||||
|
</para>
|
||||||
|
</step>
|
||||||
</procedure>
|
</procedure>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -278,7 +295,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
This can be overridden from the <application>make</application> command-line
|
This can be overridden from the <application>make</application> command-line
|
||||||
as
|
as
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make ODBCINST=<replaceable>filename</replaceable> install
|
% make ODBCINST=<replaceable>filename</replaceable> install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -304,9 +321,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
sources, type:
|
sources, type:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% ./configure
|
% ./configure
|
||||||
% make
|
% make
|
||||||
% make POSTGRESDIR=<replaceable class="parameter">PostgresTopDir</replaceable> install
|
% make POSTGRESDIR=<replaceable class="parameter">PostgresTopDir</replaceable> install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
@ -317,7 +334,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
then you can specify various destinations explicitly:
|
then you can specify various destinations explicitly:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir ODBCINST=instfile install
|
% make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir ODBCINST=instfile install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
@ -368,7 +385,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
or gzipped tarfile to an empty directory. If using the zip package
|
or gzipped tarfile to an empty directory. If using the zip package
|
||||||
unzip it with the command
|
unzip it with the command
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% unzip -a <replaceable>packagename</replaceable>
|
% unzip -a <replaceable>packagename</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
The <option>-a</option> option
|
The <option>-a</option> option
|
||||||
@ -380,7 +397,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
If you have the gzipped tar package than simply run
|
If you have the gzipped tar package than simply run
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
tar -xzf <replaceable>packagename</replaceable>
|
% tar -xzf <replaceable>packagename</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -404,8 +421,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
Create the tar file:
|
Create the tar file:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% cd interfaces/odbc
|
% cd interfaces/odbc
|
||||||
% make standalone
|
% make standalone
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
@ -429,7 +446,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
Configure the standalone installation:
|
Configure the standalone installation:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% ./configure
|
% ./configure
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -437,8 +454,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
The configuration can be done with options:
|
The configuration can be done with options:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% ./configure --prefix=<replaceable>rootdir</replaceable>
|
% ./configure --prefix=<replaceable>rootdir</replaceable> --with-odbc=<replaceable>inidir</replaceable>
|
||||||
--with-odbc=<replaceable>inidir</replaceable>
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
where <option>--prefix</option> installs the libraries and headers in
|
where <option>--prefix</option> installs the libraries and headers in
|
||||||
@ -463,7 +479,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
Compile and link the source code:
|
Compile and link the source code:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make ODBCINST=<replaceable>instdir</replaceable>
|
% make ODBCINST=<replaceable>instdir</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -493,7 +509,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
Install the source code:
|
Install the source code:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make POSTGRESDIR=<replaceable>targettree</replaceable> install
|
% make POSTGRESDIR=<replaceable>targettree</replaceable> install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -513,9 +529,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
Here is how you would specify the various destinations explicitly:
|
Here is how you would specify the various destinations explicitly:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make BINDIR=<replaceable>bindir</replaceable>
|
% make BINDIR=<replaceable>bindir</replaceable> LIBDIR=<replaceable>libdir</replaceable> HEADERDIR=<replaceable>headerdir</replaceable> install
|
||||||
LIBDIR<replaceable>>libdi</replaceable>>
|
|
||||||
HEADERDIR=<replaceable>headerdir</replaceable> install
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -523,7 +537,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
For example, typing
|
For example, typing
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make POSTGRESDIR=/opt/psqlodbc install
|
% make POSTGRESDIR=/opt/psqlodbc install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
(after you've used
|
(after you've used
|
||||||
@ -537,7 +551,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
The command
|
The command
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
% make POSTGRESDIR=/opt/psqlodbc HEADERDIR=/usr/local install
|
% make POSTGRESDIR=/opt/psqlodbc HEADERDIR=/usr/local install
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
should cause the libraries to be installed in /opt/psqlodbc/lib and
|
should cause the libraries to be installed in /opt/psqlodbc/lib and
|
||||||
@ -570,10 +584,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41
|
|||||||
<literal>[ODBC Data Sources]</literal> and must contain the following entries:
|
<literal>[ODBC Data Sources]</literal> and must contain the following entries:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
Driver = <replaceable>POSTGRESDIR</replaceable>/lib/libpsqlodbc.so
|
Driver = <replaceable>POSTGRESDIR</replaceable>/lib/libpsqlodbc.so
|
||||||
Database=<replaceable>DatabaseName</replaceable>
|
Database=<replaceable>DatabaseName</replaceable>
|
||||||
Servername=localhost
|
Servername=localhost
|
||||||
Port=5432
|
Port=5432
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
@ -632,6 +646,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>ApplixWare</title>
|
<title>ApplixWare</title>
|
||||||
|
|
||||||
@ -679,7 +694,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
find the line that starts with
|
find the line that starts with
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#libFor elfodbc /ax/<replaceable>...</replaceable>
|
#libFor elfodbc /ax/<replaceable>...</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
@ -688,7 +703,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
Change line to read
|
Change line to read
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
|
libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
which will tell elfodbc to look in this directory
|
which will tell elfodbc to look in this directory
|
||||||
@ -709,7 +724,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
described above. You may also want to add the flag
|
described above. You may also want to add the flag
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
TextAsLongVarchar=0
|
TextAsLongVarchar=0
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
to the database-specific portion of <filename>.odbc.ini</filename>
|
to the database-specific portion of <filename>.odbc.ini</filename>
|
||||||
@ -763,7 +778,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
</substeps>
|
</substeps>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You should see <quote>Starting elfodbc server</quote>
|
You should see "<literal>Starting elfodbc server</literal>"
|
||||||
in the lower left corner of the
|
in the lower left corner of the
|
||||||
data window. If you get an error dialog box, see the debugging section
|
data window. If you get an error dialog box, see the debugging section
|
||||||
below.
|
below.
|
||||||
@ -895,14 +910,14 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
the axnet process. For example, if
|
the axnet process. For example, if
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ps -aucx | grep ax
|
% ps -aucx | grep ax
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
shows
|
shows
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
cary 10432 0.0 2.6 1740 392 ? S Oct 9 0:00 axnet
|
cary 10432 0.0 2.6 1740 392 ? S Oct 9 0:00 axnet
|
||||||
cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
|
cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -910,7 +925,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
Then run
|
Then run
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
strace -f -s 1024 -p 10432
|
% strace -f -s 1024 -p 10432
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
@ -934,16 +949,16 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
For example, after getting
|
For example, after getting
|
||||||
a <quote>Cannot launch gateway on server</quote>,
|
a "<literal>Cannot launch gateway on server</literal>",
|
||||||
I ran strace on axnet and got
|
I ran strace on axnet and got
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
|
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
|
||||||
(No such file or directory)
|
(No such file or directory)
|
||||||
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
|
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
|
||||||
(No such file or directory)
|
(No such file or directory)
|
||||||
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
|
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
|
||||||
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
|
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
So what is happening is that applix elfodbc is searching for libodbc.so, but it
|
So what is happening is that applix elfodbc is searching for libodbc.so, but it
|
||||||
can't find it. That is why axnet.cnf needed to be changed.
|
can't find it. That is why axnet.cnf needed to be changed.
|
||||||
@ -1034,7 +1049,7 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
|
|
||||||
<step performance="required">
|
<step performance="required">
|
||||||
<para>
|
<para>
|
||||||
Enter the value <quote>sqldemo</quote>, then click <command>OK</command>.
|
Enter the value "<literal>sqldemo</literal>", then click <command>OK</command>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1060,10 +1075,10 @@ InstallDir = /opt/applix/axdata/axshlib
|
|||||||
<filename>~/axhome/macros/login.am</filename> file:
|
<filename>~/axhome/macros/login.am</filename> file:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
macro login
|
macro login
|
||||||
set_set_system_var@("sql_username@","tgl")
|
set_set_system_var@("sql_username@","tgl")
|
||||||
set_system_var@("sql_passwd@","no$way")
|
set_system_var@("sql_passwd@","no$way")
|
||||||
endmacro
|
endmacro
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<caution>
|
<caution>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/oper.sgml,v 1.15 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/oper.sgml,v 1.16 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="operators">
|
<Chapter Id="operators">
|
||||||
@ -22,7 +22,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/oper.sgml,v 1.15 2000/03/31 03:27:41
|
|||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
To view all variations of the <Quote>||</Quote> string concatenation operator,
|
To view all variations of the "<literal>||</literal>" string concatenation operator,
|
||||||
try
|
try
|
||||||
<ProgramListing>
|
<ProgramListing>
|
||||||
SELECT oprleft, oprright, oprresult, oprcode
|
SELECT oprleft, oprright, oprresult, oprcode
|
||||||
@ -74,15 +74,9 @@ Operator Ordering (decreasing precedence)
|
|||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry>Element</entry>
|
||||||
Element
|
<entry>Precedence</entry>
|
||||||
</entry>
|
<entry>Description</entry>
|
||||||
<entry>
|
|
||||||
Precedence
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
Description
|
|
||||||
</entry>
|
|
||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@ -141,6 +135,8 @@ right
|
|||||||
unary minus
|
unary minus
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<!--
|
||||||
|
Deprecated as of v7.0
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry>
|
||||||
;
|
;
|
||||||
@ -152,6 +148,7 @@ left
|
|||||||
statement termination, logarithm
|
statement termination, logarithm
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
-->
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry>
|
||||||
:
|
:
|
||||||
@ -283,7 +280,7 @@ string pattern matching
|
|||||||
<entry>
|
<entry>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
boolean inequality
|
inequality
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@ -305,7 +302,7 @@ NOT
|
|||||||
right
|
right
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
negation
|
logical negation
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@ -494,11 +491,14 @@ logical union
|
|||||||
<ENTRY>Natural Exponentiation</ENTRY>
|
<ENTRY>Natural Exponentiation</ENTRY>
|
||||||
<ENTRY>: 3.0</ENTRY>
|
<ENTRY>: 3.0</ENTRY>
|
||||||
</ROW>
|
</ROW>
|
||||||
|
<!--
|
||||||
|
Deprecated in v7.0, esp. since ln() is available as a generic function.
|
||||||
<ROW>
|
<ROW>
|
||||||
<ENTRY> ; </ENTRY>
|
<ENTRY> ; </ENTRY>
|
||||||
<ENTRY>Natural Logarithm</ENTRY>
|
<ENTRY>Natural Logarithm</ENTRY>
|
||||||
<ENTRY>(; 5.0)</ENTRY>
|
<ENTRY>(; 5.0)</ENTRY>
|
||||||
</ROW>
|
</ROW>
|
||||||
|
-->
|
||||||
<ROW>
|
<ROW>
|
||||||
<ENTRY> @ </ENTRY>
|
<ENTRY> @ </ENTRY>
|
||||||
<ENTRY>Absolute value</ENTRY>
|
<ENTRY>Absolute value</ENTRY>
|
||||||
@ -527,8 +527,8 @@ logical union
|
|||||||
<para>
|
<para>
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
The operators ":" and ";" are deprecated, and will be removed in
|
Two operators, ":" and ";", are now deprecated and will be removed in
|
||||||
the near future. Use the equivalent functions exp() and ln()
|
the next release. Use the equivalent functions exp() and ln()
|
||||||
instead.
|
instead.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.3 2000/03/31 06:17:21 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.4 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter>
|
<chapter>
|
||||||
@ -512,7 +512,7 @@ RETURN <replaceable>expression</replaceable>
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
RAISE <replaceable class="parameter">level</replaceable> <replaceable class="parameter">format</replaceable>'' [, <replaceable class="parameter">identifier</replaceable> [...]];
|
RAISE <replaceable class="parameter">level</replaceable> <replaceable class="parameter">format</replaceable>'' [, <replaceable class="parameter">identifier</replaceable> [...]];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Inside the format, <quote>%</quote> is used as a placeholder for the
|
Inside the format, "<literal>%</literal>" is used as a placeholder for the
|
||||||
subsequent comma-separated identifiers. Possible levels are
|
subsequent comma-separated identifiers. Possible levels are
|
||||||
DEBUG (silently suppressed in production running databases), NOTICE
|
DEBUG (silently suppressed in production running databases), NOTICE
|
||||||
(written into the database log and forwarded to the client application)
|
(written into the database log and forwarded to the client application)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<title>Ports</title>
|
<title>Ports</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This manual describes version 6.5 of <productname>Postgres</productname>.
|
This manual describes version 7.0 of <productname>Postgres</productname>.
|
||||||
The <productname>Postgres</productname> developer community has
|
The <productname>Postgres</productname> developer community has
|
||||||
compiled and tested <productname>Postgres</productname> on a
|
compiled and tested <productname>Postgres</productname> on a
|
||||||
number of platforms. Check
|
number of platforms. Check
|
||||||
@ -34,180 +34,171 @@
|
|||||||
<entry>RS6000</entry>
|
<entry>RS6000</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-05</entry>
|
<entry>2000-04-05</entry>
|
||||||
<entry>(<ulink url="mailto:Andreas.Zeugswetter@telecom.at">Andreas Zeugswetter</ulink>)</entry>
|
<entry><ulink url="mailto:Andreas.Zeugswetter@telecom.at">Andreas Zeugswetter</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>BSDI 4.01</entry>
|
<entry>BSDI 4.01</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-04</entry>
|
<entry>2000-04-04</entry>
|
||||||
<entry>(<ulink url="mailto:maillist@candle.pha.pa.us">Bruce Momjian</ulink></entry>
|
<entry><ulink url="mailto:maillist@candle.pha.pa.us">Bruce Momjian</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Compaq Tru64 5.0</entry>
|
<entry>Compaq Tru64 5.0</entry>
|
||||||
<entry>Alpha</entry>
|
<entry>Alpha</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-11</entry>
|
<entry>2000-04-11</entry>
|
||||||
<entry>(<ulink url="mailto:andrew.mcmurry@astro.uio.no">Andrew McMurry</ulink>)</entry>
|
<entry><ulink url="mailto:andrew.mcmurry@astro.uio.no">Andrew McMurry</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>FreeBSD 4.0</entry>
|
<entry>FreeBSD 4.0</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-04</entry>
|
<entry>2000-04-04</entry>
|
||||||
<entry>(<ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink>)</entry>
|
<entry><ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>HPUX</entry>
|
<entry>HPUX</entry>
|
||||||
<entry>PA-RISC</entry>
|
<entry>PA-RISC</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-12</entry>
|
<entry>2000-04-12</entry>
|
||||||
<entry>Both 9.0x and 10.20
|
<entry>Both 9.0x and 10.20.
|
||||||
(<ulink url="mailto:tgl@sss.pgh.pa.us">Tom Lane</ulink>)</entry>
|
<ulink url="mailto:tgl@sss.pgh.pa.us">Tom Lane</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>IRIX 6.5.6f</entry>
|
<entry>IRIX 6.5.6f</entry>
|
||||||
<entry>MIPS</entry>
|
<entry>MIPS</entry>
|
||||||
<entry>v6.5.3</entry>
|
<entry>v6.5.3</entry>
|
||||||
<entry>2000-02-18</entry>
|
<entry>2000-02-18</entry>
|
||||||
<entry>MIPSPro 7.3.1.1m; full N32 build
|
<entry>MIPSPro 7.3.1.1m N32 build.
|
||||||
(<ulink url="hxpro@cinesite.co.uk">Kevin Wheatley</ulink>)</entry>
|
<ulink url="hxpro@cinesite.co.uk">Kevin Wheatley</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Linux 2.0.x</entry>
|
<entry>Linux 2.0.x</entry>
|
||||||
<entry>Alpha</entry>
|
<entry>Alpha</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-05</entry>
|
<entry>2000-04-05</entry>
|
||||||
<entry> With patches
|
<entry>With published patches.
|
||||||
(<ulink url="mailto:pgsql@rkirkpat.net">Ryan Kirkpatrick</ulink>)</entry>
|
<ulink url="mailto:pgsql@rkirkpat.net">Ryan Kirkpatrick</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Linux 2.2.x</entry>
|
<entry>Linux 2.2.x</entry>
|
||||||
<entry>armv4l</entry>
|
<entry>armv4l</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-17</entry>
|
<entry>2000-04-17</entry>
|
||||||
<entry>Regression test needs work
|
<entry>Regression test needs work.
|
||||||
(<ulink url="mailto:segfault@hardline.org">Mark Knox</ulink>)</entry>
|
<ulink url="mailto:segfault@hardline.org">Mark Knox</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Linux 2.2.x</entry>
|
<entry>Linux 2.2.x</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-03-26</entry>
|
<entry>2000-03-26</entry>
|
||||||
<entry>(<ulink url="mailto:lamar.owen@wgcr.org">Lamar Owens</ulink>)</entry>
|
<entry><ulink url="mailto:lamar.owen@wgcr.org">Lamar Owens</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Linux 2.0.x</entry>
|
<entry>Linux 2.0.x</entry>
|
||||||
<entry>MIPS</entry>
|
<entry>MIPS</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-13</entry>
|
<entry>2000-04-13</entry>
|
||||||
<entry>Cobalt Qube
|
<entry>Cobalt Qube.
|
||||||
(<ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink>)</entry>
|
<ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Linux 2.2.5</entry>
|
<entry>Linux 2.2.5</entry>
|
||||||
<entry>Sparc</entry>
|
<entry>Sparc</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-02</entry>
|
<entry>2000-04-02</entry>
|
||||||
<entry>(<ulink url="mailto:szybist@boxhill.com">Tom Szybist</ulink>)</entry>
|
<entry><ulink url="mailto:szybist@boxhill.com">Tom Szybist</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>LinuxPPC R4</entry>
|
<entry>LinuxPPC R4</entry>
|
||||||
<entry>PPC603e</entry>
|
<entry>PPC603e</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-13</entry>
|
<entry>2000-04-13</entry>
|
||||||
<entry>(<ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink>)</entry>
|
<entry><ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>mklinux</entry>
|
<entry>mklinux</entry>
|
||||||
<entry>PPC750</entry>
|
<entry>PPC750</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-13</entry>
|
<entry>2000-04-13</entry>
|
||||||
<entry>(<ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink>)</entry>
|
<entry><ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD 1.4</entry>
|
<entry>NetBSD 1.4</entry>
|
||||||
<entry>arm32</entry>
|
<entry>arm32</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-08</entry>
|
<entry>2000-04-08</entry>
|
||||||
<entry>(<ulink url="mailto:prlw1@newn.cam.ac.uk">Patrick
|
<entry><ulink url="mailto:prlw1@newn.cam.ac.uk">Patrick
|
||||||
Welche</ulink>)</entry>
|
Welche</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD 1.4U</entry>
|
<entry>NetBSD 1.4U</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-03-26</entry>
|
<entry>2000-03-26</entry>
|
||||||
<entry>(<ulink url="mailto:prlw1@newn.cam.ac.uk">Patrick
|
<entry><ulink url="mailto:prlw1@newn.cam.ac.uk">Patrick
|
||||||
Welche</ulink>)</entry>
|
Welche</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD</entry>
|
<entry>NetBSD</entry>
|
||||||
<entry>m68k</entry>
|
<entry>m68k</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-10</entry>
|
<entry>2000-04-10</entry>
|
||||||
<entry>Mac 8xx
|
<entry>Mac 8xx.
|
||||||
(<ulink url="mailto:hotz@jpl.nasa.gov">Henry B. Hotz</ulink>)</entry>
|
<ulink url="mailto:hotz@jpl.nasa.gov">Henry B. Hotz</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD/sparc</entry>
|
<entry>NetBSD/sparc</entry>
|
||||||
<entry>Sparc</entry>
|
<entry>Sparc</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-13</entry>
|
<entry>2000-04-13</entry>
|
||||||
<entry>(<ulink url="mailto:tih@kpnQwest.no">Tom I Helbekkmo</ulink>)</entry>
|
<entry><ulink url="mailto:tih@kpnQwest.no">Tom I Helbekkmo</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>QNX 4.25</entry>
|
<entry>QNX 4.25</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-01</entry>
|
<entry>2000-04-01</entry>
|
||||||
<entry>
|
<entry><ulink url="mailto:kardos@repas-aeg.de">Dr. Andreas Kardos</ulink></entry>
|
||||||
(<ulink url="mailto:kardos@repas-aeg.de">Dr. Andreas Kardos</ulink>)</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>SCO OpenServer 5</entry>
|
<entry>SCO OpenServer 5</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v6.5</entry>
|
<entry>v6.5</entry>
|
||||||
<entry>1999-05-25</entry>
|
<entry>1999-05-25</entry>
|
||||||
<entry>(<ulink url="mailto:andrew@compclass.com">Andrew Merrill</ulink>)</entry>
|
<entry><ulink url="mailto:andrew@compclass.com">Andrew Merrill</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>SCO UnixWare 7</entry>
|
<entry>SCO UnixWare 7</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-18</entry>
|
<entry>2000-04-18</entry>
|
||||||
<entry>See FAQ; needs patch for compiler bug
|
<entry>See FAQ.
|
||||||
(<ulink url="mailto:Bill.Allie@mug.org">Billy G. Allie</ulink>)</entry>
|
<ulink url="mailto:Bill.Allie@mug.org">Billy G. Allie</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Solaris</entry>
|
<entry>Solaris</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-12</entry>
|
<entry>2000-04-12</entry>
|
||||||
<entry>(<ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink>)</entry>
|
<entry><ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Solaris 2.5.1-2.7</entry>
|
<entry>Solaris 2.5.1-2.7</entry>
|
||||||
<entry>Sparc</entry>
|
<entry>Sparc</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-12</entry>
|
<entry>2000-04-12</entry>
|
||||||
<entry>(<ulink url="mailto:peter_e@gmx.net">Peter Eisentraut</ulink>,
|
<entry><ulink url="mailto:peter_e@gmx.net">Peter Eisentraut</ulink>,
|
||||||
<ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink>)</entry>
|
<ulink url="mailto:scrappy@hub.org">Marc Fournier</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>SunOS 4.1.4</entry>
|
<entry>SunOS 4.1.4</entry>
|
||||||
<entry>Sparc</entry>
|
<entry>Sparc</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-13</entry>
|
<entry>2000-04-13</entry>
|
||||||
<entry>(<ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink>)</entry>
|
<entry><ulink url="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</ulink></entry>
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>SVR4</entry>
|
|
||||||
<entry>MIPS</entry>
|
|
||||||
<entry>v6.4</entry>
|
|
||||||
<entry>1998-10-28</entry>
|
|
||||||
<entry>No 64-bit int compiler support
|
|
||||||
(<ulink url="mailto:ridderbusch.pad@sni.de">Frank Ridderbusch</ulink>)</entry>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Windows/Win32</entry>
|
<entry>Windows/Win32</entry>
|
||||||
@ -215,15 +206,15 @@
|
|||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-04-02</entry>
|
<entry>2000-04-02</entry>
|
||||||
<entry>Client-side libraries or ODBC/JDBC. No server-side.
|
<entry>Client-side libraries or ODBC/JDBC. No server-side.
|
||||||
(<ulink url="mha@sollentuna.net">Magnus Hagander</ulink></entry>
|
<ulink url="mha@sollentuna.net">Magnus Hagander</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>WinNT/Cygwin</entry>
|
<entry>WinNT/Cygwin</entry>
|
||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v7.0</entry>
|
<entry>v7.0</entry>
|
||||||
<entry>2000-03-30</entry>
|
<entry>2000-03-30</entry>
|
||||||
<entry>Working with the Cygwin library.
|
<entry>Uses Cygwin library.
|
||||||
(<ulink url="mailto:horak@sit.plzen-city.cz">Daniel Horak</ulink>) </entry>
|
<ulink url="mailto:horak@sit.plzen-city.cz">Daniel Horak</ulink>) </entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
@ -235,7 +226,8 @@
|
|||||||
For <productname>Windows NT</productname>,
|
For <productname>Windows NT</productname>,
|
||||||
the server-side port of <productname>Postgres</productname> uses
|
the server-side port of <productname>Postgres</productname> uses
|
||||||
the RedHat/Cygnus <productname>Cygwin</productname> library and
|
the RedHat/Cygnus <productname>Cygwin</productname> library and
|
||||||
toolset.
|
toolset. For <productname>Windows 9x</productname>, no
|
||||||
|
server-side port is available due to OS limitations.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</sect1>
|
</sect1>
|
||||||
@ -256,7 +248,7 @@
|
|||||||
tested for v7.0 or v6.5.x:
|
tested for v7.0 or v6.5.x:
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title>Obsolete Platforms</title>
|
<title>Unsupported Platforms</title>
|
||||||
<tgroup cols="4">
|
<tgroup cols="4">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
@ -268,40 +260,57 @@
|
|||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>BeOS</entry>
|
||||||
|
<entry>x86</entry>
|
||||||
|
<entry>v7.0</entry>
|
||||||
|
<entry>2000-05-01</entry>
|
||||||
|
<entry>Client-side coming soon?
|
||||||
|
<ulink url="mailto:adam@newsnipple.com">Adam Haberlach</ulink></entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>DGUX 5.4R4.11</entry>
|
<entry>DGUX 5.4R4.11</entry>
|
||||||
<entry>m88k</entry>
|
<entry>m88k</entry>
|
||||||
<entry>v6.3</entry>
|
<entry>v6.3</entry>
|
||||||
<entry>1998-03-01</entry>
|
<entry>1998-03-01</entry>
|
||||||
<entry>v6.4 probably OK. Needs new maintainer.
|
<entry>v6.4 probably OK. Needs new maintainer.
|
||||||
(<ulink url="mailto:geek+@cmu.edu">Brian E Gallew</ulink>)</entry>
|
<ulink url="mailto:geek+@cmu.edu">Brian E Gallew</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD-current</entry>
|
<entry>NetBSD-current</entry>
|
||||||
<entry>NS32532</entry>
|
<entry>NS32532</entry>
|
||||||
<entry>v6.4</entry>
|
<entry>v6.4</entry>
|
||||||
<entry>1998-10-27</entry>
|
<entry>1998-10-27</entry>
|
||||||
<entry>small problems in date/time math
|
<entry>Date math annoyances.
|
||||||
(<ulink url="mailto:jonb@metronet.com">Jon Buller</ulink>)</entry>
|
<ulink url="mailto:jonb@metronet.com">Jon Buller</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>NetBSD 1.3</entry>
|
<entry>NetBSD 1.3</entry>
|
||||||
<entry>VAX</entry>
|
<entry>VAX</entry>
|
||||||
<entry>v6.3</entry>
|
<entry>v6.3</entry>
|
||||||
<entry>1998-03-01</entry>
|
<entry>1998-03-01</entry>
|
||||||
<entry>(<ulink url="mailto:tih@kpnQwest.no">Tom I Helbekkmo</ulink>)</entry>
|
<entry>v7.0 should work.
|
||||||
|
<ulink url="mailto:tih@kpnQwest.no">Tom I Helbekkmo</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>SVR4 4.4</entry>
|
<entry>SVR4 4.4</entry>
|
||||||
<entry>m88k</entry>
|
<entry>m88k</entry>
|
||||||
<entry>v6.2.1</entry>
|
<entry>v6.2.1</entry>
|
||||||
<entry>1998-03-01</entry>
|
<entry>1998-03-01</entry>
|
||||||
<entry>Confirmed with patching; v6.4.x will need TAS spinlock code
|
<entry>v6.4.x will need TAS spinlock code.
|
||||||
(<ulink url="mailto:dlw@seavme.xroads.com">Doug Winterburn</ulink>)</entry>
|
<ulink url="mailto:dlw@seavme.xroads.com">Doug Winterburn</ulink></entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>SVR4</entry>
|
||||||
|
<entry>MIPS</entry>
|
||||||
|
<entry>v6.4</entry>
|
||||||
|
<entry>1998-10-28</entry>
|
||||||
|
<entry>No 64-bit int.
|
||||||
|
<ulink url="mailto:ridderbusch.pad@sni.de">Frank Ridderbusch</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Ultrix</entry>
|
<entry>Ultrix</entry>
|
||||||
<entry>MIPS,VAX?</entry>
|
<entry>MIPS, VAX</entry>
|
||||||
<entry>v6.x</entry>
|
<entry>v6.x</entry>
|
||||||
<entry>1998-03-01</entry>
|
<entry>1998-03-01</entry>
|
||||||
<entry>No recent reports; obsolete?</entry>
|
<entry>No recent reports; obsolete?</entry>
|
||||||
@ -342,8 +351,8 @@
|
|||||||
<entry>x86</entry>
|
<entry>x86</entry>
|
||||||
<entry>v6.x</entry>
|
<entry>v6.x</entry>
|
||||||
<entry>1998-03-01</entry>
|
<entry>1998-03-01</entry>
|
||||||
<entry>Client-only support; v1.0.9 worked with patches (<ulink
|
<entry>Client-only support; v1.0.9 worked with patches
|
||||||
url="mailto:dave@turbocat.de">David Wetzel</ulink>)</entry>
|
<ulink url="mailto:dave@turbocat.de">David Wetzel</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.36 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
||||||
@ -93,6 +93,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 th
|
|||||||
<!entity arch-dev SYSTEM "arch-dev.sgml">
|
<!entity arch-dev SYSTEM "arch-dev.sgml">
|
||||||
<!entity biblio SYSTEM "biblio.sgml">
|
<!entity biblio SYSTEM "biblio.sgml">
|
||||||
<!entity bki SYSTEM "bki.sgml">
|
<!entity bki SYSTEM "bki.sgml">
|
||||||
|
<!entity catalogs SYSTEM "catalogs.sgml">
|
||||||
<!entity compiler SYSTEM "compiler.sgml">
|
<!entity compiler SYSTEM "compiler.sgml">
|
||||||
<!entity contacts SYSTEM "contacts.sgml">
|
<!entity contacts SYSTEM "contacts.sgml">
|
||||||
<!entity cvs SYSTEM "cvs.sgml">
|
<!entity cvs SYSTEM "cvs.sgml">
|
||||||
@ -106,27 +107,28 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 th
|
|||||||
<!entity sources SYSTEM "sources.sgml">
|
<!entity sources SYSTEM "sources.sgml">
|
||||||
]>
|
]>
|
||||||
<!-- entity manpages SYSTEM "man/manpages.sgml" subdoc -->
|
<!-- entity manpages SYSTEM "man/manpages.sgml" subdoc -->
|
||||||
<Book Id="postgres">
|
|
||||||
|
<book id="postgres">
|
||||||
|
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<Title>PostgreSQL</Title>
|
<title>PostgreSQL</title>
|
||||||
<BookInfo>
|
<bookinfo>
|
||||||
<ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<BookBiblio>
|
<bookbiblio>
|
||||||
<AuthorGroup>
|
<authorgroup>
|
||||||
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
</AuthorGroup>
|
</authorgroup>
|
||||||
<!-- editor in authorgroup is not supported
|
<!-- editor in authorgroup is not supported
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
-->
|
-->
|
||||||
<Editor>
|
<editor>
|
||||||
<FirstName>Thomas</FirstName>
|
<firstname>Thomas</firstname>
|
||||||
<SurName>Lockhart</SurName>
|
<surname>Lockhart</surname>
|
||||||
<Affiliation>
|
<affiliation>
|
||||||
<OrgName>Caltech/JPL</OrgName>
|
<orgname>Caltech/JPL</orgname>
|
||||||
</Affiliation>
|
</affiliation>
|
||||||
</Editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
@ -135,17 +137,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 th
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Date>(last updated 1999-06-01)</Date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</BookBiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<LegalNotice>
|
<legalnotice>
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</Para>
|
</para>
|
||||||
</LegalNotice>
|
</legalnotice>
|
||||||
|
|
||||||
</BookInfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -161,27 +163,27 @@ Your name here...
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<preface id="preface">
|
<preface id="preface">
|
||||||
<Title>Summary</Title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<ProductName>PostgreSQL</ProductName> is an
|
<productname>PostgreSQL</productname> is an
|
||||||
open-source descendant of this original Berkeley code.
|
open-source descendant of this original Berkeley code.
|
||||||
</Para>
|
</para>
|
||||||
</Preface>
|
</preface>
|
||||||
|
|
||||||
<part Id="part-user">
|
<part id="part-user">
|
||||||
<Title>User's Guide</Title>
|
<title>User's Guide</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
Information for users.
|
Information for users.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
|
|
||||||
&intro;
|
&intro;
|
||||||
&syntax;
|
&syntax;
|
||||||
@ -202,15 +204,15 @@ Your name here...
|
|||||||
&plan;
|
&plan;
|
||||||
&populate;
|
&populate;
|
||||||
&commands;
|
&commands;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-admin">
|
<part id="part-admin">
|
||||||
<Title>Administrator's Guide</Title>
|
<title>Administrator's Guide</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
Installation and maintenance information.
|
Installation and maintenance information.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
<!--
|
<!--
|
||||||
Disable these extra intro chapters since some elements (e.g. y2k
|
Disable these extra intro chapters since some elements (e.g. y2k
|
||||||
statement) are included in the first intro.sgml and cause errors if
|
statement) are included in the first intro.sgml and cause errors if
|
||||||
@ -230,15 +232,15 @@ Your name here...
|
|||||||
&recovery;
|
&recovery;
|
||||||
®ress;
|
®ress;
|
||||||
&release;
|
&release;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-programmer">
|
<part id="part-programmer">
|
||||||
<Title>Programmer's Guide</Title>
|
<title>Programmer's Guide</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
Information for extending <ProductName>Postgres</ProductName>.
|
Information for extending <productname>Postgres</productname>.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
<!--
|
<!--
|
||||||
Disable these extra intro chapters since some elements (e.g. y2k
|
Disable these extra intro chapters since some elements (e.g. y2k
|
||||||
statement) are included in the first intro.sgml and cause errors if
|
statement) are included in the first intro.sgml and cause errors if
|
||||||
@ -259,15 +261,15 @@ Your name here...
|
|||||||
&trigger;
|
&trigger;
|
||||||
&spi;
|
&spi;
|
||||||
&xplang;
|
&xplang;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-interfaces">
|
<part id="part-interfaces">
|
||||||
<Title>Interfaces</Title>
|
<title>Interfaces</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
User and programmer interfaces.
|
User and programmer interfaces.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
&func-ref;
|
&func-ref;
|
||||||
&lobj;
|
&lobj;
|
||||||
&ecpg;
|
&ecpg;
|
||||||
@ -278,48 +280,54 @@ Your name here...
|
|||||||
&odbc;
|
&odbc;
|
||||||
&jdbc;
|
&jdbc;
|
||||||
&lisp;
|
&lisp;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-developer">
|
<part id="part-developer">
|
||||||
<Title>Developer's Guide</Title>
|
<title>Developer's Guide</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
The Developer's Guide includes discussion of design decisions and
|
The Developer's Guide includes discussion of design decisions and
|
||||||
suggestions for future development.
|
suggestions for future development.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
&sources;
|
&sources;
|
||||||
&arch-dev;
|
&arch-dev;
|
||||||
&options;
|
&options;
|
||||||
&geqo;
|
&geqo;
|
||||||
|
<!--
|
||||||
|
This listing of Postgres catalogs is currently just a copy of the old
|
||||||
|
man page. It is not up to date and has not been marked up for SGML.
|
||||||
|
- thomas 2000-04-20
|
||||||
|
&catalogs;
|
||||||
|
-->
|
||||||
&protocol;
|
&protocol;
|
||||||
&signals;
|
&signals;
|
||||||
&compiler;
|
&compiler;
|
||||||
&bki;
|
&bki;
|
||||||
&page;
|
&page;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-tutorial">
|
<part id="part-tutorial">
|
||||||
<Title>Tutorial</Title>
|
<title>Tutorial</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
Introduction for new users.
|
Introduction for new users.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
&sql;
|
&sql;
|
||||||
&arch;
|
&arch;
|
||||||
&start;
|
&start;
|
||||||
&query;
|
&query;
|
||||||
&advanced;
|
&advanced;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<part Id="part-appendix">
|
<part id="part-appendix">
|
||||||
<Title>Appendices</Title>
|
<title>Appendices</title>
|
||||||
<PartIntro>
|
<partintro>
|
||||||
<Para>
|
<para>
|
||||||
Additional related information.
|
Additional related information.
|
||||||
</Para>
|
</para>
|
||||||
</PartIntro>
|
</partintro>
|
||||||
|
|
||||||
&datetime;
|
&datetime;
|
||||||
&cvs;
|
&cvs;
|
||||||
@ -328,7 +336,7 @@ Your name here...
|
|||||||
&contacts;
|
&contacts;
|
||||||
-->
|
-->
|
||||||
&biblio;
|
&biblio;
|
||||||
</Part>
|
</part>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Omit index until we have some index entries.
|
Omit index until we have some index entries.
|
||||||
@ -337,7 +345,7 @@ Omit index until we have some index entries.
|
|||||||
</index>
|
</index>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Book>
|
</book>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<title>Identifying Bugs</title>
|
<title>Identifying Bugs</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before you ask <quote>Is this a bug?</quote>, please read and re-read the
|
Before you ask "Is this a bug?", please read and re-read the
|
||||||
documentation to verify that you can really do whatever it is you are
|
documentation to verify that you can really do whatever it is you are
|
||||||
trying. If it is not clear from the documentation whether you can do
|
trying. If it is not clear from the documentation whether you can do
|
||||||
something or not, please report that too; it's a bug in the documentation.
|
something or not, please report that too; it's a bug in the documentation.
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<para>
|
<para>
|
||||||
A program terminates with a fatal signal or an operating system
|
A program terminates with a fatal signal or an operating system
|
||||||
error message that would point to a problem in the program (a
|
error message that would point to a problem in the program (a
|
||||||
counterexample might be a <quote>disk full</quote> message,
|
counterexample might be a "disk full" message,
|
||||||
since that must be fixed outside of <productname>Postgres</productname>).
|
since that must be fixed outside of <productname>Postgres</productname>).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
Here <quote>program</quote> refers to any executable, not only the backend server.
|
Here "<literal>program</literal>" refers to any executable, not only the backend server.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<para>
|
<para>
|
||||||
The most important thing to remember about bug reporting is to state all
|
The most important thing to remember about bug reporting is to state all
|
||||||
the facts and only facts. Do not speculate what you think went wrong, what
|
the facts and only facts. Do not speculate what you think went wrong, what
|
||||||
<quote>it seemed to do</quote>, or which part of the program has a fault.
|
"it seemed to do", or which part of the program has a fault.
|
||||||
If you are not familiar with the implementation you would probably guess
|
If you are not familiar with the implementation you would probably guess
|
||||||
wrong and not help us a bit. And even if you are, educated explanations are
|
wrong and not help us a bit. And even if you are, educated explanations are
|
||||||
a great supplement to but no substitute for facts. If we are going to fix
|
a great supplement to but no substitute for facts. If we are going to fix
|
||||||
@ -104,7 +104,7 @@
|
|||||||
Reporting the bare facts
|
Reporting the bare facts
|
||||||
is relatively straightforward (you can probably copy and paste them from the
|
is relatively straightforward (you can probably copy and paste them from the
|
||||||
screen) but all too often important details are left out because someone
|
screen) but all too often important details are left out because someone
|
||||||
thought it doesn't matter or the report would <quote>ring a bell</quote>
|
thought it doesn't matter or the report would be understood
|
||||||
anyway.
|
anyway.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -134,14 +134,15 @@
|
|||||||
please try to isolate the offending queries. We probably won't set up a
|
please try to isolate the offending queries. We probably won't set up a
|
||||||
web server to reproduce your problem. In any case remember to provide
|
web server to reproduce your problem. In any case remember to provide
|
||||||
the exact input files, do not guess that the problem happens for
|
the exact input files, do not guess that the problem happens for
|
||||||
<quote>large files</quote> or <quote>mid-size databases</quote>, etc.
|
"large files" or "mid-size databases", etc. since this
|
||||||
|
information is too inexact to be of use.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The output you got. Please do not say that it <quote>didn't work</quote> or
|
The output you got. Please do not say that it "didn't work" or
|
||||||
<quote>failed</quote>. If there is an error message,
|
"failed". If there is an error message,
|
||||||
show it, even if you don't understand it. If the program terminates with
|
show it, even if you don't understand it. If the program terminates with
|
||||||
an operating system error, say which. If nothing at all happens, say so.
|
an operating system error, say which. If nothing at all happens, say so.
|
||||||
Even if the result of your test case is a program crash or otherwise obvious
|
Even if the result of your test case is a program crash or otherwise obvious
|
||||||
@ -161,12 +162,12 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The output you expected is very important to state. If you just write
|
The output you expected is very important to state. If you just write
|
||||||
<quote>This command gives me that output.</quote> or <quote>This is not
|
"This command gives me that output." or "This is not
|
||||||
what I expected.</quote>, we might run it ourselves, scan the output, and
|
what I expected.", we might run it ourselves, scan the output, and
|
||||||
think it looks okay and is exactly what we expected. We shouldn't have to
|
think it looks okay and is exactly what we expected. We shouldn't have to
|
||||||
spend the time to decode the exact semantics behind your commands.
|
spend the time to decode the exact semantics behind your commands.
|
||||||
Especially refrain from merely saying that <quote>This is not what SQL says/Oracle
|
Especially refrain from merely saying that "This is not what SQL says/Oracle
|
||||||
does.</quote> Digging out the correct behavior from <acronym>SQL</acronym>
|
does." Digging out the correct behavior from <acronym>SQL</acronym>
|
||||||
is not a fun undertaking, nor do we all know how all the other relational
|
is not a fun undertaking, nor do we all know how all the other relational
|
||||||
databases out there behave. (If your problem is a program crash you can
|
databases out there behave. (If your problem is a program crash you can
|
||||||
obviously omit this item.)
|
obviously omit this item.)
|
||||||
@ -191,14 +192,15 @@
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The PostgreSQL version. You can run the command
|
The <productname>PostgreSQL</productname> version. You can run the command
|
||||||
<literal>SELECT version();</literal> to
|
<literal>SELECT version();</literal> to
|
||||||
find out. If this function does not exist, say so, then we know that
|
find out what version you are currently running.
|
||||||
|
If this function does not exist, say so, then we know that
|
||||||
your version is old enough. If you can't start up the server or a
|
your version is old enough. If you can't start up the server or a
|
||||||
client, look into the README file in the source directory or at the
|
client, look into the README file in the source directory or at the
|
||||||
name of your distribution file or package name. If your version is older
|
name of your distribution file or package name. If your version is older
|
||||||
than 6.5 we will almost certainly tell you to upgrade. There are tons
|
than 7.0 we will almost certainly tell you to upgrade. There are tons
|
||||||
of bugs in old versions, that's why we write new ones.
|
of bug fixes in each new version, that's why we write them.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If you run a pre-packaged version, such as RPMs, say so, including any
|
If you run a pre-packaged version, such as RPMs, say so, including any
|
||||||
@ -212,7 +214,7 @@
|
|||||||
Platform information. This includes the kernel name and version, C library,
|
Platform information. This includes the kernel name and version, C library,
|
||||||
processor, memory information. In most cases it is sufficient to report
|
processor, memory information. In most cases it is sufficient to report
|
||||||
the vendor and version, but do not assume everyone knows what exactly
|
the vendor and version, but do not assume everyone knows what exactly
|
||||||
<quote>Debian</quote> contains or that everyone runs on Pentiums. If
|
"Debian" contains or that everyone runs on Pentiums. If
|
||||||
you have installation problems information about compilers, make, etc.
|
you have installation problems information about compilers, make, etc.
|
||||||
is also necessary.
|
is also necessary.
|
||||||
</para>
|
</para>
|
||||||
@ -235,12 +237,12 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
When writing a bug report, please choose non-confusing terminology.
|
When writing a bug report, please choose non-confusing terminology.
|
||||||
The software package as such is called <quote>PostgreSQL</quote>,
|
The software package as such is called "PostgreSQL",
|
||||||
sometimes <quote>Postgres</quote> for short. (Sometimes
|
sometimes "Postgres" for short. (Sometimes
|
||||||
the abbreviation <quote>Pgsql</quote> is used but don't do that.) When you
|
the abbreviation "Pgsql" is used but don't do that.) When you
|
||||||
are specifically talking about the backend server, mention that, don't
|
are specifically talking about the backend server, mention that, don't
|
||||||
just say <quote>Postgres crashes</quote>. The interactive frontend is called
|
just say "Postgres crashes". The interactive frontend is called
|
||||||
<quote>psql</quote> and is for all intends and purposes completely separate
|
"psql" and is for all intends and purposes completely separate
|
||||||
from the backend.
|
from the backend.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
@ -249,35 +251,49 @@
|
|||||||
<title>Where to report bugs</title>
|
<title>Where to report bugs</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In general, send bug reports to <pgsql-bugs@postgresql.org>. You are
|
In general, send bug reports to
|
||||||
invited to find a descriptive subject for your email message, perhaps parts
|
<ulink url="mailto:pgsql-bugs@postgresql.org">the bug report
|
||||||
of the error message.
|
mailing list</ulink>.
|
||||||
|
You are invited to find a descriptive subject for your email
|
||||||
|
message, perhaps parts of the error message.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Do not send bug reports to any of the user mailing lists, such as
|
Do not send bug reports to any of the user mailing lists, such as
|
||||||
pgsql-sql or pgsql-general. These mailing lists are for answering
|
|
||||||
user questions, their subscribers normally do not wish to receive
|
<ulink url="mailto:pgsql-sql@postgresql.org">the SQL language
|
||||||
|
mailing list</ulink>
|
||||||
|
or
|
||||||
|
<ulink url="mailto:pgsql-general@postgresql.org">the general topics
|
||||||
|
mailing list</ulink>.
|
||||||
|
These mailing lists are for answering
|
||||||
|
user questions and their subscribers normally do not wish to receive
|
||||||
bug reports. More importantly, they are unlikely to fix them.
|
bug reports. More importantly, they are unlikely to fix them.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Also, please do <emphasis>not</emphasis> send reports to
|
Also, please do <emphasis>not</emphasis> send reports to
|
||||||
<pgsql-hackers@postgresql.org>. This list is for discussing the
|
<ulink url="mailto:pgsql-hackers@postgresql.org">the developers'
|
||||||
development of <productname>PostgreSQL</productname>, it would be nice
|
mailing list</ulink>.
|
||||||
if we could keep the bug reports separate. We might choose take up a
|
This list is for discussing the
|
||||||
|
development of <productname>PostgreSQL</productname> and it would be nice
|
||||||
|
if we could keep the bug reports separate. We might choose to take up a
|
||||||
discussion
|
discussion
|
||||||
about your bug report on it, if the bug needs more review.
|
about your bug report on it, if the bug needs more review.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you have a problem with the documentation, send email to
|
If you have a problem with the documentation, send email to
|
||||||
<pgsql-docs@postgresql.org>. Refer to the document, chapter, and sections.
|
<ulink url="mailto:pgsql-docs@postgresql.org">the documentation
|
||||||
|
mailing list</ulink>.
|
||||||
|
Mention the document, chapter, and sections in your problem report.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If your bug is a portability problem on a non-supported platform, send
|
If your bug is a portability problem on a non-supported platform,
|
||||||
mail to <pgsql-ports@postgresql.org>, so we (and you) can work on
|
send mail to
|
||||||
|
<ulink url="mailto:pgsql-ports@postgresql.org">the porting issues mail list</ulink>,
|
||||||
|
so we (and you) can work on
|
||||||
porting <productname>PostgreSQL</productname> to your platform.
|
porting <productname>PostgreSQL</productname> to your platform.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -287,10 +303,11 @@
|
|||||||
email addresses are closed mailing lists. That is, you need to be
|
email addresses are closed mailing lists. That is, you need to be
|
||||||
subscribed to them in order to be allowed to post. If you simply
|
subscribed to them in order to be allowed to post. If you simply
|
||||||
want to send mail but do not want to receive list traffic, you can
|
want to send mail but do not want to receive list traffic, you can
|
||||||
subscribe to the special pgsql-loophole <quote>list</quote>, which
|
subscribe to the special pgsql-loophole mailing list, which
|
||||||
allows you to post to all <productname>PostgreSQL</productname>
|
allows you to post to all <productname>PostgreSQL</productname>
|
||||||
mailing lists without receiving any messages. Send email to
|
mailing lists without receiving any messages. Send email to
|
||||||
<pgsql-loophole-request@postgresql.org> to subscribe.
|
<ulink url="mailto:pgsql-loophole-request@postgresql.org">pgsql-loophole-request@postgresql.org</ulink>
|
||||||
|
to subscribe.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.25 2000/03/31 03:26:21 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.26 2000/05/02 20:01:52 thomas Exp $
|
||||||
|
|
||||||
Postgres Programmer's Guide.
|
Postgres Programmer's Guide.
|
||||||
-->
|
-->
|
||||||
@ -44,6 +44,7 @@ Postgres Programmer's Guide.
|
|||||||
<!entity arch-dev SYSTEM "arch-dev.sgml">
|
<!entity arch-dev SYSTEM "arch-dev.sgml">
|
||||||
<!entity biblio SYSTEM "biblio.sgml">
|
<!entity biblio SYSTEM "biblio.sgml">
|
||||||
<!entity bki SYSTEM "bki.sgml">
|
<!entity bki SYSTEM "bki.sgml">
|
||||||
|
<!entity catalogs SYSTEM "catalogs.sgml">
|
||||||
<!entity compiler SYSTEM "compiler.sgml">
|
<!entity compiler SYSTEM "compiler.sgml">
|
||||||
<!entity contacts SYSTEM "contacts.sgml">
|
<!entity contacts SYSTEM "contacts.sgml">
|
||||||
<!entity cvs SYSTEM "cvs.sgml">
|
<!entity cvs SYSTEM "cvs.sgml">
|
||||||
@ -62,7 +63,7 @@ Postgres Programmer's Guide.
|
|||||||
|
|
||||||
<title>PostgreSQL Programmer's Guide</title>
|
<title>PostgreSQL Programmer's Guide</title>
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
<releaseinfo>Covering v6.5 for general release</releaseinfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<bookbiblio>
|
<bookbiblio>
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
@ -85,13 +86,13 @@ Postgres Programmer's Guide.
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<date>(last updated 1999-06-19)</date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</bookbiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</para>
|
</para>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
|
|
||||||
@ -148,29 +149,35 @@ Disable it until we put in some info.
|
|||||||
&func-ref;
|
&func-ref;
|
||||||
-->
|
-->
|
||||||
|
|
||||||
&trigger;
|
&trigger;
|
||||||
&spi;
|
&spi;
|
||||||
&lobj;
|
&lobj;
|
||||||
&libpq;
|
&libpq;
|
||||||
&libpqpp;
|
&libpqpp;
|
||||||
&libpgtcl;
|
&libpgtcl;
|
||||||
&libpgeasy;
|
&libpgeasy;
|
||||||
&ecpg;
|
&ecpg;
|
||||||
&odbc;
|
&odbc;
|
||||||
&jdbc;
|
&jdbc;
|
||||||
&lisp;
|
&lisp;
|
||||||
|
|
||||||
<!-- development -->
|
<!-- development -->
|
||||||
|
|
||||||
&sources;
|
&sources;
|
||||||
&arch-dev;
|
&arch-dev;
|
||||||
&options;
|
&options;
|
||||||
&geqo;
|
&geqo;
|
||||||
&protocol;
|
<!--
|
||||||
&signals;
|
This listing of Postgres catalogs is currently just a copy of the old
|
||||||
&compiler;
|
man page. It is not up to date and has not been marked up for SGML.
|
||||||
&bki;
|
- thomas 2000-04-20
|
||||||
&page;
|
&catalogs;
|
||||||
|
-->
|
||||||
|
&protocol;
|
||||||
|
&signals;
|
||||||
|
&compiler;
|
||||||
|
&bki;
|
||||||
|
&page;
|
||||||
|
|
||||||
<!-- appendices -->
|
<!-- appendices -->
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.13 2000/03/27 17:14:42 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.14 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ WITH LOCATIO
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>ERROR: Unable to create database directory 'xxx'.</computeroutput></term>
|
<term><computeroutput>ERROR: Unable to create database directory '<replaceable>path</replaceable>'.</computeroutput></term>
|
||||||
<term><computeroutput>ERROR: Could not initialize database directory.</computeroutput></term>
|
<term><computeroutput>ERROR: Could not initialize database directory.</computeroutput></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
@ -164,8 +164,8 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ WITH LOCATIO
|
|||||||
<para>
|
<para>
|
||||||
An alternate location can be specified in order to,
|
An alternate location can be specified in order to,
|
||||||
for example, store the database on a different disk.
|
for example, store the database on a different disk.
|
||||||
The path must have been prepared with the <xref
|
The path must have been prepared with the
|
||||||
linkend="APP-INITLOCATION" endterm="APP-INITLOCATION-title">
|
<xref linkend="APP-INITLOCATION" endterm="APP-INITLOCATION-title">
|
||||||
command.
|
command.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.12 2000/04/23 02:08:33 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.13 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -227,6 +227,11 @@ ERROR: Cannot create index: 'index_name' already exists.
|
|||||||
access methods).
|
access methods).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Use <xref linkend="sql-dropindex-title" endterm="sql-dropindex-title">
|
||||||
|
to remove an index.
|
||||||
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-CREATEINDEX-3">
|
<refsect2 id="R2-SQL-CREATEINDEX-3">
|
||||||
<refsect2info>
|
<refsect2info>
|
||||||
<date>1998-09-09</date>
|
<date>1998-09-09</date>
|
||||||
@ -339,11 +344,6 @@ SELECT am.amname AS acc_name,
|
|||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<para>
|
|
||||||
Use <xref linkend="sql-dropindex-title" endterm="sql-dropindex-title">
|
|
||||||
to remove an index.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-CREATEINDEX-2">
|
<refsect1 id="R1-SQL-CREATEINDEX-2">
|
||||||
<title>
|
<title>
|
||||||
Usage
|
Usage
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.28 2000/04/15 23:29:58 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.29 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -905,13 +905,12 @@ ERROR: Cannot insert a duplicate key into a unique index.
|
|||||||
REFERENCES Constraint
|
REFERENCES Constraint
|
||||||
</title>
|
</title>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES
|
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ]
|
||||||
<replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ]
|
[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
|
||||||
[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
|
[ ON DELETE <replaceable class="parameter">action</replaceable> ]
|
||||||
[ ON DELETE <replaceable class="parameter">action</replaceable> ]
|
[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
|
||||||
[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
|
||||||
[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
|
|
||||||
</synopsis>
|
</synopsis>
|
||||||
<para>
|
<para>
|
||||||
The REFERENCES constraint specifies a rule that a column
|
The REFERENCES constraint specifies a rule that a column
|
||||||
@ -1448,14 +1447,13 @@ CREATE TABLE distributors (
|
|||||||
REFERENCES Constraint
|
REFERENCES Constraint
|
||||||
</title>
|
</title>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ]
|
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] )
|
||||||
FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFERENCES
|
REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ...] ) ]
|
||||||
<replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ...] ) ]
|
[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
|
||||||
[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
|
[ ON DELETE <replaceable class="parameter">action</replaceable> ]
|
||||||
[ ON DELETE <replaceable class="parameter">action</replaceable> ]
|
[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
|
||||||
[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
|
||||||
[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
|
|
||||||
</synopsis>
|
</synopsis>
|
||||||
<para>
|
<para>
|
||||||
The REFERENCES constraint specifies a rule that a column value is
|
The REFERENCES constraint specifies a rule that a column value is
|
||||||
@ -1901,7 +1899,7 @@ CREATE TEMPORARY TABLE actors (
|
|||||||
Table Constraint definition:
|
Table Constraint definition:
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] UNIQUE ( column [, ...] )
|
[ CONSTRAINT <replaceable>name</replaceable> ] UNIQUE ( <replaceable>column</replaceable> [, ...] )
|
||||||
[ { INITIALLY DEFERRED | INITIALLY IMMEDIATE } ]
|
[ { INITIALLY DEFERRED | INITIALLY IMMEDIATE } ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -1911,7 +1909,7 @@ CREATE TEMPORARY TABLE actors (
|
|||||||
Column Constraint definition:
|
Column Constraint definition:
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] UNIQUE
|
[ CONSTRAINT <replaceable>name</replaceable> ] UNIQUE
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -1928,7 +1926,7 @@ CREATE TEMPORARY TABLE actors (
|
|||||||
included for symmetry with the NOT NULL clause. Since it is the
|
included for symmetry with the NOT NULL clause. Since it is the
|
||||||
default for any column, its presence is simply noise.
|
default for any column, its presence is simply noise.
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] NULL
|
[ CONSTRAINT <replaceable>name</replaceable> ] NULL
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</para>
|
</para>
|
||||||
</refsect3>
|
</refsect3>
|
||||||
@ -1941,7 +1939,7 @@ CREATE TEMPORARY TABLE actors (
|
|||||||
|
|
||||||
SQL92 specifies some additional capabilities for NOT NULL:
|
SQL92 specifies some additional capabilities for NOT NULL:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] NOT NULL
|
[ CONSTRAINT <replaceable>name</replaceable> ] NOT NULL
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -1965,9 +1963,7 @@ the column. Not our problem...
|
|||||||
or a domain.
|
or a domain.
|
||||||
</para>
|
</para>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
DEFAULT niladic USER function |
|
DEFAULT niladic_user_function | niladic_datetime_function | NULL
|
||||||
niladic datetime function |
|
|
||||||
NULL
|
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsect3>
|
</refsect3>
|
||||||
-->
|
-->
|
||||||
@ -1994,7 +1990,7 @@ the column. Not our problem...
|
|||||||
as an alternate method for defining a constraint:
|
as an alternate method for defining a constraint:
|
||||||
</para>
|
</para>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
CREATE ASSERTION name CHECK ( condition )
|
CREATE ASSERTION <replaceable>name</replaceable> CHECK ( <replaceable>condition</replaceable> )
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -2005,7 +2001,7 @@ CREATE ASSERTION name CHECK ( condition )
|
|||||||
Domain constraint:
|
Domain constraint:
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] CHECK constraint
|
[ CONSTRAINT <replaceable>name</replaceable> ] CHECK <replaceable>constraint</replaceable>
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2015,7 +2011,7 @@ CREATE ASSERTION name CHECK ( condition )
|
|||||||
Table constraint definition:
|
Table constraint definition:
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] { PRIMARY KEY ( <replaceable class="parameter">column</replaceable>, ... ) | FOREIGN KEY constraint | UNIQUE constraint | CHECK constraint }
|
[ CONSTRAINT <replaceable>name</replaceable> ] { PRIMARY KEY ( <replaceable class="parameter">column</replaceable>, ... ) | FOREIGN KEY <replaceable>constraint</replaceable> | UNIQUE <replaceable>constraint</replaceable> | CHECK <replaceable>constraint</replaceable> }
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2025,7 +2021,7 @@ CREATE ASSERTION name CHECK ( condition )
|
|||||||
Column constraint definition:
|
Column constraint definition:
|
||||||
|
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] { NOT NULL | PRIMARY KEY | FOREIGN KEY constraint | UNIQUE | CHECK constraint }
|
[ CONSTRAINT <replaceable>name</replaceable> ] { NOT NULL | PRIMARY KEY | FOREIGN KEY <replaceable>constraint</replaceable> | UNIQUE | CHECK <replaceable>constraint</replaceable> }
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2067,8 +2063,8 @@ CREATE ASSERTION name CHECK ( condition )
|
|||||||
<term>INITIALLY IMMEDIATE</term>
|
<term>INITIALLY IMMEDIATE</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Check constraint only at the end of the transaction. This
|
Check constraint only at the end of the transaction. This
|
||||||
is the default
|
is the default
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2076,7 +2072,7 @@ CREATE ASSERTION name CHECK ( condition )
|
|||||||
<term>INITIALLY DEFERRED</term>
|
<term>INITIALLY DEFERRED</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Check constraint after each statement.
|
Check constraint after each statement.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2106,7 +2102,7 @@ affect a column or a table.
|
|||||||
<para>
|
<para>
|
||||||
table constraint definition:
|
table constraint definition:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] CHECK ( VALUE condition )
|
[ CONSTRAINT <replaceable>name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2115,7 +2111,7 @@ affect a column or a table.
|
|||||||
<para>
|
<para>
|
||||||
column constraint definition:
|
column constraint definition:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] CHECK ( VALUE condition )
|
[ CONSTRAINT <replaceable>name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2125,7 +2121,7 @@ affect a column or a table.
|
|||||||
domain constraint definition:
|
domain constraint definition:
|
||||||
</para>
|
</para>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ]
|
[ CONSTRAINT name]
|
||||||
CHECK ( VALUE condition )
|
CHECK ( VALUE condition )
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
@ -2154,7 +2150,7 @@ ALTER DOMAIN cities
|
|||||||
<para>
|
<para>
|
||||||
Table Constraint definition:
|
Table Constraint definition:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] PRIMARY KEY ( column [, ...] )
|
[ CONSTRAINT <replaceable>name</replaceable> ] PRIMARY KEY ( <replaceable>column</replaceable> [, ...] )
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -2162,7 +2158,7 @@ ALTER DOMAIN cities
|
|||||||
<para>
|
<para>
|
||||||
Column Constraint definition:
|
Column Constraint definition:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
[ CONSTRAINT name ] PRIMARY KEY
|
[ CONSTRAINT <replaceable>name</replaceable> ] PRIMARY KEY
|
||||||
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
|
||||||
[ [ NOT ] DEFERRABLE ]
|
[ [ NOT ] DEFERRABLE ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.10 2000/03/27 17:14:43 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.11 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -24,11 +24,11 @@ Postgres documentation
|
|||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
|
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
|
||||||
[ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
|
[ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
|
||||||
[ --pwprompt|-W ]
|
[ --pwprompt|-W ]
|
||||||
[ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
|
[ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
|
||||||
[ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
|
[ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
|
||||||
[ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
|
[ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-APP-INITDB-1">
|
<refsect2 id="R2-APP-INITDB-1">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgctl-ref.sgml,v 1.1 2000/04/08 02:16:26 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pgctl-ref.sgml,v 1.2 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -28,7 +28,8 @@ Postgres documentation
|
|||||||
<synopsis>
|
<synopsis>
|
||||||
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>][-p <replaceable class="parameter">path</replaceable>] [-o "<replaceable class="parameter">options</replaceable>"] start
|
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>][-p <replaceable class="parameter">path</replaceable>] [-o "<replaceable class="parameter">options</replaceable>"] start
|
||||||
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>] [-m [s[mart]|f[ast]|i[mmediate]]] stop
|
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>] [-m [s[mart]|f[ast]|i[mmediate]]] stop
|
||||||
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>] [-m [s[mart]|f[ast]|i[mmediate]] [-o "<replaceable class="parameter">options</replaceable>"] restart
|
pg_ctl [-w] [-D <replaceable class="parameter">datadir</replaceable>] [-m [s[mart]|f[ast]|i[mmediate]]
|
||||||
|
[-o "<replaceable class="parameter">options</replaceable>"] restart
|
||||||
pg_ctl [-D <replaceable class="parameter">datadir</replaceable>] status
|
pg_ctl [-D <replaceable class="parameter">datadir</replaceable>] status
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.8 2000/03/26 07:04:54 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.9 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -24,8 +24,8 @@ Postgres documentation
|
|||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
postmaster [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -D <replaceable class="parameter">DataDir</replaceable> ] [ -N <replaceable class="parameter">maxBackends</replaceable> ] [ -S ]
|
postmaster [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -D <replaceable class="parameter">DataDir</replaceable> ] [ -N <replaceable class="parameter">maxBackends</replaceable> ] [ -S ]
|
||||||
[ -d <replaceable class="parameter">DebugLevel</replaceable> ] [ -i ] [ -l ]
|
[ -d <replaceable class="parameter">DebugLevel</replaceable> ] [ -i ] [ -l ]
|
||||||
[ -o <replaceable class="parameter">BackendOptions</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -n | -s ]
|
[ -o <replaceable class="parameter">BackendOptions</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -n | -s ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-APP-POSTMASTER-1">
|
<refsect2 id="R2-APP-POSTMASTER-1">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.8 2000/03/27 17:14:43 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.9 2000/05/02 20:02:03 thomas Exp $
|
||||||
Postgres documentation
|
Postgres documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -23,8 +23,9 @@ Postgres documentation
|
|||||||
<date>1999-12-04</date>
|
<date>1999-12-04</date>
|
||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ --analyze | -z ] [ --alldb | -a ] [ --verbose | -v ]
|
vacuumdb [ <replaceable class="parameter">options</replaceable> ] [ --analyze | -z ]
|
||||||
[ --table '<replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column</replaceable> [,...] ) ]' ] [ [-d] <replaceable class="parameter">dbname</replaceable> ]
|
[ --alldb | -a ] [ --verbose | -v ]
|
||||||
|
[ --table '<replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column</replaceable> [,...] ) ]' ] [ [-d] <replaceable class="parameter">dbname</replaceable> ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-APP-VACUUMDB-1">
|
<refsect2 id="R2-APP-VACUUMDB-1">
|
||||||
@ -39,7 +40,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>[-d, --dbname] <replaceable class="parameter">dbname</replaceable></term>
|
<term>-d <replaceable class="parameter">dbname</replaceable></term>
|
||||||
|
<term>--dbname <replaceable class="parameter">dbname</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Specifies the name of the database to be cleaned or analyzed.
|
Specifies the name of the database to be cleaned or analyzed.
|
||||||
@ -48,7 +50,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-z, --analyze</term>
|
<term>-z</term>
|
||||||
|
<term>--analyze</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Calculate statistics on the database for use by the optimizer.
|
Calculate statistics on the database for use by the optimizer.
|
||||||
@ -57,7 +60,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-a, --alldb</term>
|
<term>-a</term>
|
||||||
|
<term>--alldb</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Vacuum all databases.
|
Vacuum all databases.
|
||||||
@ -66,7 +70,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-v, --verbose</term>
|
<term>-v</term>
|
||||||
|
<term>--verbose</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Print detailed information during processing.
|
Print detailed information during processing.
|
||||||
@ -75,7 +80,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-t, --table <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</term>
|
<term>-t <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</term>
|
||||||
|
<term>--table <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Clean or analyze <replaceable class="parameter">table</replaceable> only.
|
Clean or analyze <replaceable class="parameter">table</replaceable> only.
|
||||||
@ -100,7 +106,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-h, --host <replaceable class="parameter">host</replaceable></term>
|
<term>-h <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 hostname of the machine on which the
|
||||||
@ -111,7 +118,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-p, --port <replaceable class="parameter">port</replaceable></term>
|
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||||
|
<term>--port <replaceable class="parameter">port</replaceable></term>
|
||||||
<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
|
||||||
@ -122,7 +130,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-U, --username <replaceable class="parameter">username</replaceable></term>
|
<term>-U <replaceable class="parameter">username</replaceable></term>
|
||||||
|
<term>--username <replaceable class="parameter">username</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Username to connect as.
|
Username to connect as.
|
||||||
@ -131,7 +140,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-W, --password</term>
|
<term>-W</term>
|
||||||
|
<term>--password</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Force password prompt.
|
Force password prompt.
|
||||||
@ -140,7 +150,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-e, --echo</term>
|
<term>-e</term>
|
||||||
|
<term>--echo</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Echo the commands that <application>vacuumdb</application> generates
|
Echo the commands that <application>vacuumdb</application> generates
|
||||||
@ -150,7 +161,8 @@ vacuumdb [ <replaceable class="parameter">connection options</replaceable> ] [ -
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-q, --quiet</term>
|
<term>-q</term>
|
||||||
|
<term>--quiet</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Do not display a response.
|
Do not display a response.
|
||||||
|
@ -1,34 +1,8 @@
|
|||||||
<!-- reference.sgml
|
<!-- reference.sgml
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/reference.sgml,v 1.7 2000/03/30 22:22:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/reference.sgml,v 1.8 2000/05/02 20:01:52 thomas Exp $
|
||||||
|
|
||||||
Postgres User's Reference documentation.
|
Postgres User's Reference documentation.
|
||||||
- thomas 1998-08-31
|
- thomas 1998-08-31
|
||||||
|
|
||||||
$Log: reference.sgml,v $
|
|
||||||
Revision 1.7 2000/03/30 22:22:41 thomas
|
|
||||||
Accumulated fixups.
|
|
||||||
Add some chapters on new topics.
|
|
||||||
Change to referencing OASIS/Docbook v3.1 rather than Davenport/Docbook v3.0
|
|
||||||
Grepped for and fixed apparent tag mangling from emacs
|
|
||||||
"Normalize" operation. Should be the last of those.
|
|
||||||
|
|
||||||
Revision 1.6 1999/05/26 17:30:30 thomas
|
|
||||||
Add chapters on CVS access, MVCC, SQL theory to the docs.
|
|
||||||
Add an appendix with more details on date/time attributes and handling.
|
|
||||||
Update most references to Postgres version numbers to 6.5,
|
|
||||||
*except* for the porting list which will require a report
|
|
||||||
from a successful installation to be updated.
|
|
||||||
|
|
||||||
Revision 1.5 1998/10/31 09:36:37 thomas
|
|
||||||
Cleanup for v6.4 release.
|
|
||||||
Make new file current.sgml to hold release info for the current release.
|
|
||||||
Should be moved to release.sgml before filling with next release info.
|
|
||||||
|
|
||||||
Revision 1.4 1998/10/30 19:37:12 thomas
|
|
||||||
Minor editing and markup changes as a result of preparing the Postscript
|
|
||||||
documentation for v6.4.
|
|
||||||
Bigger updates to the installation instructions (install and config).
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
||||||
@ -40,24 +14,25 @@ Bigger updates to the installation instructions (install and config).
|
|||||||
<!entity biblio SYSTEM "biblio.sgml">
|
<!entity biblio SYSTEM "biblio.sgml">
|
||||||
<!entity contacts SYSTEM "contacts.sgml">
|
<!entity contacts SYSTEM "contacts.sgml">
|
||||||
]>
|
]>
|
||||||
<Book Id="reference">
|
|
||||||
|
|
||||||
<!-- Title information -->
|
<book id="reference">
|
||||||
|
|
||||||
<Title>PostgreSQL Reference Manual</Title>
|
<!-- Title information -->
|
||||||
<BookInfo>
|
|
||||||
<ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
|
<title>PostgreSQL Reference Manual</title>
|
||||||
<BookBiblio>
|
<bookinfo>
|
||||||
<AuthorGroup>
|
<releaseinfo>Covering v6.5 for general release</releaseinfo>
|
||||||
<Author>
|
<bookbiblio>
|
||||||
<FirstName>Jose</FirstName>
|
<authorgroup>
|
||||||
<SurName>Soares Da Silva</SurName>
|
<author>
|
||||||
</Author>
|
<firstname>Jose</firstname>
|
||||||
<Author>
|
<surname>Soares Da Silva</surname>
|
||||||
<FirstName>Oliver</FirstName>
|
</author>
|
||||||
<SurName>Elphick</SurName>
|
<author>
|
||||||
</Author>
|
<firstname>Oliver</firstname>
|
||||||
</AuthorGroup>
|
<surname>Elphick</surname>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
<!--
|
<!--
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
||||||
@ -75,25 +50,25 @@ Bigger updates to the installation instructions (install and config).
|
|||||||
</Affiliation>
|
</Affiliation>
|
||||||
</Editor>
|
</Editor>
|
||||||
-->
|
-->
|
||||||
<Editor>
|
<editor>
|
||||||
<FirstName>Oliver</FirstName>
|
<firstname>Oliver</firstname>
|
||||||
<SurName>Elphick</SurName>
|
<surname>Elphick</surname>
|
||||||
</Editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Date>(last updated 1999-06-01)</Date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</BookBiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<LegalNotice>
|
<legalnotice>
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>PostgreSQL</ProductName> is © 1998-9
|
<productname>PostgreSQL</productname> is © 1998-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</Para>
|
</para>
|
||||||
</LegalNotice>
|
</legalnotice>
|
||||||
|
|
||||||
</BookInfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -108,37 +83,53 @@ Your name here...
|
|||||||
</Dedication>
|
</Dedication>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Preface Id="preface">
|
<preface id="preface">
|
||||||
<Title>Summary</Title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<ProductName>PostgreSQL</ProductName> is a public-domain, open source descendant
|
<productname>PostgreSQL</productname> is a public-domain, open source descendant
|
||||||
of this original Berkeley code.
|
of this original Berkeley code.
|
||||||
</Para>
|
</para>
|
||||||
</Preface>
|
</preface>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
&intro-ref;
|
&intro-ref;
|
||||||
-->
|
-->
|
||||||
|
|
||||||
&commands;
|
&commands;
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
&contacts;
|
&contacts;
|
||||||
-->
|
-->
|
||||||
|
|
||||||
&biblio;
|
&biblio;
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<index Id="index">
|
<index Id="index">
|
||||||
</index>
|
</index>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Book>
|
</book>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,267 +1,314 @@
|
|||||||
<Chapter Id="regress">
|
<chapter id="regress">
|
||||||
<Title id="regress-title">Regression Test</Title>
|
<title id="regress-title">Regression Test</title>
|
||||||
|
|
||||||
<Abstract>
|
<abstract>
|
||||||
<Para>
|
<para>
|
||||||
Regression test instructions and analysis.
|
Regression test instructions and analysis.
|
||||||
</Para>
|
</para>
|
||||||
</Abstract>
|
</abstract>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The PostgreSQL regression tests are a comprehensive set of tests for the
|
The PostgreSQL regression tests are a comprehensive set of tests for the
|
||||||
SQL implementation embedded in PostgreSQL. They test standard SQL
|
SQL implementation embedded in PostgreSQL. They test standard SQL
|
||||||
operations as well as the extended capabilities of PostgreSQL.
|
operations as well as the extended capabilities of PostgreSQL.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
There are two different ways in which the regression tests can be run:
|
There are two different ways in which the regression tests can be run:
|
||||||
the "sequential" method and the "parallel" method. The sequential method
|
the "sequential" method and the "parallel" method. The sequential method
|
||||||
runs each test script in turn, whereas the parallel method starts up
|
runs each test script in turn, whereas the parallel method starts up
|
||||||
multiple server processes to run groups of tests in parallel. Parallel
|
multiple server processes to run groups of tests in parallel. Parallel
|
||||||
testing gives confidence that interprocess communication and locking
|
testing gives confidence that interprocess communication and locking
|
||||||
are working correctly. Another key difference is that the sequential
|
are working correctly. Another key difference is that the sequential
|
||||||
test procedure uses an already-installed postmaster, whereas the
|
test procedure uses an already-installed postmaster, whereas the
|
||||||
parallel test procedure tests a system that has been built but not yet
|
parallel test procedure tests a system that has been built but not yet
|
||||||
installed. (The parallel test script actually does an installation into
|
installed. (The parallel test script actually does an installation into
|
||||||
a temporary directory and fires up a private postmaster therein.)
|
a temporary directory and fires up a private postmaster therein.)
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some properly installed and fully functional PostgreSQL installations
|
Some properly installed and fully functional PostgreSQL installations
|
||||||
can "fail" some of these regression tests due to artifacts of floating point
|
can "fail" some of these regression tests due to artifacts of floating point
|
||||||
representation and time zone support. The tests are currently evaluated
|
representation and time zone support. The tests are currently evaluated
|
||||||
using a simple <application>diff</application> comparison against the
|
using a simple <application>diff</application> comparison against the
|
||||||
outputs generated on a reference system, so the results are sensitive to
|
outputs generated on a reference system, so the results are sensitive to
|
||||||
small system differences.
|
small system differences.
|
||||||
When a test is reported as "failed", always examine the differences
|
When a test is reported as "failed", always examine the differences
|
||||||
between expected and actual results; you may well find that the differences
|
between expected and actual results; you may well find that the differences
|
||||||
are not significant.
|
are not significant.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The regression tests were originally developed by Jolly Chen and Andrew Yu,
|
The regression tests were originally developed by Jolly Chen and Andrew Yu,
|
||||||
and were extensively revised/repackaged by Marc Fournier and Thomas Lockhart.
|
and were extensively revised/repackaged by Marc Fournier and Thomas Lockhart.
|
||||||
From <ProductName>PostgreSQL</ProductName> v6.1 onward
|
From <productname>PostgreSQL</productname> v6.1 onward
|
||||||
the regression tests are current for every official release.
|
the regression tests are current for every official release.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Regression Environment</Title>
|
<title>Regression Environment</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The regression testing notes below assume the following (except where noted):
|
The regression testing notes below assume the following (except where noted):
|
||||||
<ItemizedList Mark="bullet" Spacing="compact">
|
<itemizedlist spacing="compact" mark="bullet">
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
Commands are Unix-compatible. See note below.
|
Commands are Unix-compatible. See note below.
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
Defaults are used except where noted.
|
Defaults are used except where noted.
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
User postgres is the <ProductName>Postgres</ProductName> superuser.
|
User postgres is the <productname>Postgres</productname> superuser.
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
The source path is /usr/src/pgsql (other paths are possible).
|
The source path is /usr/src/pgsql (other paths are possible).
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para>
|
<para>
|
||||||
The runtime path is /usr/local/pgsql (other paths are possible).
|
The runtime path is /usr/local/pgsql (other paths are possible).
|
||||||
</Para>
|
</para>
|
||||||
</ListItem>
|
</listitem>
|
||||||
</ItemizedList>
|
</itemizedlist>
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Normally, the regression tests should be run as the postgres user since
|
Normally, the regression tests should be run as the postgres user since
|
||||||
the 'src/test/regress' directory and sub-directories are owned by the
|
the 'src/test/regress' directory and sub-directories are owned by the
|
||||||
postgres user. If you run the regression test as another user the
|
postgres user. If you run the regression test as another user the
|
||||||
'src/test/regress' directory tree must be writeable by that user.
|
'src/test/regress' directory tree must be writeable by that user.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
It was formerly necessary to run the postmaster with system time zone
|
It was formerly necessary to run the postmaster with system time zone
|
||||||
set to PST, but this is no longer required. You can run the regression
|
set to PST, but this is no longer required. You can run the regression
|
||||||
tests under your normal postmaster configuration. The test script will
|
tests under your normal postmaster configuration. The test script will
|
||||||
set the PGTZ environment variable to ensure that timezone-dependent tests
|
set the PGTZ environment variable to ensure that timezone-dependent tests
|
||||||
produce the expected results. However, your system must provide
|
produce the expected results. However, your system must provide
|
||||||
library support for the PST8PDT time zone, or the timezone-dependent
|
library support for the PST8PDT time zone, or the timezone-dependent
|
||||||
tests will fail.
|
tests will fail.
|
||||||
To verify that your machine does have this support, type
|
To verify that your machine does have this support, type
|
||||||
the following:
|
the following:
|
||||||
<ProgramListing>
|
|
||||||
setenv TZ PST8PDT
|
|
||||||
date
|
|
||||||
</ProgramListing>
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
<programlisting>
|
||||||
The "date" command above should have returned the current system time
|
setenv TZ PST8PDT
|
||||||
in the PST8PDT time zone. If the PST8PDT database is not available, then
|
date
|
||||||
your system may have returned the time in GMT. If the PST8PDT time zone
|
</programlisting>
|
||||||
is not available, you can set the time zone rules explicitly:
|
</para>
|
||||||
<ProgramListing>
|
|
||||||
setenv PGTZ PST8PDT7,M04.01.0,M10.05.03
|
<para>
|
||||||
</ProgramListing>
|
The "date" command above should have returned the current system time
|
||||||
</Para>
|
in the PST8PDT time zone. If the PST8PDT database is not available, then
|
||||||
|
your system may have returned the time in GMT. If the PST8PDT time zone
|
||||||
|
is not available, you can set the time zone rules explicitly:
|
||||||
|
<programlisting>
|
||||||
|
setenv PGTZ PST8PDT7,M04.01.0,M10.05.03
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The directory layout for the regression test area is:
|
||||||
|
|
||||||
|
<table tocentry="1">
|
||||||
|
<title>Directory Layout</title>
|
||||||
|
|
||||||
|
<titleabbrev>Kerberos</titleabbrev>
|
||||||
|
|
||||||
|
<tgroup cols="2">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry>Directory</entry>
|
||||||
|
<entry>Description</entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>Directory</entry>
|
||||||
|
<entry>Description</entry>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>input</entry>
|
||||||
|
<entry>
|
||||||
|
Source files that are converted using
|
||||||
|
<command>make all</command> into
|
||||||
|
some of the <filename>.sql</filename> files in the
|
||||||
|
<filename>sql</filename> subdirectory.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>output</entry>
|
||||||
|
<entry>
|
||||||
|
Source files that are converted using
|
||||||
|
<command>make all</command> into
|
||||||
|
<filename>.out</filename> files in the
|
||||||
|
<filename>expected</filename> subdirectory.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>sql</entry>
|
||||||
|
<entry>
|
||||||
|
<filename>.sql</filename> files used to perform the
|
||||||
|
regression tests.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>expected</entry>
|
||||||
|
<entry>
|
||||||
|
<filename>.out</filename> files that represent what we
|
||||||
|
<emphasis>expect</emphasis> the results to
|
||||||
|
look like.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>results</entry>
|
||||||
|
<entry>
|
||||||
|
<filename>.out</filename> files that contain what the results
|
||||||
|
<emphasis>actually</emphasis> look
|
||||||
|
like. Also used as temporary storage for table copy testing.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry>tmp_check</entry>
|
||||||
|
<entry>
|
||||||
|
Temporary installation created by parallel testing script.
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Directory Layout</Title>
|
<title>Regression Test Procedure</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<Note>
|
|
||||||
<Para>
|
|
||||||
This should become a table in the previous section.
|
|
||||||
</Para>
|
|
||||||
</Note>
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
|
||||||
<ProgramListing>
|
|
||||||
input/ .... .source files that are converted using 'make all' into
|
|
||||||
some of the .sql files in the 'sql' subdirectory
|
|
||||||
|
|
||||||
output/ ... .source files that are converted using 'make all' into
|
|
||||||
.out files in the 'expected' subdirectory
|
|
||||||
|
|
||||||
sql/ ...... .sql files used to perform the regression tests
|
|
||||||
|
|
||||||
expected/ . .out files that represent what we *expect* the results to
|
|
||||||
look like
|
|
||||||
|
|
||||||
results/ .. .out files that contain what the results *actually* look
|
|
||||||
like. Also used as temporary storage for table copy testing.
|
|
||||||
|
|
||||||
tmp_check/ temporary installation created by parallel testing script.
|
|
||||||
</ProgramListing>
|
|
||||||
</Para>
|
|
||||||
</Sect1>
|
|
||||||
|
|
||||||
<Sect1>
|
|
||||||
<Title>Regression Test Procedure</Title>
|
|
||||||
|
|
||||||
<Para>
|
|
||||||
Commands were tested on RedHat Linux version 4.2 using the bash shell.
|
Commands were tested on RedHat Linux version 4.2 using the bash shell.
|
||||||
Except where noted, they will probably work on most systems. Commands
|
Except where noted, they will probably work on most systems. Commands
|
||||||
like <FileName>ps</FileName> and <FileName>tar</FileName> vary wildly on what options you should use on each
|
like <filename>ps</filename> and <filename>tar</filename> vary
|
||||||
platform. <Emphasis>Use common sense</Emphasis> before typing in these commands.
|
wildly on what options you should use on each
|
||||||
</Para>
|
platform. <emphasis>Use common sense</emphasis> before typing in these commands.
|
||||||
|
</para>
|
||||||
|
|
||||||
<Procedure>
|
<procedure>
|
||||||
<Title><ProductName>Postgres</ProductName> Regression Test</Title>
|
<title><productname>Postgres</productname> Regression Test</title>
|
||||||
|
|
||||||
<Step Performance="required">
|
<step performance="required">
|
||||||
<Para>
|
<para>
|
||||||
Prepare the files needed for the regression test with:
|
Prepare the files needed for the regression test with:
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
cd /usr/src/pgsql/src/test/regress
|
cd /usr/src/pgsql/src/test/regress
|
||||||
gmake clean
|
gmake clean
|
||||||
gmake all
|
gmake all
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
You can skip "gmake clean" if this is the first time you
|
You can skip "gmake clean" if this is the first time you
|
||||||
are running the tests.
|
are running the tests.
|
||||||
</para>
|
</para>
|
||||||
<Para>
|
<para>
|
||||||
This step compiles a <Acronym>C</Acronym>
|
This step compiles a <acronym>C</acronym>
|
||||||
program with PostgreSQL extension functions into a shared library.
|
program with PostgreSQL extension functions into a shared library.
|
||||||
Localized SQL scripts and output-comparison files are also created
|
Localized SQL scripts and output-comparison files are also created
|
||||||
for the tests that need them. The localization replaces macros in
|
for the tests that need them. The localization replaces macros in
|
||||||
the source files with absolute pathnames and user names.
|
the source files with absolute pathnames and user names.
|
||||||
</Para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<Step Performance="optional">
|
<step performance="optional">
|
||||||
<Para>
|
<para>
|
||||||
If you intend to use the "sequential" test procedure, which tests
|
If you intend to use the "sequential" test procedure, which tests
|
||||||
an already-installed postmaster, be sure that the postmaster
|
an already-installed postmaster, be sure that the postmaster
|
||||||
is running. If it isn't already running,
|
is running. If it isn't already running,
|
||||||
start the postmaster in an available window by typing
|
start the postmaster in an available window by typing
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
postmaster
|
postmaster
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
or start the postmaster daemon running in the background by typing
|
or start the postmaster daemon running in the background by typing
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
cd
|
cd
|
||||||
nohup postmaster > regress.log 2>&1 &
|
nohup postmaster > regress.log 2>&1 &
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
The latter is probably preferable, since the regression test log
|
The latter is probably preferable, since the regression test log
|
||||||
will be quite lengthy (60K or so, in
|
will be quite lengthy (60K or so, in
|
||||||
<ProductName>Postgres</ProductName> 7.0) and you might want to
|
<productname>Postgres</productname> 7.0) and you might want to
|
||||||
review it for clues if things go wrong.
|
review it for clues if things go wrong.
|
||||||
|
|
||||||
<Note>
|
<note>
|
||||||
<Para>
|
<para>
|
||||||
Do not run <FileName>postmaster</FileName> from the root account.
|
Do not run <filename>postmaster</filename> from the root account.
|
||||||
</Para>
|
</para>
|
||||||
</Note>
|
</note>
|
||||||
</Para>
|
</para>
|
||||||
</Step>
|
</step>
|
||||||
|
|
||||||
<Step Performance="required">
|
<step performance="required">
|
||||||
<Para>
|
<para>
|
||||||
Run the regression tests. For a sequential test, type
|
Run the regression tests. For a sequential test, type
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
cd /usr/src/pgsql/src/test/regress
|
cd /usr/src/pgsql/src/test/regress
|
||||||
gmake runtest
|
gmake runtest
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
For a parallel test, type
|
For a parallel test, type
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
cd /usr/src/pgsql/src/test/regress
|
cd /usr/src/pgsql/src/test/regress
|
||||||
gmake runcheck
|
gmake runcheck
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
The sequential test just runs the test scripts using your
|
The sequential test just runs the test scripts using your
|
||||||
already-running postmaster.
|
already-running postmaster.
|
||||||
The parallel test will perform a complete installation of
|
The parallel test will perform a complete installation of
|
||||||
<ProductName>Postgres</ProductName> into a temporary directory,
|
<productname>Postgres</productname> into a temporary directory,
|
||||||
start a private postmaster therein, and then run the test scripts.
|
start a private postmaster therein, and then run the test scripts.
|
||||||
Finally it will kill the private postmaster (but the temporary
|
Finally it will kill the private postmaster (but the temporary
|
||||||
directory isn't removed automatically).
|
directory isn't removed automatically).
|
||||||
</Para>
|
</para>
|
||||||
</Step>
|
</step>
|
||||||
|
|
||||||
<Step Performance="required">
|
<step performance="required">
|
||||||
<Para>
|
<para>
|
||||||
You should get on the screen (and also written to file ./regress.out)
|
You should get on the screen (and also written to file ./regress.out)
|
||||||
a series of statements stating which tests passed and which tests
|
a series of statements stating which tests passed and which tests
|
||||||
failed. Please note that it can be normal for some of the tests to
|
failed. Please note that it can be normal for some of the tests to
|
||||||
"fail" due to platform-specific variations. See the next section
|
"fail" due to platform-specific variations. See the next section
|
||||||
for details on determining whether a "failure" is significant.
|
for details on determining whether a "failure" is significant.
|
||||||
</Para>
|
</para>
|
||||||
<Para>
|
<para>
|
||||||
Some of the tests, notably "numeric", can take a while, especially
|
Some of the tests, notably "numeric", can take a while, especially
|
||||||
on slower platforms. Have patience.
|
on slower platforms. Have patience.
|
||||||
</Para>
|
</para>
|
||||||
</Step>
|
</step>
|
||||||
|
|
||||||
<Step Performance="required">
|
<step performance="required">
|
||||||
<Para>
|
<para>
|
||||||
After running the tests and examining the results, type
|
After running the tests and examining the results, type
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
cd /usr/src/pgsql/src/test/regress
|
cd /usr/src/pgsql/src/test/regress
|
||||||
gmake clean
|
gmake clean
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
to recover the temporary disk space used by the tests.
|
to recover the temporary disk space used by the tests.
|
||||||
If you ran a sequential test, also type
|
If you ran a sequential test, also type
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
dropdb regression
|
dropdb regression
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
</Para>
|
</para>
|
||||||
</Step>
|
</step>
|
||||||
</procedure>
|
</procedure>
|
||||||
</Sect1>
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Regression Analysis</Title>
|
<title>Regression Analysis</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The actual outputs of the regression tests are in files in the
|
The actual outputs of the regression tests are in files in the
|
||||||
<filename>./results</filename> directory. The test script
|
<filename>./results</filename> directory. The test script
|
||||||
uses <application>diff</application> to compare each output file
|
uses <application>diff</application> to compare each output file
|
||||||
@ -270,101 +317,101 @@ The runtime path is /usr/local/pgsql (other paths are possible).
|
|||||||
saved for your inspection in
|
saved for your inspection in
|
||||||
<filename>./regression.diffs</filename>. (Or you can run
|
<filename>./regression.diffs</filename>. (Or you can run
|
||||||
<application>diff</application> yourself, if you prefer.)
|
<application>diff</application> yourself, if you prefer.)
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The files might not compare exactly. The test script will report
|
The files might not compare exactly. The test script will report
|
||||||
any difference as a "failure", but the difference might be due
|
any difference as a "failure", but the difference might be due
|
||||||
to small cross-system differences in error message wording,
|
to small cross-system differences in error message wording,
|
||||||
math library behavior, etc.
|
math library behavior, etc.
|
||||||
"Failures" of this type do not indicate a problem with
|
"Failures" of this type do not indicate a problem with
|
||||||
<ProductName>Postgres</ProductName>.
|
<productname>Postgres</productname>.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Thus, it is necessary to examine the actual differences for each
|
Thus, it is necessary to examine the actual differences for each
|
||||||
"failed" test to determine whether there is really a problem.
|
"failed" test to determine whether there is really a problem.
|
||||||
The following paragraphs attempt to provide some guidance in
|
The following paragraphs attempt to provide some guidance in
|
||||||
determining whether a difference is significant or not.
|
determining whether a difference is significant or not.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Error message differences</Title>
|
<title>Error message differences</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some of the regression tests involve intentional invalid input values.
|
Some of the regression tests involve intentional invalid input values.
|
||||||
Error messages can come from either the Postgres code or from the host
|
Error messages can come from either the Postgres code or from the host
|
||||||
platform system routines. In the latter case, the messages may vary
|
platform system routines. In the latter case, the messages may vary
|
||||||
between platforms, but should reflect similar information. These
|
between platforms, but should reflect similar information. These
|
||||||
differences in messages will result in a "failed" regression test which
|
differences in messages will result in a "failed" regression test which
|
||||||
can be validated by inspection.
|
can be validated by inspection.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Date and time differences</Title>
|
<title>Date and time differences</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Most of the date and time results are dependent on timezone environment.
|
Most of the date and time results are dependent on timezone environment.
|
||||||
The reference files are generated for timezone PST8PDT (Berkeley,
|
The reference files are generated for timezone PST8PDT (Berkeley,
|
||||||
California) and there will be apparent failures if the tests are not
|
California) and there will be apparent failures if the tests are not
|
||||||
run with that timezone setting. The regression test driver sets
|
run with that timezone setting. The regression test driver sets
|
||||||
environment variable PGTZ to PST8PDT to ensure proper results.
|
environment variable PGTZ to PST8PDT to ensure proper results.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some of the queries in the "timestamp" test will fail if you run
|
Some of the queries in the "timestamp" test will fail if you run
|
||||||
the test on the day of a daylight-savings time changeover, or the
|
the test on the day of a daylight-savings time changeover, or the
|
||||||
day before or after one. These queries assume that the intervals
|
day before or after one. These queries assume that the intervals
|
||||||
between midnight yesterday, midnight today and midnight tomorrow are
|
between midnight yesterday, midnight today and midnight tomorrow are
|
||||||
exactly twenty-four hours ... which is wrong if daylight-savings time
|
exactly twenty-four hours ... which is wrong if daylight-savings time
|
||||||
went into or out of effect meanwhile.
|
went into or out of effect meanwhile.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
There appear to be some systems which do not accept the recommended syntax
|
There appear to be some systems which do not accept the recommended syntax
|
||||||
for explicitly setting the local time zone rules; you may need to use
|
for explicitly setting the local time zone rules; you may need to use
|
||||||
a different PGTZ setting on such machines.
|
a different PGTZ setting on such machines.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some systems using older timezone libraries fail to apply daylight-savings
|
Some systems using older timezone libraries fail to apply daylight-savings
|
||||||
corrections to pre-1970 dates, causing pre-1970 PDT times to be displayed
|
corrections to pre-1970 dates, causing pre-1970 PDT times to be displayed
|
||||||
in PST instead. This will result in localized differences in the test
|
in PST instead. This will result in localized differences in the test
|
||||||
results.
|
results.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Floating point differences</Title>
|
<title>Floating point differences</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some of the tests involve computing 64-bit (<Type>float8</Type>) numbers from table
|
Some of the tests involve computing 64-bit (<type>float8</type>) numbers from table
|
||||||
columns. Differences in results involving mathematical functions of
|
columns. Differences in results involving mathematical functions of
|
||||||
<Type>float8</Type> columns have been observed. The float8
|
<type>float8</type> columns have been observed. The float8
|
||||||
and geometry tests are particularly prone to small differences
|
and geometry tests are particularly prone to small differences
|
||||||
across platforms.
|
across platforms.
|
||||||
Human eyeball comparison is needed to determine the real significance
|
Human eyeball comparison is needed to determine the real significance
|
||||||
of these differences which are usually 10 places to the right of
|
of these differences which are usually 10 places to the right of
|
||||||
the decimal point.
|
the decimal point.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Some systems signal errors from pow() and exp() differently from
|
Some systems signal errors from pow() and exp() differently from
|
||||||
the mechanism expected by the current Postgres code.
|
the mechanism expected by the current Postgres code.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Polygon differences</Title>
|
<title>Polygon differences</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Several of the tests involve operations on geographic date about the
|
Several of the tests involve operations on geographic date about the
|
||||||
Oakland/Berkley CA street map. The map data is expressed as polygons
|
Oakland/Berkley CA street map. The map data is expressed as polygons
|
||||||
whose vertices are represented as pairs of <Type>float8</Type> numbers (decimal
|
whose vertices are represented as pairs of <type>float8</type> numbers (decimal
|
||||||
latitude and longitude). Initially, some tables are created and
|
latitude and longitude). Initially, some tables are created and
|
||||||
loaded with geographic data, then some views are created which join
|
loaded with geographic data, then some views are created which join
|
||||||
two tables using the polygon intersection operator (##), then a select
|
two tables using the polygon intersection operator (##), then a select
|
||||||
@ -374,65 +421,65 @@ The runtime path is /usr/local/pgsql (other paths are possible).
|
|||||||
in the 2nd or 3rd place to the right of the decimal point. The SQL
|
in the 2nd or 3rd place to the right of the decimal point. The SQL
|
||||||
statements where these problems occur are the following:
|
statements where these problems occur are the following:
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
QUERY: SELECT * from street;
|
QUERY: SELECT * from street;
|
||||||
QUERY: SELECT * from iexit;
|
QUERY: SELECT * from iexit;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Random differences</Title>
|
<title>Random differences</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
There is at least one case in the "random" test script that is
|
There is at least one case in the "random" test script that is
|
||||||
intended to produce
|
intended to produce
|
||||||
random results. This causes random to fail the regression test
|
random results. This causes random to fail the regression test
|
||||||
once in a while (perhaps once in every five to ten trials).
|
once in a while (perhaps once in every five to ten trials).
|
||||||
Typing
|
Typing
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
diff results/random.out expected/random.out
|
diff results/random.out expected/random.out
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
should produce only one or a few lines of differences. You need
|
should produce only one or a few lines of differences. You need
|
||||||
not worry unless the random test always fails in repeated attempts.
|
not worry unless the random test always fails in repeated attempts.
|
||||||
(On the other hand, if the random test is <emphasis>never</emphasis>
|
(On the other hand, if the random test is <emphasis>never</emphasis>
|
||||||
reported to fail even in many trials of the regress tests, you
|
reported to fail even in many trials of the regress tests, you
|
||||||
probably <emphasis>should</emphasis> worry.)
|
probably <emphasis>should</emphasis> worry.)
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>The <Quote>expected</Quote> files</Title>
|
<title>The "expected" files</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The <FileName>./expected/*.out</FileName> files were adapted from the original monolithic
|
The <filename>./expected/*.out</filename> files were adapted from the original monolithic
|
||||||
<FileName>expected.input</FileName> file provided by Jolly Chen et al. Newer versions of these
|
<filename>expected.input</filename> file provided by Jolly Chen et al. Newer versions of these
|
||||||
files generated on various development machines have been substituted after
|
files generated on various development machines have been substituted after
|
||||||
careful (?) inspection. Many of the development machines are running a
|
careful (?) inspection. Many of the development machines are running a
|
||||||
Unix OS variant (FreeBSD, Linux, etc) on Ix86 hardware.
|
Unix OS variant (FreeBSD, Linux, etc) on Ix86 hardware.
|
||||||
|
|
||||||
The original <FileName>expected.input</FileName> file was created on a SPARC Solaris 2.4
|
The original <filename>expected.input</filename> file was created on a SPARC Solaris 2.4
|
||||||
system using the <FileName>postgres5-1.02a5.tar.gz</FileName> source tree. It was compared
|
system using the <filename>postgres5-1.02a5.tar.gz</filename> source tree. It was compared
|
||||||
with a file created on an I386 Solaris 2.4 system and the differences
|
with a file created on an I386 Solaris 2.4 system and the differences
|
||||||
were only in the floating point polygons in the 3rd digit to the right
|
were only in the floating point polygons in the 3rd digit to the right
|
||||||
of the decimal point.
|
of the decimal point.
|
||||||
|
|
||||||
The original <FileName>sample.regress.out</FileName> file was from the postgres-1.01 release
|
The original <filename>sample.regress.out</filename> file was from the postgres-1.01 release
|
||||||
constructed by Jolly Chen. It may
|
constructed by Jolly Chen. It may
|
||||||
have been created on a DEC ALPHA machine as the <FileName>Makefile.global</FileName>
|
have been created on a DEC ALPHA machine as the <filename>Makefile.global</filename>
|
||||||
in the postgres-1.01 release has PORTNAME=alpha.
|
in the postgres-1.01 release has PORTNAME=alpha.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect2>
|
</sect2>
|
||||||
|
|
||||||
</Sect1>
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Platform-specific comparison files</Title>
|
<title>Platform-specific comparison files</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Since some of the tests inherently produce platform-specific results,
|
Since some of the tests inherently produce platform-specific results,
|
||||||
we have provided a way to supply platform-specific result comparison
|
we have provided a way to supply platform-specific result comparison
|
||||||
files. Frequently, the same variation applies to multiple platforms;
|
files. Frequently, the same variation applies to multiple platforms;
|
||||||
@ -441,42 +488,59 @@ The runtime path is /usr/local/pgsql (other paths are possible).
|
|||||||
So, to eliminate bogus test "failures" for a particular platform,
|
So, to eliminate bogus test "failures" for a particular platform,
|
||||||
you must choose or make a variant result file, and then add a line
|
you must choose or make a variant result file, and then add a line
|
||||||
to the mapping file, which is "resultmap".
|
to the mapping file, which is "resultmap".
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Each line in the mapping file is of the form
|
Each line in the mapping file is of the form
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
testname/platformnamepattern=comparisonfilename
|
testname/platformnamepattern=comparisonfilename
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
The test name is just the name of the particular regression test module.
|
The test name is just the name of the particular regression test module.
|
||||||
The platform name pattern is a pattern in the style of expr(1) (that is,
|
The platform name pattern is a pattern in the style of expr(1) (that is,
|
||||||
a regular expression with an implicit ^ anchor at the start). It is matched
|
a regular expression with an implicit ^ anchor at the start). It is matched
|
||||||
against the platform name as printed by config.guess. The comparison
|
against the platform name as printed by config.guess. The comparison
|
||||||
file name is the name of the substitute result comparison file.
|
file name is the name of the substitute result comparison file.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
For example: the int2 regress test includes a deliberate entry of a value
|
For example: the int2 regress test includes a deliberate entry of a value
|
||||||
that is too large to fit in int2. The specific error message that is
|
that is too large to fit in int2. The specific error message that is
|
||||||
produced is platform-dependent; our reference platform emits
|
produced is platform-dependent; our reference platform emits
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
ERROR: pg_atoi: error reading "100000": Numerical result out of range
|
ERROR: pg_atoi: error reading "100000": Numerical result out of range
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
but a fair number of other Unix platforms emit
|
but a fair number of other Unix platforms emit
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
ERROR: pg_atoi: error reading "100000": Result too large
|
ERROR: pg_atoi: error reading "100000": Result too large
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
Therefore, we provide a variant comparison file, int2-too-large.out,
|
Therefore, we provide a variant comparison file, int2-too-large.out,
|
||||||
that includes this spelling of the error message. To silence the
|
that includes this spelling of the error message. To silence the
|
||||||
bogus "failure" message on HPPA platforms, resultmap includes
|
bogus "failure" message on HPPA platforms, resultmap includes
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
int2/hppa=int2-too-large
|
int2/hppa=int2-too-large
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
which will trigger on any machine for which config.guess's output
|
which will trigger on any machine for which config.guess's output
|
||||||
begins with 'hppa'. Other lines in resultmap select the variant
|
begins with 'hppa'. Other lines in resultmap select the variant
|
||||||
comparison file for other platforms where it's appropriate.
|
comparison file for other platforms where it's appropriate.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
</Sect1>
|
</sect1>
|
||||||
|
|
||||||
</Chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.47 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="release">
|
<chapter id="release">
|
||||||
@ -19,9 +19,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
</docinfo>
|
</docinfo>
|
||||||
-->
|
-->
|
||||||
<para>
|
<para>
|
||||||
This release shows the continued growth of PostgreSQL. There are more
|
This release contains improvements in many areas, demonstrating
|
||||||
changes in 7.0 than in any previous release. Don't be concerned this is
|
the continued growth of <productname>PostgreSQL</productname>.
|
||||||
a dot-zero release. We do our best to put out only solid releases, and
|
There are more improvements and fixes in 7.0 than in any previous
|
||||||
|
release. The developers have confidence that this is the best
|
||||||
|
release yet; we do our best to put out only solid releases, and
|
||||||
this one is no exception.
|
this one is no exception.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -49,7 +51,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Continuing on work started a year ago, the optimizer has been
|
Continuing on work started a year ago, the optimizer has been
|
||||||
overhauled, allowing improved query execution and better performance
|
improved, allowing better query plan selection and faster performance
|
||||||
with less memory usage.
|
with less memory usage.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -80,7 +82,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<!--
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
Upcoming Features
|
Upcoming Features
|
||||||
@ -92,6 +94,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
-->
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -102,10 +105,75 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
A dump/restore using <application>pg_dump</application>
|
A dump/restore using <application>pg_dump</application>
|
||||||
is required for those wishing to migrate data from any
|
is required for those wishing to migrate data from any
|
||||||
previous release of <productname>Postgres</productname>.
|
previous release of <productname>Postgres</productname>.
|
||||||
For those upgrading from 6.5.*, you can use
|
For those upgrading from 6.5.*, you may instead use
|
||||||
<application>pg_upgrade</application> to upgrade to this
|
<application>pg_upgrade</application> to upgrade to this
|
||||||
release.
|
release; however, a full dump/reload installation is always the
|
||||||
|
most robust method for upgrades.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Interface and compatibility issues to consider for the new
|
||||||
|
release include:
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The date/time types <type>datetime</type> and
|
||||||
|
<type>timespan</type> have been superceded by the
|
||||||
|
SQL92-defined types <type>timestamp</type> and
|
||||||
|
<type>interval</type>. Although there has been some effort to
|
||||||
|
ease the transition by allowing
|
||||||
|
<productname>Postgres</productname> to recognize
|
||||||
|
the deprecated type names and translate them to the new type
|
||||||
|
names, this mechanism may not be completely transparent to
|
||||||
|
your existing application.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The security provisions for <firstterm>alternate locations</firstterm> have
|
||||||
|
been strengthened by requiring the absolute path to be present
|
||||||
|
in the environment variable <envar>PGxxx
|
||||||
|
|
||||||
|
Ack! This isn't yet in the code?? - thomas 2000-04-30
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The optimizer has been substantially improved in the area of
|
||||||
|
query cost estimation. In some cases, this will result in
|
||||||
|
decreased query times as the optimizer makes a better choice
|
||||||
|
for the preferred plan. However, in a small number of cases,
|
||||||
|
usually involving pathological distributions of data, your
|
||||||
|
query times may go up. If you are dealing with large amounts
|
||||||
|
of data, you may want to check your queries to verify
|
||||||
|
performance.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The <acronym>JDBC</acronym> and <acronym>ODBC</acronym>
|
||||||
|
interfaces have been upgraded and extended.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The string function <function>CHAR_LENGTH</function> is now a
|
||||||
|
native function. Previous versions translated this into a call
|
||||||
|
to <function>LENGTH</function>, which could result in
|
||||||
|
ambiguity with other types implementing
|
||||||
|
<function>LENGTH</function> such as the geometric types.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
@ -114,7 +182,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.46 2000/05/02 17:06:10 mom
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
Prevent function calls with more than maximum number of arguments (Tom)
|
Prevent function calls exceeding maximum number of arguments (Tom)
|
||||||
Improve CASE construct (Tom)
|
Improve CASE construct (Tom)
|
||||||
Fix SELECT coalesce(f1,0) FROM int4_tbl GROUP BY f1 (Tom)
|
Fix SELECT coalesce(f1,0) FROM int4_tbl GROUP BY f1 (Tom)
|
||||||
Fix SELECT sentence.words[0] FROM sentence GROUP BY sentence.words[0] (Tom)
|
Fix SELECT sentence.words[0] FROM sentence GROUP BY sentence.words[0] (Tom)
|
||||||
@ -125,15 +193,15 @@ Fix for SELECT a/2, a/2 FROM test_missing_target GROUP BY a/2 (Tom)
|
|||||||
Fix for subselects in INSERT ... SELECT (Tom)
|
Fix for subselects in INSERT ... SELECT (Tom)
|
||||||
Prevent INSERT ... SELECT ... ORDER BY (Tom)
|
Prevent INSERT ... SELECT ... ORDER BY (Tom)
|
||||||
Fixes for relations greater than 2GB, including vacuum
|
Fixes for relations greater than 2GB, including vacuum
|
||||||
Improve communication of system table changes to other running backends (Tom)
|
Improve propagating system table changes to other backends (Tom)
|
||||||
Improve communication of user table modifications to other running backends (Tom)
|
Improve propagating user table changes to other backends (Tom)
|
||||||
Fix handling of temp tables in complex situations (Bruce, Tom)
|
Fix handling of temp tables in complex situations (Bruce, Tom)
|
||||||
Allow table locking when tables opened, improving concurrent reliability (Tom)
|
Allow table locking at table open, improving concurrent reliability (Tom)
|
||||||
Properly quote sequence names in pg_dump (Ross J. Reedstrom)
|
Properly quote sequence names in pg_dump (Ross J. Reedstrom)
|
||||||
Prevent DROP DATABASE while others accessing
|
Prevent DROP DATABASE while others accessing
|
||||||
Prevent any rows from being returned by GROUP BY if no rows processed (Tom)
|
Prevent any rows from being returned by GROUP BY if no rows processed (Tom)
|
||||||
Fix SELECT COUNT(1) FROM table WHERE ...' if no rows matching WHERE (Tom)
|
Fix SELECT COUNT(1) FROM table WHERE ...' if no rows matching WHERE (Tom)
|
||||||
Fix pg_upgrade so it works for MVCC(Tom)
|
Fix pg_upgrade so it works for MVCC (Tom)
|
||||||
Fix for SELECT ... WHERE x IN (SELECT ... HAVING SUM(x) > 1) (Tom)
|
Fix for SELECT ... WHERE x IN (SELECT ... HAVING SUM(x) > 1) (Tom)
|
||||||
Fix for "f1 datetime DEFAULT 'now'" (Tom)
|
Fix for "f1 datetime DEFAULT 'now'" (Tom)
|
||||||
Fix problems with CURRENT_DATE used in DEFAULT (Tom)
|
Fix problems with CURRENT_DATE used in DEFAULT (Tom)
|
||||||
@ -141,8 +209,8 @@ Allow comment-only lines, and ;;; lines too. (Tom)
|
|||||||
Improve recovery after failed disk writes, disk full (Hiroshi)
|
Improve recovery after failed disk writes, disk full (Hiroshi)
|
||||||
Fix cases where table is mentioned in FROM but not joined (Tom)
|
Fix cases where table is mentioned in FROM but not joined (Tom)
|
||||||
Allow HAVING clause without aggregate functions (Tom)
|
Allow HAVING clause without aggregate functions (Tom)
|
||||||
Fix for "--" comment and no trailing newline, as seen in Perl
|
Fix for "--" comment and no trailing newline, as seen in perl interface
|
||||||
Improve pg_dump failure error reports (Bruce)
|
Improve pg_dump failure error reports (Bruce)
|
||||||
Allow sorts and hashes to exceed 2GB file sizes (Tom)
|
Allow sorts and hashes to exceed 2GB file sizes (Tom)
|
||||||
Fix for pg_dump dumping of inherited rules (Tom)
|
Fix for pg_dump dumping of inherited rules (Tom)
|
||||||
Fix for NULL handling comparisons (Tom)
|
Fix for NULL handling comparisons (Tom)
|
||||||
@ -197,8 +265,7 @@ Update jdbc protocol to 2.0 (<ulink url="mailto:jens@jens.de">Jens Glaser</ulink
|
|||||||
Add TRUNCATE command to quickly truncate relation (Mike Mascari)
|
Add TRUNCATE command to quickly truncate relation (Mike Mascari)
|
||||||
Fix to give super user and createdb user proper update catalog rights (Peter E)
|
Fix to give super user and createdb user proper update catalog rights (Peter E)
|
||||||
Allow ecpg bool variables to have NULL values (Christof)
|
Allow ecpg bool variables to have NULL values (Christof)
|
||||||
Issue ecpg error if NULL value is returned to variable with no NULL
|
Issue ecpg error if NULL value for variable with no NULL indicator (Christof)
|
||||||
indicator (Christof)
|
|
||||||
Allow ^C to cancel COPY command (Massimo)
|
Allow ^C to cancel COPY command (Massimo)
|
||||||
Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
|
Add SET FSYNC and SHOW PG_OPTIONS commands(Massimo)
|
||||||
Function name overloading for dynamically-loaded C functions (Frankpitt)
|
Function name overloading for dynamically-loaded C functions (Frankpitt)
|
||||||
@ -214,7 +281,6 @@ Add FOREIGN KEY ... MATCH <unspecified> referential actions (Don Baccus)
|
|||||||
Allow WHERE restriction on ctid (physical heap location) (Hiroshi)
|
Allow WHERE restriction on ctid (physical heap location) (Hiroshi)
|
||||||
Move pginterface from contrib to interface directory, rename to pgeasy (Bruce)
|
Move pginterface from contrib to interface directory, rename to pgeasy (Bruce)
|
||||||
Change pgeasy connectdb() parameter ordering (Bruce)
|
Change pgeasy connectdb() parameter ordering (Bruce)
|
||||||
Add DEC and SESSION_USER as reserved words (Thomas)
|
|
||||||
Require SELECT DISTINCT target list to have all ORDER BY columns (Tom)
|
Require SELECT DISTINCT target list to have all ORDER BY columns (Tom)
|
||||||
Add Oracle's COMMENT ON command (<ulink url="mailto:mascarim@yahoo">Mike Mascari</ulink>)
|
Add Oracle's COMMENT ON command (<ulink url="mailto:mascarim@yahoo">Mike Mascari</ulink>)
|
||||||
libpq's PQsetNoticeProcessor function now returns previous hook(Peter E)
|
libpq's PQsetNoticeProcessor function now returns previous hook(Peter E)
|
||||||
@ -227,8 +293,7 @@ Change backend-side COPY to write files with permissions 644 not 666 (Tom)
|
|||||||
Force permissions on PGDATA directory to be secure, even if it exists (Tom)
|
Force permissions on PGDATA directory to be secure, even if it exists (Tom)
|
||||||
Added psql LASTOID variable to return last inserted oid (Peter E)
|
Added psql LASTOID variable to return last inserted oid (Peter E)
|
||||||
Allow concurrent vacuum and remove pg_vlock vacuum lock file (Tom)
|
Allow concurrent vacuum and remove pg_vlock vacuum lock file (Tom)
|
||||||
Add permissions check so only Postgres superuser or table owner can
|
Add permissions check for vacuum (Peter E)
|
||||||
vacuum (Peter E)
|
|
||||||
New libpq functions to allow asynchronous connections: PQconnectStart(),
|
New libpq functions to allow asynchronous connections: PQconnectStart(),
|
||||||
PQconnectPoll(), PQresetStart(), PQresetPoll(), PQsetenvStart(),
|
PQconnectPoll(), PQresetStart(), PQresetPoll(), PQsetenvStart(),
|
||||||
PQsetenvPoll(), PQsetenvAbort (Ewan Mellor)
|
PQsetenvPoll(), PQsetenvAbort (Ewan Mellor)
|
||||||
@ -236,8 +301,8 @@ New libpq PQsetenv() function (Ewan Mellor)
|
|||||||
create/alter user extension (Peter E)
|
create/alter user extension (Peter E)
|
||||||
New postmaster.pid and postmaster.opts under $PGDATA (Tatsuo)
|
New postmaster.pid and postmaster.opts under $PGDATA (Tatsuo)
|
||||||
New scripts for create/drop user/db (Peter E)
|
New scripts for create/drop user/db (Peter E)
|
||||||
Major psql overhaul(Peter E)
|
Major psql overhaul (Peter E)
|
||||||
Add const to libpq interface(Peter E)
|
Add const to libpq interface (Peter E)
|
||||||
New libpq function PQoidValue (Peter E)
|
New libpq function PQoidValue (Peter E)
|
||||||
Show specific non-aggregate causing problem with GROUP BY (Tom)
|
Show specific non-aggregate causing problem with GROUP BY (Tom)
|
||||||
Make changes to pg_shadow recreate pg_pwd file (Peter E)
|
Make changes to pg_shadow recreate pg_pwd file (Peter E)
|
||||||
@ -281,12 +346,11 @@ Allow SELECT .. FOR UPDATE in PL/pgSQL (Hiroshi)
|
|||||||
Enable backward sequential scan even after reaching EOF (Hiroshi)
|
Enable backward sequential scan even after reaching EOF (Hiroshi)
|
||||||
Add btree indexing of boolean values, >= and <= (Don Baccus)
|
Add btree indexing of boolean values, >= and <= (Don Baccus)
|
||||||
Print current line number when COPY FROM fails (Massimo)
|
Print current line number when COPY FROM fails (Massimo)
|
||||||
Recognize special case of POSIX time zone: "GMT+8" and "GMT-8" (Thomas)
|
Recognize POSIX time zone e.g. "PST+8" and "GMT-8" (Thomas)
|
||||||
Add DEC as synonym for "DECIMAL" (Thomas)
|
Add DEC as synonym for DECIMAL (Thomas)
|
||||||
Add SESSION_USER as SQL92 keyword, same as CURRENT_USER (Thomas)
|
Add SESSION_USER as SQL92 keyword, same as CURRENT_USER (Thomas)
|
||||||
Implement column aliases (aka correlation names) and join syntax (Thomas)
|
Implement SQL92 column aliases (aka correlation names) (Thomas)
|
||||||
Allow queries like SELECT a FROM t1 tx (a) (Thomas)
|
Implement SQL92 join syntax (Thomas)
|
||||||
Allow queries like SELECT * FROM t1 NATURAL JOIN t2 (Thomas)
|
|
||||||
Make INTERVAL reserved word allowed as a column identifier (Thomas)
|
Make INTERVAL reserved word allowed as a column identifier (Thomas)
|
||||||
Implement REINDEX command (Hiroshi)
|
Implement REINDEX command (Hiroshi)
|
||||||
Accept ALL in aggregate function SUM(ALL col) (Tom)
|
Accept ALL in aggregate function SUM(ALL col) (Tom)
|
||||||
@ -322,9 +386,8 @@ Allow bare column names to be subscripted as arrays (Tom)
|
|||||||
Improve type casting of int and float constants (Tom)
|
Improve type casting of int and float constants (Tom)
|
||||||
Cleanups for int8 inputs, range checking, and type conversion (Tom)
|
Cleanups for int8 inputs, range checking, and type conversion (Tom)
|
||||||
Fix for SELECT timespan('21:11:26'::time) (Tom)
|
Fix for SELECT timespan('21:11:26'::time) (Tom)
|
||||||
Fix for netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0
|
netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0 (Oleg Sharoiko)
|
||||||
(Oleg Sharoiko)
|
Add btree index on NUMERIC (Jan)
|
||||||
Add btree index on NUMERIC(Jan)
|
|
||||||
Perl fix for large objects containing NUL characters (Douglas Thomson)
|
Perl fix for large objects containing NUL characters (Douglas Thomson)
|
||||||
ODBC fix for for large objects (free)
|
ODBC fix for for large objects (free)
|
||||||
Fix indexing of cidr data type
|
Fix indexing of cidr data type
|
||||||
@ -338,26 +401,25 @@ Make char_length()/octet_length including trailing blanks (Tom)
|
|||||||
Made abstime/reltime use int4 instead of time_t (Peter E)
|
Made abstime/reltime use int4 instead of time_t (Peter E)
|
||||||
New lztext data type for compressed text fields
|
New lztext data type for compressed text fields
|
||||||
Revise code to handle coercion of int and float constants (Tom)
|
Revise code to handle coercion of int and float constants (Tom)
|
||||||
New C-routines to implement a BIT and BIT VARYING type in /contrib
|
Start at new code to implement a BIT and BIT VARYING type (Adriaan Joubert)
|
||||||
(Adriaan Joubert)
|
|
||||||
NUMERIC now accepts scientific notation (Tom)
|
NUMERIC now accepts scientific notation (Tom)
|
||||||
NUMERIC to int4 rounds (Tom)
|
NUMERIC to int4 rounds (Tom)
|
||||||
Convert float4/8 to NUMERIC properly (Tom)
|
Convert float4/8 to NUMERIC properly (Tom)
|
||||||
Allow type conversion with NUMERIC (Thomas)
|
Allow type conversion with NUMERIC (Thomas)
|
||||||
Make ISO date style (2000-02-16 09:33) the default (Thomas)
|
Make ISO date style (2000-02-16 09:33) the default (Thomas)
|
||||||
Add NATIONAL CHAR [ VARYING ]
|
Add NATIONAL CHAR [ VARYING ] (Thomas)
|
||||||
Allow NUMERIC round and trunc to accept negative scales (Tom)
|
Allow NUMERIC round and trunc to accept negative scales (Tom)
|
||||||
New TIME WITH TIME ZONE type (Thomas)
|
New TIME WITH TIME ZONE type (Thomas)
|
||||||
Add MAX()/MIN() on time type (Thomas)
|
Add MAX()/MIN() on time type (Thomas)
|
||||||
Add abs(), mod(), fac() for int8 (Thomas)
|
Add abs(), mod(), fac() for int8 (Thomas)
|
||||||
Add round(), sqrt(), cbrt(), pow()
|
Rename functions to round(), sqrt(), cbrt(), pow() for float8 (Thomas)
|
||||||
Rename NUMERIC power() to pow()
|
Add transcendental math functions (e.g. sin(), acos()) for float8 (Thomas)
|
||||||
Improved TRANSLATE() function
|
Add exp() and ln() for NUMERIC type
|
||||||
|
Rename NUMERIC power() to pow() (Thomas)
|
||||||
|
Improved TRANSLATE() function (Edwin Ramirez, Tom)
|
||||||
Allow X=-Y operators (Tom)
|
Allow X=-Y operators (Tom)
|
||||||
Add exp() and ln() as NUMERIC types
|
Allow SELECT float8(COUNT(*))/(SELECT COUNT(*) FROM t) FROM t GROUP BY f1; (Tom)
|
||||||
Allow SELECT float8(COUNT(*)) / (SELECT COUNT(*) FROM int4_tbl) FROM int4_tbl
|
Allow LOCALE to use indexes in regular expression searches (Tom)
|
||||||
GROUP BY f1; (Tom)
|
|
||||||
Allow LOCALE to use indexes in regular expression searches(Tom)
|
|
||||||
Allow creation of functional indexes to use default types
|
Allow creation of functional indexes to use default types
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
@ -378,13 +440,12 @@ Prefer index scans in cases where ORDER BY/GROUP BY is required (Tom)
|
|||||||
Allocate large memory requests in fix-sized chunks for performance (Tom)
|
Allocate large memory requests in fix-sized chunks for performance (Tom)
|
||||||
Fix vacuum's performance by reducing memory allocation requests (Tom)
|
Fix vacuum's performance by reducing memory allocation requests (Tom)
|
||||||
Implement constant-expression simplification (Bernard Frankpitt, Tom)
|
Implement constant-expression simplification (Bernard Frankpitt, Tom)
|
||||||
Allow more than first column to be used to determine start of index scan
|
Use secondary columns to be used to determine start of index scan (Hiroshi)
|
||||||
(Hiroshi)
|
|
||||||
Prevent quadruple use of disk space when doing internal sorting (Tom)
|
Prevent quadruple use of disk space when doing internal sorting (Tom)
|
||||||
Faster sorting by calling fewer functions (Tom)
|
Faster sorting by calling fewer functions (Tom)
|
||||||
Create system indexes to match all system caches (Bruce, Hiroshi)
|
Create system indexes to match all system caches (Bruce, Hiroshi)
|
||||||
Make system caches use system indexes(Bruce)
|
Make system caches use system indexes (Bruce)
|
||||||
Make all system indexes unique(Bruce)
|
Make all system indexes unique (Bruce)
|
||||||
Improve pg_statistics management for VACUUM speed improvement (Tom)
|
Improve pg_statistics management for VACUUM speed improvement (Tom)
|
||||||
Flush backend cache less frequently (Tom, Hiroshi)
|
Flush backend cache less frequently (Tom, Hiroshi)
|
||||||
COPY now reuses previous memory allocation, improving performance (Tom)
|
COPY now reuses previous memory allocation, improving performance (Tom)
|
||||||
@ -398,17 +459,17 @@ New SET variable to control optimizer costs (Tom)
|
|||||||
Optimizer queries based on LIMIT, OFFSET, and EXISTS qualifications (Tom)
|
Optimizer queries based on LIMIT, OFFSET, and EXISTS qualifications (Tom)
|
||||||
Reduce optimizer internal housekeeping of join paths for speedup (Tom)
|
Reduce optimizer internal housekeeping of join paths for speedup (Tom)
|
||||||
Major subquery speedup (Tom)
|
Major subquery speedup (Tom)
|
||||||
Fewer fsync writes when fsync is not disabled(Tom)
|
Fewer fsync writes when fsync is not disabled (Tom)
|
||||||
Improved LIKE optimizer estimates(Tom)
|
Improved LIKE optimizer estimates (Tom)
|
||||||
Prevent fsync in SELECT-only queries(Vadim)
|
Prevent fsync in SELECT-only queries (Vadim)
|
||||||
Make index creation use psort code, because it is now faster(Tom)
|
Make index creation use psort code, because it is now faster (Tom)
|
||||||
Allow creation of sort temp tables > 1 Gig
|
Allow creation of sort temp tables > 1 Gig
|
||||||
|
|
||||||
Source Tree Changes
|
Source Tree Changes
|
||||||
-------------------
|
-------------------
|
||||||
Fix for linux PPC compile
|
Fix for linux PPC compile
|
||||||
New generic expression-tree-walker subroutine (Tom)
|
New generic expression-tree-walker subroutine (Tom)
|
||||||
Change form() to varargform() to prevent portability problems.
|
Change form() to varargform() to prevent portability problems
|
||||||
Improved range checking for large integers on Alphas
|
Improved range checking for large integers on Alphas
|
||||||
Clean up #include in /include directory (Bruce)
|
Clean up #include in /include directory (Bruce)
|
||||||
Add scripts for checking includes (Bruce)
|
Add scripts for checking includes (Bruce)
|
||||||
@ -418,9 +479,9 @@ Enable WIN32 compilation of libpq
|
|||||||
Alpha spinlock fix from <ulink url="mailto:gatgul@voicenet.com">Uncle George</ulink>
|
Alpha spinlock fix from <ulink url="mailto:gatgul@voicenet.com">Uncle George</ulink>
|
||||||
Overhaul of optimizer data structures (Tom)
|
Overhaul of optimizer data structures (Tom)
|
||||||
Fix to cygipc library (Yutaka Tanida)
|
Fix to cygipc library (Yutaka Tanida)
|
||||||
Allow pgsql to work on newer Cygwin snapshots(Dan)
|
Allow pgsql to work on newer Cygwin snapshots (Dan)
|
||||||
New catalog version number (Tom)
|
New catalog version number (Tom)
|
||||||
Add Linux ARM.
|
Add Linux ARM
|
||||||
Rename heap_replace to heap_update
|
Rename heap_replace to heap_update
|
||||||
Update for QNX (Dr. Andreas Kardos)
|
Update for QNX (Dr. Andreas Kardos)
|
||||||
New platform-specific regression handling (Tom)
|
New platform-specific regression handling (Tom)
|
||||||
@ -1636,7 +1697,7 @@ Support for client-side environment variables to specify time zone and date styl
|
|||||||
<para>
|
<para>
|
||||||
Socket interface for client/server connection. This is the default now
|
Socket interface for client/server connection. This is the default now
|
||||||
so you may need to start <application>postmaster</application> with the
|
so you may need to start <application>postmaster</application> with the
|
||||||
<quote>-i</quote> flag.
|
<option>-i</option> flag.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -1646,11 +1707,12 @@ Better password authorization mechanisms. Default table permissions have changed
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Old-style <quote>time travel</quote> has been removed. Performance has been improved.
|
Old-style <firstterm>time travel</firstterm>
|
||||||
</para>
|
has been removed. Performance has been improved.
|
||||||
</listitem>
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
@ -854,18 +854,18 @@
|
|||||||
<Para>
|
<Para>
|
||||||
There was a long time where the <ProductName>Postgres</ProductName>
|
There was a long time where the <ProductName>Postgres</ProductName>
|
||||||
rule system was considered broken. The use of rules was not
|
rule system was considered broken. The use of rules was not
|
||||||
recommended and the only part working where view rules. And also
|
recommended and the only part working was view rules. And also
|
||||||
these view rules made problems because the rule system wasn't able
|
these view rules gave problems because the rule system wasn't able
|
||||||
to apply them properly on other statements than a SELECT (for
|
to apply them properly on statements other than a SELECT (for
|
||||||
example an UPDATE
|
example an UPDATE
|
||||||
that used data from a view didn't work).
|
that used data from a view didn't work).
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
During that time, development moved on and many features where
|
During that time, development moved on and many features were
|
||||||
added to the parser and optimizer. The rule system got more and more
|
added to the parser and optimizer. The rule system got more and more
|
||||||
out of sync with their capabilities and it became harder and harder
|
out of sync with their capabilities and it became harder and harder
|
||||||
to start fixing it. Thus, noone did.
|
to start fixing it. Thus, no one did.
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
@ -2088,7 +2088,7 @@ Merge Join
|
|||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
Another situation are cases on UPDATE where it depends on the
|
Another situation is cases on UPDATE where it depends on the
|
||||||
change of an attribute if an action should be performed or
|
change of an attribute if an action should be performed or
|
||||||
not. In <ProductName>Postgres</ProductName> version 6.4, the
|
not. In <ProductName>Postgres</ProductName> version 6.4, the
|
||||||
attribute specification for rule events is disabled (it will have
|
attribute specification for rule events is disabled (it will have
|
||||||
@ -2096,7 +2096,7 @@ Merge Join
|
|||||||
- stay tuned). So for now the only way to
|
- stay tuned). So for now the only way to
|
||||||
create a rule as in the shoelace_log example is to do it with
|
create a rule as in the shoelace_log example is to do it with
|
||||||
a rule qualification. That results in an extra query that is
|
a rule qualification. That results in an extra query that is
|
||||||
performed allways, even if the attribute of interest cannot
|
performed always, even if the attribute of interest cannot
|
||||||
change at all because it does not appear in the targetlist
|
change at all because it does not appear in the targetlist
|
||||||
of the initial query. When this is enabled again, it will be
|
of the initial query. When this is enabled again, it will be
|
||||||
one more advantage of rules over triggers. Optimization of
|
one more advantage of rules over triggers. Optimization of
|
||||||
@ -2108,7 +2108,7 @@ Merge Join
|
|||||||
decision. The rule system will know it by looking up the
|
decision. The rule system will know it by looking up the
|
||||||
targetlist and will suppress the additional query completely
|
targetlist and will suppress the additional query completely
|
||||||
if the attribute isn't touched. So the rule, qualified or not,
|
if the attribute isn't touched. So the rule, qualified or not,
|
||||||
will only do it's scan's if there ever could be something to do.
|
will only do its scans if there ever could be something to do.
|
||||||
</Para>
|
</Para>
|
||||||
|
|
||||||
<Para>
|
<Para>
|
||||||
@ -2121,3 +2121,20 @@ Merge Join
|
|||||||
</Sect1>
|
</Sect1>
|
||||||
|
|
||||||
</Chapter>
|
</Chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.9 2000/04/23 00:25:06 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.10 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.9 2000/04/23 00:25:06 tgl
|
|||||||
<para>
|
<para>
|
||||||
All <Productname>Postgres</Productname> commands that are executed
|
All <Productname>Postgres</Productname> commands that are executed
|
||||||
directly from a Unix shell are
|
directly from a Unix shell are
|
||||||
found in the directory <quote>.../bin</quote>. Including this directory in
|
found in the directory <filename>.../bin</filename>. Including this directory in
|
||||||
your search path will make executing the commands easier.
|
your search path will make executing the commands easier.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ FloatExceptionHandler
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
<quote>kill(*,signal)</quote> means sending a signal to all backends.
|
"<literal>kill(*,signal)</literal>" means sending a signal to all backends.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</para>
|
</para>
|
||||||
@ -247,3 +247,20 @@ cat old_pg_options > $DATA_DIR/pg_options
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -157,7 +157,10 @@ Return status
|
|||||||
<REFSECT1 ID="R1-SPI-SPICONNECT-2">
|
<REFSECT1 ID="R1-SPI-SPICONNECT-2">
|
||||||
<TITLE>Usage
|
<TITLE>Usage
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<PARA>XXX thomas 1997-12-24
|
<PARA>
|
||||||
|
<!--
|
||||||
|
XXX thomas 1997-12-24
|
||||||
|
-->
|
||||||
</PARA>
|
</PARA>
|
||||||
</REFSECT1>
|
</REFSECT1>
|
||||||
<REFSECT1 ID="R1-SPI-SPICONNECT-3">
|
<REFSECT1 ID="R1-SPI-SPICONNECT-3">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.8 2000/04/07 13:30:58 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.9 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="sql">
|
<chapter id="sql">
|
||||||
@ -24,7 +24,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v 1.8 2000/04/07 13:30:58 thomas E
|
|||||||
<para>
|
<para>
|
||||||
<acronym>SQL</acronym> has become the most popular relational query
|
<acronym>SQL</acronym> has become the most popular relational query
|
||||||
language.
|
language.
|
||||||
The name <quote><acronym>SQL</acronym></quote> is an abbreviation for
|
The name "<acronym>SQL</acronym>" is an abbreviation for
|
||||||
<firstterm>Structured Query Language</firstterm>.
|
<firstterm>Structured Query Language</firstterm>.
|
||||||
In 1974 Donald Chamberlin and others defined the
|
In 1974 Donald Chamberlin and others defined the
|
||||||
language SEQUEL (<firstterm>Structured English Query
|
language SEQUEL (<firstterm>Structured English Query
|
||||||
@ -759,8 +759,8 @@ t<subscript>r</subscript>(A,B)=t∧t<subscript>r</subscript>(C,D)=t<subscript>
|
|||||||
can be formulated using relational algebra can also be formulated
|
can be formulated using relational algebra can also be formulated
|
||||||
using the relational calculus and vice versa.
|
using the relational calculus and vice versa.
|
||||||
This was first proved by E. F. Codd in
|
This was first proved by E. F. Codd in
|
||||||
1972. This proof is based on an algorithm (<quote>Codd's reduction
|
1972. This proof is based on an algorithm ("Codd's reduction
|
||||||
algorithm</quote>) by which an arbitrary expression of the relational
|
algorithm") by which an arbitrary expression of the relational
|
||||||
calculus can be reduced to a semantically equivalent expression of
|
calculus can be reduced to a semantically equivalent expression of
|
||||||
relational algebra. For a more detailed discussion on that refer to
|
relational algebra. For a more detailed discussion on that refer to
|
||||||
<xref linkend="DATE94" endterm="DATE94">
|
<xref linkend="DATE94" endterm="DATE94">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.10 2000/04/07 13:30:58 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.11 2000/05/02 20:01:52 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="start">
|
<chapter id="start">
|
||||||
@ -19,7 +19,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.10 2000/04/07 13:30:58 thoma
|
|||||||
the database directories and started the
|
the database directories and started the
|
||||||
<application>postmaster</application>
|
<application>postmaster</application>
|
||||||
process. This person does not have to be the Unix
|
process. This person does not have to be the Unix
|
||||||
superuser (<quote>root</quote>)
|
superuser ("root")
|
||||||
or the computer system administrator; a person can install and use
|
or the computer system administrator; a person can install and use
|
||||||
<productname>Postgres</productname> without any special accounts or
|
<productname>Postgres</productname> without any special accounts or
|
||||||
privileges.
|
privileges.
|
||||||
@ -34,9 +34,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.10 2000/04/07 13:30:58 thoma
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Throughout this manual, any examples that begin with
|
Throughout this manual, any examples that begin with
|
||||||
the character <quote>%</quote> are commands that should be typed
|
the character "<literal>%</literal>" are commands that should be typed
|
||||||
at the Unix shell prompt. Examples that begin with the
|
at the Unix shell prompt. Examples that begin with the
|
||||||
character <quote>*</quote> are commands in the Postgres query
|
character "<literal>*</literal>" are commands in the Postgres query
|
||||||
language, Postgres <acronym>SQL</acronym>.
|
language, Postgres <acronym>SQL</acronym>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ mydb=>
|
|||||||
workspace maintained by the terminal monitor.
|
workspace maintained by the terminal monitor.
|
||||||
The <application>psql</application> program responds to escape
|
The <application>psql</application> program responds to escape
|
||||||
codes that begin
|
codes that begin
|
||||||
with the backslash character, <quote>\</quote> For example, you
|
with the backslash character, "<literal>\</literal>" For example, you
|
||||||
can get help on the syntax of various
|
can get help on the syntax of various
|
||||||
<productname>Postgres</productname> <acronym>SQL</acronym>
|
<productname>Postgres</productname> <acronym>SQL</acronym>
|
||||||
commands by typing:
|
commands by typing:
|
||||||
@ -364,7 +364,7 @@ mydb=> \g
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
This tells the server to process the query. If you
|
This tells the server to process the query. If you
|
||||||
terminate your query with a semicolon, the <quote>\g</quote> is not
|
terminate your query with a semicolon, the "<literal>\g</literal>" is not
|
||||||
necessary.
|
necessary.
|
||||||
<application>psql</application> will automatically process
|
<application>psql</application> will automatically process
|
||||||
semicolon terminated queries.
|
semicolon terminated queries.
|
||||||
@ -386,9 +386,9 @@ mydb=> \q
|
|||||||
White space (i.e., spaces, tabs and newlines) may be
|
White space (i.e., spaces, tabs and newlines) may be
|
||||||
used freely in <acronym>SQL</acronym> queries. Single-line
|
used freely in <acronym>SQL</acronym> queries. Single-line
|
||||||
comments are denoted by
|
comments are denoted by
|
||||||
<quote>--</quote>. Everything after the dashes up to the end of the
|
"<literal>--</literal>". Everything after the dashes up to the end of the
|
||||||
line is ignored. Multiple-line comments, and comments within a line,
|
line is ignored. Multiple-line comments, and comments within a line,
|
||||||
are denoted by <quote>/* ... */</quote>
|
are denoted by "<literal>/* ... */</literal>".
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.19 2000/04/08 23:12:00 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.20 2000/05/02 20:01:53 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="syntax">
|
<chapter id="syntax">
|
||||||
@ -65,7 +65,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.19 2000/04/08 23:12:00 momj
|
|||||||
Any string can be specified as an identifier if surrounded by
|
Any string can be specified as an identifier if surrounded by
|
||||||
double quotes (<quote>like this!</quote>). Some care is required since
|
double quotes (<quote>like this!</quote>). Some care is required since
|
||||||
such an identifier will be case sensitive
|
such an identifier will be case sensitive
|
||||||
and will retain embedded whitespace other special characters.
|
and will retain embedded whitespace and most other special characters.
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
@ -84,6 +84,7 @@ EXPLAIN EXTEND
|
|||||||
LISTEN LOAD LOCK
|
LISTEN LOAD LOCK
|
||||||
MOVE
|
MOVE
|
||||||
NEW NONE NOTIFY
|
NEW NONE NOTIFY
|
||||||
|
OFFSET
|
||||||
RESET
|
RESET
|
||||||
SETOF SHOW
|
SETOF SHOW
|
||||||
UNLISTEN UNTIL
|
UNLISTEN UNTIL
|
||||||
@ -98,19 +99,27 @@ VACUUM VERBOSE
|
|||||||
are allowed to be present as column labels, but not as identifiers:
|
are allowed to be present as column labels, but not as identifiers:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CASE COALESCE CROSS CURRENT CURRENT_USER CURRENT_SESSION
|
ALL ANY ASC BETWEEN BIT BOTH
|
||||||
DEC DECIMAL
|
CASE CAST CHAR CHARACTER CHECK COALESCE COLLATE COLUMN
|
||||||
ELSE END
|
CONSTRAINT CROSS CURRENT CURRENT_DATE CURRENT_TIME
|
||||||
FALSE FOREIGN
|
CURRENT_TIMESTAMP CURRENT_USER
|
||||||
|
DEC DECIMAL DEFAULT DESC DISTINCT
|
||||||
|
ELSE END EXCEPT EXISTS EXTRACT
|
||||||
|
FALSE FLOAT FOR FOREIGN FROM FULL
|
||||||
GLOBAL GROUP
|
GLOBAL GROUP
|
||||||
LOCAL
|
HAVING
|
||||||
NULLIF NUMERIC
|
IN INNER INTERSECT INTO IS
|
||||||
ORDER
|
JOIN
|
||||||
POSITION PRECISION
|
LEADING LEFT LIKE LOCAL
|
||||||
SESSION_USER
|
NATURAL NCHAR NOT NULL NULLIF NUMERIC
|
||||||
TABLE THEN TRANSACTION TRUE
|
ON OR ORDER OUTER OVERLAPS
|
||||||
USER
|
POSITION PRECISION PRIMARY PUBLIC
|
||||||
WHEN
|
REFERENCES RIGHT
|
||||||
|
SELECT SESSION_USER SOME SUBSTRING
|
||||||
|
TABLE THEN TO TRANSACTION TRIM TRUE
|
||||||
|
UNION UNIQUE USER
|
||||||
|
VARCHAR
|
||||||
|
WHEN WHERE
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
The following are <productname>Postgres</productname>
|
The following are <productname>Postgres</productname>
|
||||||
@ -118,12 +127,9 @@ WHEN
|
|||||||
or <acronym>SQL3</acronym> reserved words:
|
or <acronym>SQL3</acronym> reserved words:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ADD ALL ALTER AND ANY AS ASC
|
ADD ALTER AND AS
|
||||||
BEGIN BETWEEN BOTH BY
|
BEGIN BY
|
||||||
CASCADE CAST CHAR CHARACTER CHECK CLOSE
|
CASCADE CLOSE COMMIT CREATE CURSOR
|
||||||
COLLATE COLUMN COMMIT CONSTRAINT CREATE
|
|
||||||
CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP
|
|
||||||
CURSOR
|
|
||||||
DECLARE DEFAULT DELETE DESC DISTINCT DROP
|
DECLARE DEFAULT DELETE DESC DISTINCT DROP
|
||||||
EXECUTE EXISTS EXTRACT
|
EXECUTE EXISTS EXTRACT
|
||||||
FETCH FLOAT FOR FROM FULL
|
FETCH FLOAT FOR FROM FULL
|
||||||
@ -148,10 +154,10 @@ WHERE WITH WORK
|
|||||||
The following are <acronym>SQL92</acronym> reserved key words which
|
The following are <acronym>SQL92</acronym> reserved key words which
|
||||||
are not <productname>Postgres</productname> reserved key words, but which
|
are not <productname>Postgres</productname> reserved key words, but which
|
||||||
if used as function names are always translated into the function
|
if used as function names are always translated into the function
|
||||||
<function>length</function>:
|
<function>CHAR_LENGTH</function>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CHAR_LENGTH CHARACTER_LENGTH
|
CHARACTER_LENGTH
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -166,12 +172,28 @@ BOOLEAN DOUBLE FLOAT INT INTEGER INTERVAL REAL SMALLINT
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following are not keywords of any kind, but when used in the
|
||||||
|
context of a type name are translated into a native
|
||||||
|
<productname>Postgres</productname> type, and when used in the
|
||||||
|
context of a function name are translated into a native function:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
DATETIME TIMESPAN
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
(translated to <type>TIMESTAMP</type> and <type>INTERVAL</type>,
|
||||||
|
respectively). This feature is intended to help with
|
||||||
|
transitioning to v7.0, and will be removed in the next full
|
||||||
|
release (likely v7.1).
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following are either <acronym>SQL92</acronym>
|
The following are either <acronym>SQL92</acronym>
|
||||||
or <acronym>SQL3</acronym> reserved key words
|
or <acronym>SQL3</acronym> reserved key words
|
||||||
which are not key words in <productname>Postgres</productname>.
|
which are not key words in <productname>Postgres</productname>.
|
||||||
These have no proscribed usage in <productname>Postgres</productname>
|
These have no proscribed usage in <productname>Postgres</productname>
|
||||||
at the time of writing (v6.5) but may become reserved key words in the
|
at the time of writing (v7.0) but may become reserved key words in the
|
||||||
future:
|
future:
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@ -185,9 +207,10 @@ BOOLEAN DOUBLE FLOAT INT INTEGER INTERVAL REAL SMALLINT
|
|||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ALLOCATE ARE ASSERTION AT AUTHORIZATION AVG
|
ALLOCATE ARE ASSERTION AT AUTHORIZATION AVG
|
||||||
BIT BIT_LENGTH
|
BIT_LENGTH
|
||||||
CASCADED CATALOG COLLATION CONNECT CONNECTION
|
CASCADED CATALOG CHAR_LENGTH CHARACTER_LENGTH COLLATION
|
||||||
CONTINUE CONVERT CORRESPONDING COUNT
|
CONNECT CONNECTION CONTINUE CONVERT CORRESPONDING COUNT
|
||||||
|
CURRENT_SESSION
|
||||||
DATE DEALLOCATE DEC DESCRIBE DESCRIPTOR
|
DATE DEALLOCATE DEC DESCRIBE DESCRIPTOR
|
||||||
DIAGNOSTICS DISCONNECT DOMAIN
|
DIAGNOSTICS DISCONNECT DOMAIN
|
||||||
ESCAPE EXCEPT EXCEPTION EXEC EXTERNAL
|
ESCAPE EXCEPT EXCEPTION EXEC EXTERNAL
|
||||||
@ -231,20 +254,21 @@ WHENEVER WRITE
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
ACCESS AFTER AGGREGATE
|
ACCESS AFTER AGGREGATE
|
||||||
BACKWARD BEFORE
|
BACKWARD BEFORE
|
||||||
CACHE CREATEDB CREATEUSER CYCLE
|
CACHE COMMENT CREATEDB CREATEUSER CYCLE
|
||||||
DATABASE DELIMITERS
|
DATABASE DELIMITERS
|
||||||
EACH ENCODING EXCLUSIVE
|
EACH ENCODING EXCLUSIVE
|
||||||
FORWARD FUNCTION
|
FORCE FORWARD FUNCTION
|
||||||
HANDLER
|
HANDLER
|
||||||
INCREMENT INDEX INHERITS INSENSITIVE INSTEAD ISNULL
|
INCREMENT INDEX INHERITS INSENSITIVE INSTEAD ISNULL
|
||||||
LANCOMPILER LOCATION
|
LANCOMPILER LOCATION
|
||||||
MAXVALUE MINVALUE MODE
|
MAXVALUE MINVALUE MODE
|
||||||
NOCREATEDB NOCREATEUSER NOTHING NOTNULL
|
NOCREATEDB NOCREATEUSER NOTHING NOTIFY NOTNULL
|
||||||
OIDS OPERATOR
|
OIDS OPERATOR
|
||||||
PASSWORD PROCEDURAL
|
PASSWORD PROCEDURAL
|
||||||
RECIPE RENAME RETURNS ROW RULE
|
RECIPE REINDEX RENAME RETURNS ROW RULE
|
||||||
SEQUENCE SERIAL SHARE START STATEMENT STDIN STDOUT
|
SEQUENCE SERIAL SHARE START STATEMENT STDIN STDOUT
|
||||||
TRUSTED
|
TEMP TRUSTED
|
||||||
|
UNLISTEN UNTIL
|
||||||
VALID VERSION
|
VALID VERSION
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,187 +1,332 @@
|
|||||||
<Chapter Id="triggers">
|
<chapter id="triggers">
|
||||||
<Title>Triggers</Title>
|
<title>Triggers</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName> has various client interfaces
|
<productname>Postgres</productname> has various client interfaces
|
||||||
such as Perl, Tcl, Python and C, as well as two
|
such as Perl, Tcl, Python and C, as well as three
|
||||||
<FirstTerm>Procedural Languages</FirstTerm>
|
<firstterm>Procedural Languages</firstterm>
|
||||||
(PL). It is also possible
|
(PL). It is also possible
|
||||||
to call C functions as trigger actions. Note that STATEMENT-level trigger
|
to call C functions as trigger actions. Note that STATEMENT-level trigger
|
||||||
events are not supported in the current version. You can currently specify
|
events are not supported in the current version. You can currently specify
|
||||||
BEFORE or AFTER on INSERT, DELETE or UPDATE of a tuple as a trigger event.
|
BEFORE or AFTER on INSERT, DELETE or UPDATE of a tuple as a trigger event.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Trigger Creation</Title>
|
<title>Trigger Creation</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
If a trigger event occurs, the trigger manager (called by the Executor)
|
If a trigger event occurs, the trigger manager (called by the Executor)
|
||||||
initializes the global structure TriggerData *CurrentTriggerData (described
|
initializes the global structure TriggerData *CurrentTriggerData (described
|
||||||
below) and calls the trigger function to handle the event.
|
below) and calls the trigger function to handle the event.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The trigger function must be created before the trigger is created as a
|
The trigger function must be created before the trigger is created as a
|
||||||
function taking no arguments and returns opaque.
|
function taking no arguments and returns opaque.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
The syntax for creating triggers is as follows:
|
The syntax for creating triggers is as follows:
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
CREATE TRIGGER <trigger name> <BEFORE|AFTER> <INSERT|DELETE|UPDATE>
|
CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | DELETE | UPDATE [ OR ... ] ]
|
||||||
ON <relation name> FOR EACH <ROW|STATEMENT>
|
ON <replaceable>relation</replaceable> FOR EACH [ ROW | STATEMENT ]
|
||||||
EXECUTE PROCEDURE <procedure name> (<function args>);
|
EXECUTE PROCEDURE <replaceable>procedure</replaceable>
|
||||||
</ProgramListing>
|
(<replaceable>args</replaceable>);
|
||||||
</Para>
|
</programlisting>
|
||||||
|
|
||||||
<Para>
|
where the arguments are:
|
||||||
The name of the trigger is used if you ever have to delete the trigger.
|
|
||||||
It is used as an argument to the DROP TRIGGER command.
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
<variablelist>
|
||||||
The next word determines whether the function is called before or after
|
<varlistentry>
|
||||||
the event.
|
<term>
|
||||||
</Para>
|
<replaceable>trigger</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the trigger is
|
||||||
|
used if you ever have to delete the trigger.
|
||||||
|
It is used as an argument to the <command>DROP TRIGGER</command> command.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
The next element of the command determines on what event(s) will trigger
|
<term>BEFORE</term>
|
||||||
the function. Multiple events can be specified separated by OR.
|
<term>AFTER</term>
|
||||||
</Para>
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Determines whether the function is called before or after
|
||||||
|
the event.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
The relation name determines which table the event applies to.
|
<term>INSERT</term>
|
||||||
</Para>
|
<term>DELETE</term>
|
||||||
|
<term>UPDATE</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The next element of the command determines on what event(s) will trigger
|
||||||
|
the function. Multiple events can be specified separated by OR.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
The FOR EACH statement determines whether the trigger is fired for each
|
<term><replaceable>relation</replaceable></term>
|
||||||
affected row or before (or after) the entire statement has completed.
|
<listitem>
|
||||||
</Para>
|
<para>
|
||||||
|
The relation name determines which table the event applies to.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
The procedure name is the C function called.
|
<term>ROW</term>
|
||||||
</Para>
|
<term>STATEMENT</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The FOR EACH clause determines whether the trigger is fired for each
|
||||||
|
affected row or before (or after) the entire statement has completed.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
The args are passed to the function in the CurrentTriggerData structure.
|
<term><replaceable>procedure</replaceable></term>
|
||||||
The purpose of passing arguments to the function is to allow different
|
<listitem>
|
||||||
triggers with similar requirements to call the same function.
|
<para>
|
||||||
</Para>
|
The procedure name is the C function called.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<Para>
|
<varlistentry>
|
||||||
Also, function may be used for triggering different relations (these
|
<term><replaceable>args</replaceable></term>
|
||||||
functions are named as "general trigger functions").
|
<listitem>
|
||||||
</Para>
|
<para>
|
||||||
|
The arguments passed to the function in the CurrentTriggerData structure.
|
||||||
|
The purpose of passing arguments to the function is to allow different
|
||||||
|
triggers with similar requirements to call the same function.
|
||||||
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
As example of using both features above, there could be a general
|
Also, <replaceable>procedure</replaceable>
|
||||||
function that takes as its arguments two field names and puts the current
|
may be used for triggering different relations (these
|
||||||
user in one and the current timestamp in the other. This allows triggers to
|
functions are named as "general trigger functions").
|
||||||
be written on INSERT events to automatically track creation of records in a
|
</para>
|
||||||
transaction table for example. It could also be used as a "last updated"
|
|
||||||
function if used in an UPDATE event.
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Trigger functions return HeapTuple to the calling Executor. This
|
As example of using both features above, there could be a general
|
||||||
is ignored for triggers fired after an INSERT, DELETE or UPDATE operation
|
function that takes as its arguments two field names and puts the current
|
||||||
but it allows BEFORE triggers to:
|
user in one and the current timestamp in the other. This allows triggers to
|
||||||
|
be written on INSERT events to automatically track creation of records in a
|
||||||
|
transaction table for example. It could also be used as a "last updated"
|
||||||
|
function if used in an UPDATE event.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
- return NULL to skip the operation for the current tuple (and so the
|
<para>
|
||||||
tuple will not be inserted/updated/deleted);
|
Trigger functions return HeapTuple to the calling Executor. This
|
||||||
- return a pointer to another tuple (INSERT and UPDATE only) which will
|
is ignored for triggers fired after an INSERT, DELETE or UPDATE operation
|
||||||
be inserted (as the new version of the updated tuple if UPDATE) instead
|
but it allows BEFORE triggers to:
|
||||||
of original tuple.
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
<itemizedlist>
|
||||||
Note, that there is no initialization performed by the CREATE TRIGGER
|
<listitem>
|
||||||
handler. This will be changed in the future. Also, if more than one trigger
|
<para>
|
||||||
is defined for the same event on the same relation, the order of trigger
|
Return NULL to skip the operation for the current tuple (and so the
|
||||||
firing is unpredictable. This may be changed in the future.
|
tuple will not be inserted/updated/deleted).
|
||||||
</Para>
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<Para>
|
<listitem>
|
||||||
If a trigger function executes SQL-queries (using SPI) then these queries
|
<para>
|
||||||
may fire triggers again. This is known as cascading triggers. There is no
|
Return a pointer to another tuple (INSERT and UPDATE only) which will
|
||||||
explicit limitation on the number of cascade levels.
|
be inserted (as the new version of the updated tuple if UPDATE) instead
|
||||||
</Para>
|
of original tuple.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
If a trigger is fired by INSERT and inserts a new tuple in the same
|
Note that there is no initialization performed by the CREATE TRIGGER
|
||||||
relation then this trigger will be fired again. Currently, there is nothing
|
handler. This will be changed in the future. Also, if more than one trigger
|
||||||
provided for synchronization (etc) of these cases but this may change. At
|
is defined for the same event on the same relation, the order of trigger
|
||||||
the moment, there is function funny_dup17() in the regress tests which uses
|
firing is unpredictable. This may be changed in the future.
|
||||||
some techniques to stop recursion (cascading) on itself...
|
</para>
|
||||||
</Para>
|
|
||||||
|
|
||||||
</Sect1>
|
<para>
|
||||||
|
If a trigger function executes SQL-queries (using SPI) then these queries
|
||||||
|
may fire triggers again. This is known as cascading triggers. There is no
|
||||||
|
explicit limitation on the number of cascade levels.
|
||||||
|
</para>
|
||||||
|
|
||||||
<Sect1>
|
<para>
|
||||||
<Title>Interaction with the Trigger Manager</Title>
|
If a trigger is fired by INSERT and inserts a new tuple in the same
|
||||||
|
relation then this trigger will be fired again. Currently, there is nothing
|
||||||
|
provided for synchronization (etc) of these cases but this may change. At
|
||||||
|
the moment, there is function funny_dup17() in the regress tests which uses
|
||||||
|
some techniques to stop recursion (cascading) on itself...
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<Para>
|
<sect1>
|
||||||
As mentioned above, when function is called by the trigger manager,
|
<title>Interaction with the Trigger Manager</title>
|
||||||
structure TriggerData *CurrentTriggerData is NOT NULL and initialized. So
|
|
||||||
it is better to check CurrentTriggerData against being NULL at the start
|
|
||||||
and set it to NULL just after fetching the information to prevent calls to
|
|
||||||
a trigger function not from the trigger manager.
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
struct TriggerData is defined in src/include/commands/trigger.h:
|
As mentioned above, when function is called by the trigger manager,
|
||||||
|
structure TriggerData *CurrentTriggerData is NOT NULL and initialized. So
|
||||||
|
it is better to check CurrentTriggerData against being NULL at the start
|
||||||
|
and set it to NULL just after fetching the information to prevent calls to
|
||||||
|
a trigger function not from the trigger manager.
|
||||||
|
</para>
|
||||||
|
|
||||||
<ProgramListing>
|
<para>
|
||||||
|
struct TriggerData is defined in src/include/commands/trigger.h:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
typedef struct TriggerData
|
typedef struct TriggerData
|
||||||
{
|
{
|
||||||
TriggerEvent tg_event;
|
TriggerEvent tg_event;
|
||||||
Relation tg_relation;
|
Relation tg_relation;
|
||||||
HeapTuple tg_trigtuple;
|
HeapTuple tg_trigtuple;
|
||||||
HeapTuple tg_newtuple;
|
HeapTuple tg_newtuple;
|
||||||
Trigger *tg_trigger;
|
Trigger *tg_trigger;
|
||||||
} TriggerData;
|
} TriggerData;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
<ProgramListing>
|
where the members are defined as follows:
|
||||||
tg_event
|
|
||||||
describes event for which the function is called. You may use the
|
|
||||||
following macros to examine tg_event:
|
|
||||||
|
|
||||||
TRIGGER_FIRED_BEFORE(event) returns TRUE if trigger fired BEFORE;
|
<variablelist>
|
||||||
TRIGGER_FIRED_AFTER(event) returns TRUE if trigger fired AFTER;
|
<varlistentry>
|
||||||
TRIGGER_FIRED_FOR_ROW(event) returns TRUE if trigger fired for
|
<term>tg_event</term>
|
||||||
ROW-level event;
|
<listitem>
|
||||||
TRIGGER_FIRED_FOR_STATEMENT(event) returns TRUE if trigger fired for
|
<para>
|
||||||
STATEMENT-level event;
|
describes the event for which the function is called. You may use the
|
||||||
TRIGGER_FIRED_BY_INSERT(event) returns TRUE if trigger fired by INSERT;
|
following macros to examine <literal>tg_event</literal>:
|
||||||
TRIGGER_FIRED_BY_DELETE(event) returns TRUE if trigger fired by DELETE;
|
|
||||||
TRIGGER_FIRED_BY_UPDATE(event) returns TRUE if trigger fired by UPDATE.
|
|
||||||
|
|
||||||
tg_relation
|
<variablelist>
|
||||||
is pointer to structure describing the triggered relation. Look at
|
<varlistentry>
|
||||||
src/include/utils/rel.h for details about this structure. The most
|
<term>TRIGGER_FIRED_BEFORE(tg_event)</term>
|
||||||
interest things are tg_relation->rd_att (descriptor of the relation
|
<listitem>
|
||||||
tuples) and tg_relation->rd_rel->relname (relation's name. This is not
|
<para>
|
||||||
char*, but NameData. Use SPI_getrelname(tg_relation) to get char* if
|
returns TRUE if trigger fired BEFORE.
|
||||||
you need a copy of name).
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
tg_trigtuple
|
<varlistentry>
|
||||||
is a pointer to the tuple for which the trigger is fired. This is the tuple
|
<term>TRIGGER_FIRED_AFTER(tg_event)</term>
|
||||||
being inserted (if INSERT), deleted (if DELETE) or updated (if UPDATE).
|
<listitem>
|
||||||
If INSERT/DELETE then this is what you are to return to Executor if
|
<para>
|
||||||
you don't want to replace tuple with another one (INSERT) or skip the
|
Returns TRUE if trigger fired AFTER.
|
||||||
operation.
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
tg_newtuple
|
<varlistentry>
|
||||||
is a pointer to the new version of tuple if UPDATE and NULL if this is
|
<term>TRIGGER_FIRED_FOR_ROW(event)</term>
|
||||||
for an INSERT or a DELETE. This is what you are to return to Executor if
|
<listitem>
|
||||||
UPDATE and you don't want to replace this tuple with another one or skip
|
<para>
|
||||||
the operation.
|
Returns TRUE if trigger fired for
|
||||||
|
a ROW-level event.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
tg_trigger
|
<varlistentry>
|
||||||
is pointer to structure Trigger defined in src/include/utils/rel.h:
|
<term>TRIGGER_FIRED_FOR_STATEMENT(event)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Returns TRUE if trigger fired for
|
||||||
|
STATEMENT-level event.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>TRIGGER_FIRED_BY_INSERT(event)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Returns TRUE if trigger fired by INSERT.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>TRIGGER_FIRED_BY_DELETE(event)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Returns TRUE if trigger fired by DELETE.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>TRIGGER_FIRED_BY_UPDATE(event)</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Returns TRUE if trigger fired by UPDATE.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>tg_relation</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
is a pointer to structure describing the triggered relation. Look at
|
||||||
|
src/include/utils/rel.h for details about this structure. The most
|
||||||
|
interest things are tg_relation->rd_att (descriptor of the relation
|
||||||
|
tuples) and tg_relation->rd_rel->relname (relation's name. This is not
|
||||||
|
char*, but NameData. Use SPI_getrelname(tg_relation) to get char* if
|
||||||
|
you need a copy of name).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>tg_trigtuple</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
is a pointer to the tuple for which the trigger is fired. This is the tuple
|
||||||
|
being inserted (if INSERT), deleted (if DELETE) or updated (if UPDATE).
|
||||||
|
If INSERT/DELETE then this is what you are to return to Executor if
|
||||||
|
you don't want to replace tuple with another one (INSERT) or skip the
|
||||||
|
operation.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>tg_newtuple</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
is a pointer to the new version of tuple if UPDATE and NULL if this is
|
||||||
|
for an INSERT or a DELETE. This is what you are to return to Executor if
|
||||||
|
UPDATE and you don't want to replace this tuple with another one or skip
|
||||||
|
the operation.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>tg_trigger</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
is pointer to structure Trigger defined in src/include/utils/rel.h:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
typedef struct Trigger
|
typedef struct Trigger
|
||||||
{
|
{
|
||||||
Oid tgoid;
|
Oid tgoid;
|
||||||
@ -197,64 +342,72 @@ typedef struct Trigger
|
|||||||
int16 tgattr[FUNC_MAX_ARGS];
|
int16 tgattr[FUNC_MAX_ARGS];
|
||||||
char **tgargs;
|
char **tgargs;
|
||||||
} Trigger;
|
} Trigger;
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
tgname is the trigger's name, tgnargs is number of arguments in tgargs,
|
where
|
||||||
tgargs is an array of pointers to the arguments specified in the CREATE
|
tgname is the trigger's name, tgnargs is number of arguments in tgargs,
|
||||||
TRIGGER statement. Other members are for internal use only.
|
tgargs is an array of pointers to the arguments specified in the CREATE
|
||||||
</ProgramListing>
|
TRIGGER statement. Other members are for internal use only.
|
||||||
</Para>
|
</para>
|
||||||
</Sect1>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Visibility of Data Changes</Title>
|
<title>Visibility of Data Changes</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName> data changes visibility rule: during a query execution, data
|
<productname>Postgres</productname> data changes visibility rule: during a query execution, data
|
||||||
changes made by the query itself (via SQL-function, SPI-function, triggers)
|
changes made by the query itself (via SQL-function, SPI-function, triggers)
|
||||||
are invisible to the query scan. For example, in query
|
are invisible to the query scan. For example, in query
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
INSERT INTO a SELECT * FROM a
|
INSERT INTO a SELECT * FROM a;
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
tuples inserted are invisible for SELECT' scan. In effect, this
|
tuples inserted are invisible for SELECT scan. In effect, this
|
||||||
duplicates the database table within itself (subject to unique index
|
duplicates the database table within itself (subject to unique index
|
||||||
rules, of course) without recursing.
|
rules, of course) without recursing.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
But keep in mind this notice about visibility in the SPI documentation:
|
But keep in mind this notice about visibility in the SPI documentation:
|
||||||
|
|
||||||
<ProgramListing>
|
<blockquote>
|
||||||
Changes made by query Q are visible by queries which are started after
|
<para>
|
||||||
query Q, no matter whether they are started inside Q (during the
|
Changes made by query Q are visible by queries which are started after
|
||||||
execution of Q) or after Q is done.
|
query Q, no matter whether they are started inside Q (during the
|
||||||
</ProgramListing>
|
execution of Q) or after Q is done.
|
||||||
</Para>
|
</para>
|
||||||
|
</blockquote>
|
||||||
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
This is true for triggers as well so, though a tuple being inserted
|
This is true for triggers as well so, though a tuple being inserted
|
||||||
(tg_trigtuple) is not visible to queries in a BEFORE trigger, this tuple
|
(tg_trigtuple) is not visible to queries in a BEFORE trigger, this tuple
|
||||||
(just inserted) is visible to queries in an AFTER trigger, and to queries
|
(just inserted) is visible to queries in an AFTER trigger, and to queries
|
||||||
in BEFORE/AFTER triggers fired after this!
|
in BEFORE/AFTER triggers fired after this!
|
||||||
</Para>
|
</para>
|
||||||
</Sect1>
|
</sect1>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>Examples</Title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
There are more complex examples in in src/test/regress/regress.c and
|
There are more complex examples in
|
||||||
in contrib/spi.
|
<filename>src/test/regress/regress.c</filename> and
|
||||||
</Para>
|
in <filename>contrib/spi</filename>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Here is a very simple example of trigger usage. Function trigf reports
|
Here is a very simple example of trigger usage. Function trigf reports
|
||||||
the number of tuples in the triggered relation ttest and skips the
|
the number of tuples in the triggered relation ttest and skips the
|
||||||
operation if the query attempts to insert NULL into x (i.e - it acts as a
|
operation if the query attempts to insert NULL into x (i.e - it acts as a
|
||||||
NOT NULL constraint but doesn't abort the transaction).
|
NOT NULL constraint but doesn't abort the transaction).
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
#include "executor/spi.h" /* this is what you need to work with SPI */
|
#include "executor/spi.h" /* this is what you need to work with SPI */
|
||||||
#include "commands/trigger.h" /* -"- and triggers */
|
#include "commands/trigger.h" /* -"- and triggers */
|
||||||
|
|
||||||
@ -317,16 +470,19 @@ trigf()
|
|||||||
|
|
||||||
return (rettuple);
|
return (rettuple);
|
||||||
}
|
}
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
Now, compile and
|
Now, compile and
|
||||||
create table ttest (x int4);
|
create table ttest (x int4):
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
create function trigf () returns opaque as
|
create function trigf () returns opaque as
|
||||||
'...path_to_so' language 'c';
|
'...path_to_so' language 'c';
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
<ProgramListing>
|
<programlisting>
|
||||||
vac=> create trigger tbefore before insert or update or delete on ttest
|
vac=> create trigger tbefore before insert or update or delete on ttest
|
||||||
for each row execute procedure trigf();
|
for each row execute procedure trigf();
|
||||||
CREATE
|
CREATE
|
||||||
@ -395,8 +551,25 @@ vac=> select * from ttest;
|
|||||||
x
|
x
|
||||||
-
|
-
|
||||||
(0 rows)
|
(0 rows)
|
||||||
</ProgramListing>
|
</programlisting>
|
||||||
|
|
||||||
</Para>
|
</para>
|
||||||
</Sect1>
|
</sect1>
|
||||||
</Chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/tutorial.sgml,v 1.9 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/tutorial.sgml,v 1.10 2000/05/02 20:01:53 thomas Exp $
|
||||||
|
|
||||||
Postgres tutorial. Derived from postgres.sgml.
|
Postgres tutorial. Derived from postgres.sgml.
|
||||||
thomas 1998-02-23
|
thomas 1998-02-23
|
||||||
@ -23,27 +23,28 @@ thomas 1998-02-23
|
|||||||
<!entity sql SYSTEM "sql.sgml">
|
<!entity sql SYSTEM "sql.sgml">
|
||||||
<!entity start SYSTEM "start.sgml">
|
<!entity start SYSTEM "start.sgml">
|
||||||
]>
|
]>
|
||||||
<Book Id="tutorial">
|
|
||||||
|
<book id="tutorial">
|
||||||
|
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<Title>PostgreSQL Tutorial</Title>
|
<title>PostgreSQL Tutorial</title>
|
||||||
<BookInfo>
|
<bookinfo>
|
||||||
<ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<BookBiblio>
|
<bookbiblio>
|
||||||
<AuthorGroup>
|
<authorgroup>
|
||||||
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
</AuthorGroup>
|
</authorgroup>
|
||||||
<!-- editor in authorgroup is not supported
|
<!-- editor in authorgroup is not supported
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
-->
|
-->
|
||||||
<Editor>
|
<editor>
|
||||||
<FirstName>Thomas</FirstName>
|
<firstname>Thomas</firstname>
|
||||||
<SurName>Lockhart</SurName>
|
<surname>Lockhart</surname>
|
||||||
<Affiliation>
|
<affiliation>
|
||||||
<OrgName>Caltech/JPL</OrgName>
|
<orgname>Caltech/JPL</orgname>
|
||||||
</Affiliation>
|
</affiliation>
|
||||||
</Editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
@ -52,17 +53,17 @@ thomas 1998-02-23
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Date>(last updated 1999-05-19)</Date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</BookBiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<LegalNotice>
|
<legalnotice>
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</Para>
|
</para>
|
||||||
</LegalNotice>
|
</legalnotice>
|
||||||
|
|
||||||
</BookInfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -77,20 +78,20 @@ Your name here...
|
|||||||
</Dedication>
|
</Dedication>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Preface>
|
<preface>
|
||||||
<Title>Summary</Title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<ProductName>PostgreSQL</ProductName> is an open-source descendant
|
<productname>PostgreSQL</productname> is an open-source descendant
|
||||||
of this original Berkeley code.
|
of this original Berkeley code.
|
||||||
</Para>
|
</para>
|
||||||
</Preface>
|
</preface>
|
||||||
|
|
||||||
&intro;
|
&intro;
|
||||||
&sql;
|
&sql;
|
||||||
@ -105,7 +106,7 @@ Your name here...
|
|||||||
<INDEX> </INDEX>
|
<INDEX> </INDEX>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Book>
|
</book>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
|
@ -378,7 +378,7 @@ the "preferred type" for strings, <type>text</type>, for this query.
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
If a user defines a new type and defines an operator <quote>||</quote> to work
|
If a user defines a new type and defines an operator "<literal>||</literal>" to work
|
||||||
with it, then this query would no longer succeed as written. The parser would
|
with it, then this query would no longer succeed as written. The parser would
|
||||||
now have candidate types from two categories, and could not decide which to use.
|
now have candidate types from two categories, and could not decide which to use.
|
||||||
</para>
|
</para>
|
||||||
@ -721,3 +721,20 @@ tgl=> SELECT f AS "Floating point" from ff;
|
|||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.18 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.19 2000/05/02 20:01:53 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
|
||||||
@ -39,27 +39,27 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.18 2000/03/31 03:27:41
|
|||||||
%allfiles;
|
%allfiles;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<Book Id="user">
|
<book id="user">
|
||||||
|
|
||||||
<!-- Title information -->
|
<!-- Title information -->
|
||||||
|
|
||||||
<Title>PostgreSQL User's Guide</Title>
|
<title>PostgreSQL User's Guide</title>
|
||||||
<BookInfo>
|
<bookinfo>
|
||||||
<ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
|
<releaseinfo>Covering v7.0 for general release</releaseinfo>
|
||||||
<BookBiblio>
|
<bookbiblio>
|
||||||
<AuthorGroup>
|
<authorgroup>
|
||||||
<CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
|
<corpauthor>The PostgreSQL Development Team</corpauthor>
|
||||||
</AuthorGroup>
|
</authorgroup>
|
||||||
<!-- editor in authorgroup is not supported
|
<!-- editor in authorgroup is not supported
|
||||||
<AuthorGroup>
|
<AuthorGroup>
|
||||||
-->
|
-->
|
||||||
<Editor>
|
<editor>
|
||||||
<FirstName>Thomas</FirstName>
|
<firstname>Thomas</firstname>
|
||||||
<SurName>Lockhart</SurName>
|
<surname>Lockhart</surname>
|
||||||
<Affiliation>
|
<affiliation>
|
||||||
<OrgName>Caltech/JPL</OrgName>
|
<orgname>Caltech/JPL</orgname>
|
||||||
</Affiliation>
|
</affiliation>
|
||||||
</Editor>
|
</editor>
|
||||||
<!--
|
<!--
|
||||||
</AuthorGroup>
|
</AuthorGroup>
|
||||||
-->
|
-->
|
||||||
@ -68,17 +68,17 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.18 2000/03/31 03:27:41
|
|||||||
<AuthorInitials>TGL</AuthorInitials>
|
<AuthorInitials>TGL</AuthorInitials>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Date>(last updated 1999-06-01)</Date>
|
<date>(last updated 2000-05-01)</date>
|
||||||
</BookBiblio>
|
</bookbiblio>
|
||||||
|
|
||||||
<LegalNotice>
|
<legalnotice>
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
|
<productname>PostgreSQL</productname> is Copyright © 1996-2000
|
||||||
by the Postgres Global Development Group.
|
by PostgreSQL Inc.
|
||||||
</Para>
|
</para>
|
||||||
</LegalNotice>
|
</legalnotice>
|
||||||
|
|
||||||
</BookInfo>
|
</bookinfo>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<TOC> </TOC>
|
<TOC> </TOC>
|
||||||
@ -94,19 +94,19 @@ Your name here...
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<preface id="preface">
|
<preface id="preface">
|
||||||
<Title>Summary</Title>
|
<title>Summary</title>
|
||||||
|
|
||||||
<Para>
|
<para>
|
||||||
<ProductName>Postgres</ProductName>,
|
<productname>Postgres</productname>,
|
||||||
developed originally in the UC Berkeley Computer Science Department,
|
developed originally in the UC Berkeley Computer Science Department,
|
||||||
pioneered many of the object-relational concepts
|
pioneered many of the object-relational concepts
|
||||||
now becoming available in some commercial databases.
|
now becoming available in some commercial databases.
|
||||||
It provides SQL92/SQL3 language support,
|
It provides SQL92/SQL3 language support,
|
||||||
transaction integrity, and type extensibility.
|
transaction integrity, and type extensibility.
|
||||||
<ProductName>PostgreSQL</ProductName> is an open-source descendant
|
<productname>PostgreSQL</productname> is an open-source descendant
|
||||||
of this original Berkeley code.
|
of this original Berkeley code.
|
||||||
</Para>
|
</para>
|
||||||
</Preface>
|
</preface>
|
||||||
|
|
||||||
&intro;
|
&intro;
|
||||||
&syntax;
|
&syntax;
|
||||||
@ -142,7 +142,7 @@ Your name here...
|
|||||||
</index>
|
</index>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Book>
|
</book>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.13 2000/03/31 03:27:41 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.14 2000/05/02 20:01:53 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="xfunc">
|
<chapter id="xfunc">
|
||||||
@ -123,16 +123,16 @@ select function hobbies (EMP) returns set of HOBBIES
|
|||||||
simply returns a base type, such as <literal>int4</literal>:
|
simply returns a base type, such as <literal>int4</literal>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION one() RETURNS int4
|
CREATE FUNCTION one() RETURNS int4
|
||||||
AS 'SELECT 1 as RESULT' LANGUAGE 'sql';
|
AS 'SELECT 1 as RESULT' LANGUAGE 'sql';
|
||||||
|
|
||||||
SELECT one() AS answer;
|
SELECT one() AS answer;
|
||||||
|
|
||||||
+-------+
|
+-------+
|
||||||
|answer |
|
|answer |
|
||||||
+-------+
|
+-------+
|
||||||
|1 |
|
|1 |
|
||||||
+-------+
|
+-------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -149,16 +149,16 @@ select function hobbies (EMP) returns set of HOBBIES
|
|||||||
and $2:
|
and $2:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION add_em(int4, int4) RETURNS int4
|
CREATE FUNCTION add_em(int4, int4) RETURNS int4
|
||||||
AS 'SELECT $1 + $2;' LANGUAGE 'sql';
|
AS 'SELECT $1 + $2;' LANGUAGE 'sql';
|
||||||
|
|
||||||
SELECT add_em(1, 2) AS answer;
|
SELECT add_em(1, 2) AS answer;
|
||||||
|
|
||||||
+-------+
|
+-------+
|
||||||
|answer |
|
|answer |
|
||||||
+-------+
|
+-------+
|
||||||
|3 |
|
|3 |
|
||||||
+-------+
|
+-------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
@ -175,19 +175,19 @@ select function hobbies (EMP) returns set of HOBBIES
|
|||||||
salary would be if it were doubled:
|
salary would be if it were doubled:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION double_salary(EMP) RETURNS int4
|
CREATE FUNCTION double_salary(EMP) RETURNS int4
|
||||||
AS 'SELECT $1.salary * 2 AS salary;' LANGUAGE 'sql';
|
AS 'SELECT $1.salary * 2 AS salary;' LANGUAGE 'sql';
|
||||||
|
|
||||||
SELECT name, double_salary(EMP) AS dream
|
SELECT name, double_salary(EMP) AS dream
|
||||||
FROM EMP
|
FROM EMP
|
||||||
WHERE EMP.cubicle ~= '(2,1)'::point;
|
WHERE EMP.cubicle ~= '(2,1)'::point;
|
||||||
|
|
||||||
|
|
||||||
+-----+-------+
|
+-----+-------+
|
||||||
|name | dream |
|
|name | dream |
|
||||||
+-----+-------+
|
+-----+-------+
|
||||||
|Sam | 2400 |
|
|Sam | 2400 |
|
||||||
+-----+-------+
|
+-----+-------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -199,19 +199,19 @@ select function hobbies (EMP) returns set of HOBBIES
|
|||||||
notation attribute(class) and class.attribute interchangably:
|
notation attribute(class) and class.attribute interchangably:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
--
|
--
|
||||||
-- this is the same as:
|
-- this is the same as:
|
||||||
-- SELECT EMP.name AS youngster FROM EMP WHERE EMP.age < 30
|
-- SELECT EMP.name AS youngster FROM EMP WHERE EMP.age < 30
|
||||||
--
|
--
|
||||||
SELECT name(EMP) AS youngster
|
SELECT name(EMP) AS youngster
|
||||||
FROM EMP
|
FROM EMP
|
||||||
WHERE age(EMP) < 30;
|
WHERE age(EMP) < 30;
|
||||||
|
|
||||||
+----------+
|
+----------+
|
||||||
|youngster |
|
|youngster |
|
||||||
+----------+
|
+----------+
|
||||||
|Sam |
|
|Sam |
|
||||||
+----------+
|
+----------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -223,12 +223,12 @@ select function hobbies (EMP) returns set of HOBBIES
|
|||||||
that returns a single EMP instance:
|
that returns a single EMP instance:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION new_emp() RETURNS EMP
|
CREATE FUNCTION new_emp() RETURNS EMP
|
||||||
AS 'SELECT \'None\'::text AS name,
|
AS 'SELECT \'None\'::text AS name,
|
||||||
1000 AS salary,
|
1000 AS salary,
|
||||||
25 AS age,
|
25 AS age,
|
||||||
\'(2,2)\'::point AS cubicle'
|
\'(2,2)\'::point AS cubicle'
|
||||||
LANGUAGE 'sql';
|
LANGUAGE 'sql';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -266,13 +266,13 @@ WARN::function declared to return type EMP does not retrieve (EMP.*)
|
|||||||
entire instance into another function.
|
entire instance into another function.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SELECT name(new_emp()) AS nobody;
|
SELECT name(new_emp()) AS nobody;
|
||||||
|
|
||||||
+-------+
|
+-------+
|
||||||
|nobody |
|
|nobody |
|
||||||
+-------+
|
+-------+
|
||||||
|None |
|
|None |
|
||||||
+-------+
|
+-------+
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -285,8 +285,8 @@ WARN::function declared to return type EMP does not retrieve (EMP.*)
|
|||||||
with function calls.
|
with function calls.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SELECT new_emp().name AS nobody;
|
SELECT new_emp().name AS nobody;
|
||||||
WARN:parser: syntax error at or near "."
|
WARN:parser: syntax error at or near "."
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@ -303,19 +303,18 @@ WARN::function declared to return type EMP does not retrieve (EMP.*)
|
|||||||
specified as the function's returntype.
|
specified as the function's returntype.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION clean_EMP () RETURNS int4
|
CREATE FUNCTION clean_EMP () RETURNS int4
|
||||||
AS 'DELETE FROM EMP WHERE EMP.salary <= 0;
|
AS 'DELETE FROM EMP WHERE EMP.salary <= 0;
|
||||||
SELECT 1 AS ignore_this'
|
SELECT 1 AS ignore_this'
|
||||||
LANGUAGE 'sql';
|
LANGUAGE 'sql';
|
||||||
|
|
||||||
SELECT clean_EMP();
|
SELECT clean_EMP();
|
||||||
|
|
||||||
+--+
|
+--+
|
||||||
|x |
|
|x |
|
||||||
+--+
|
+--+
|
||||||
|1 |
|
|1 |
|
||||||
+--+
|
+--+
|
||||||
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
@ -688,62 +687,62 @@ memmove(destination->data, buffer, 40);
|
|||||||
Suppose <filename>funcs.c</filename> look like:
|
Suppose <filename>funcs.c</filename> look like:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
/* By Value */
|
/* By Value */
|
||||||
|
|
||||||
int
|
int
|
||||||
add_one(int arg)
|
add_one(int arg)
|
||||||
{
|
{
|
||||||
return(arg + 1);
|
return(arg + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* By Reference, Fixed Length */
|
|
||||||
|
|
||||||
Point *
|
|
||||||
makepoint(Point *pointx, Point *pointy )
|
|
||||||
{
|
|
||||||
Point *new_point = (Point *) palloc(sizeof(Point));
|
|
||||||
|
|
||||||
new_point->x = pointx->x;
|
|
||||||
new_point->y = pointy->y;
|
|
||||||
|
|
||||||
return new_point;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* By Reference, Variable Length */
|
|
||||||
|
|
||||||
text *
|
|
||||||
copytext(text *t)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* VARSIZE is the total size of the struct in bytes.
|
|
||||||
*/
|
|
||||||
text *new_t = (text *) palloc(VARSIZE(t));
|
|
||||||
memset(new_t, 0, VARSIZE(t));
|
|
||||||
VARSIZE(new_t) = VARSIZE(t);
|
|
||||||
/*
|
|
||||||
* VARDATA is a pointer to the data region of the struct.
|
|
||||||
*/
|
|
||||||
memcpy((void *) VARDATA(new_t), /* destination */
|
|
||||||
(void *) VARDATA(t), /* source */
|
|
||||||
VARSIZE(t)-VARHDRSZ); /* how many bytes */
|
|
||||||
return(new_t);
|
|
||||||
}
|
|
||||||
|
|
||||||
text *
|
|
||||||
concat_text(text *arg1, text *arg2)
|
|
||||||
{
|
|
||||||
int32 new_text_size = VARSIZE(arg1) + VARSIZE(arg2) - VARHDRSZ;
|
|
||||||
text *new_text = (text *) palloc(new_text_size);
|
|
||||||
|
|
||||||
memset((void *) new_text, 0, new_text_size);
|
/* By Reference, Fixed Length */
|
||||||
VARSIZE(new_text) = new_text_size;
|
|
||||||
strncpy(VARDATA(new_text), VARDATA(arg1), VARSIZE(arg1)-VARHDRSZ);
|
Point *
|
||||||
strncat(VARDATA(new_text), VARDATA(arg2), VARSIZE(arg2)-VARHDRSZ);
|
makepoint(Point *pointx, Point *pointy )
|
||||||
return (new_text);
|
{
|
||||||
}
|
Point *new_point = (Point *) palloc(sizeof(Point));
|
||||||
|
|
||||||
|
new_point->x = pointx->x;
|
||||||
|
new_point->y = pointy->y;
|
||||||
|
|
||||||
|
return new_point;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* By Reference, Variable Length */
|
||||||
|
|
||||||
|
text *
|
||||||
|
copytext(text *t)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* VARSIZE is the total size of the struct in bytes.
|
||||||
|
*/
|
||||||
|
text *new_t = (text *) palloc(VARSIZE(t));
|
||||||
|
memset(new_t, 0, VARSIZE(t));
|
||||||
|
VARSIZE(new_t) = VARSIZE(t);
|
||||||
|
/*
|
||||||
|
* VARDATA is a pointer to the data region of the struct.
|
||||||
|
*/
|
||||||
|
memcpy((void *) VARDATA(new_t), /* destination */
|
||||||
|
(void *) VARDATA(t), /* source */
|
||||||
|
VARSIZE(t)-VARHDRSZ); /* how many bytes */
|
||||||
|
return(new_t);
|
||||||
|
}
|
||||||
|
|
||||||
|
text *
|
||||||
|
concat_text(text *arg1, text *arg2)
|
||||||
|
{
|
||||||
|
int32 new_text_size = VARSIZE(arg1) + VARSIZE(arg2) - VARHDRSZ;
|
||||||
|
text *new_text = (text *) palloc(new_text_size);
|
||||||
|
|
||||||
|
memset((void *) new_text, 0, new_text_size);
|
||||||
|
VARSIZE(new_text) = new_text_size;
|
||||||
|
strncpy(VARDATA(new_text), VARDATA(arg1), VARSIZE(arg1)-VARHDRSZ);
|
||||||
|
strncat(VARDATA(new_text), VARDATA(arg2), VARSIZE(arg2)-VARHDRSZ);
|
||||||
|
return (new_text);
|
||||||
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -751,17 +750,17 @@ memmove(destination->data, buffer, 40);
|
|||||||
On <acronym>OSF/1</acronym> we would type:
|
On <acronym>OSF/1</acronym> we would type:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE FUNCTION add_one(int4) RETURNS int4
|
CREATE FUNCTION add_one(int4) RETURNS int4
|
||||||
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
||||||
|
|
||||||
CREATE FUNCTION makepoint(point, point) RETURNS point
|
CREATE FUNCTION makepoint(point, point) RETURNS point
|
||||||
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
||||||
|
|
||||||
CREATE FUNCTION concat_text(text, text) RETURNS text
|
CREATE FUNCTION concat_text(text, text) RETURNS text
|
||||||
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
||||||
|
|
||||||
CREATE FUNCTION copytext(text) RETURNS text
|
CREATE FUNCTION copytext(text) RETURNS text
|
||||||
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
AS '<replaceable>PGROOT</replaceable>/tutorial/funcs.so' LANGUAGE 'c';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -796,20 +795,20 @@ memmove(destination->data, buffer, 40);
|
|||||||
In the query above, we can define c_overpaid as:
|
In the query above, we can define c_overpaid as:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
#include "executor/executor.h" /* for GetAttributeByName() */
|
#include "executor/executor.h" /* for GetAttributeByName() */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
c_overpaid(TupleTableSlot *t, /* the current instance of EMP */
|
c_overpaid(TupleTableSlot *t, /* the current instance of EMP */
|
||||||
int4 limit)
|
int4 limit)
|
||||||
{
|
{
|
||||||
bool isnull = false;
|
bool isnull = false;
|
||||||
int4 salary;
|
int4 salary;
|
||||||
salary = (int4) GetAttributeByName(t, "salary", &isnull);
|
salary = (int4) GetAttributeByName(t, "salary", &isnull);
|
||||||
if (isnull)
|
if (isnull)
|
||||||
return (false);
|
return (false);
|
||||||
return(salary > limit);
|
return(salary > limit);
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -827,9 +826,9 @@ memmove(destination->data, buffer, 40);
|
|||||||
call would look like:
|
call would look like:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
char *str;
|
char *str;
|
||||||
...
|
...
|
||||||
str = (char *) GetAttributeByName(t, "name", &isnull)
|
str = (char *) GetAttributeByName(t, "name", &isnull)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -838,8 +837,8 @@ memmove(destination->data, buffer, 40);
|
|||||||
know about the c_overpaid function:
|
know about the c_overpaid function:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
* CREATE FUNCTION c_overpaid(EMP, int4) RETURNS bool
|
* CREATE FUNCTION c_overpaid(EMP, int4) RETURNS bool
|
||||||
AS '<replaceable>PGROOT</replaceable>/tutorial/obj/funcs.so' LANGUAGE 'c';
|
AS '<replaceable>PGROOT</replaceable>/tutorial/obj/funcs.so' LANGUAGE 'c';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<Chapter Id="xtypes">
|
<chapter id="xtypes">
|
||||||
<Title>Extending <Acronym>SQL</Acronym>: Types</Title>
|
<title>Extending <acronym>SQL</acronym>: Types</title>
|
||||||
<Para>
|
<para>
|
||||||
As previously mentioned, there are two kinds of types
|
As previously mentioned, there are two kinds of types
|
||||||
in <ProductName>Postgres</ProductName>: base types (defined in a programming language)
|
in <productname>Postgres</productname>: base types (defined in a programming language)
|
||||||
and composite types (instances).
|
and composite types (instances).
|
||||||
Examples in this section up to interfacing indices can
|
Examples in this section up to interfacing indices can
|
||||||
be found in <FileName>complex.sql</FileName> and <FileName>complex.c</FileName>. Composite examples
|
be found in <filename>complex.sql</filename> and <filename>complex.c</filename>. Composite examples
|
||||||
are in <FileName>funcs.sql</FileName>.
|
are in <filename>funcs.sql</filename>.
|
||||||
</Para>
|
</para>
|
||||||
|
|
||||||
<Sect1>
|
<sect1>
|
||||||
<Title>User-Defined Types</Title>
|
<title>User-Defined Types</title>
|
||||||
|
|
||||||
<Sect2>
|
<sect2>
|
||||||
<Title>Functions Needed for a User-Defined Type</Title>
|
<title>Functions Needed for a User-Defined Type</title>
|
||||||
<Para>
|
<para>
|
||||||
A user-defined type must always have input and output
|
A user-defined type must always have input and output
|
||||||
functions. These functions determine how the type
|
functions. These functions determine how the type
|
||||||
appears in strings (for input by the user and output to
|
appears in strings (for input by the user and output to
|
||||||
@ -26,124 +26,152 @@
|
|||||||
delimited character string.
|
delimited character string.
|
||||||
Suppose we want to define a complex type which represents
|
Suppose we want to define a complex type which represents
|
||||||
complex numbers. Naturally, we choose to represent a
|
complex numbers. Naturally, we choose to represent a
|
||||||
complex in memory as the following <Acronym>C</Acronym> structure:
|
complex in memory as the following <acronym>C</acronym> structure:
|
||||||
<ProgramListing>
|
|
||||||
typedef struct Complex {
|
<programlisting>
|
||||||
double x;
|
typedef struct Complex {
|
||||||
double y;
|
double x;
|
||||||
} Complex;
|
double y;
|
||||||
</ProgramListing>
|
} Complex;
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
and a string of the form (x,y) as the external string
|
and a string of the form (x,y) as the external string
|
||||||
representation.
|
representation.
|
||||||
These functions are usually not hard to write, especially
|
These functions are usually not hard to write, especially
|
||||||
the output function. However, there are a number of points
|
the output function. However, there are a number of points
|
||||||
to remember:
|
to remember:
|
||||||
|
|
||||||
<ItemizedList>
|
<itemizedlist>
|
||||||
<ListItem>
|
<listitem>
|
||||||
<Para> When defining your external (string) representation,
|
<para> When defining your external (string) representation,
|
||||||
remember that you must eventually write a
|
remember that you must eventually write a
|
||||||
complete and robust parser for that representation
|
complete and robust parser for that representation
|
||||||
as your input function!
|
as your input function!
|
||||||
<ProgramListing>
|
|
||||||
Complex *
|
|
||||||
complex_in(char *str)
|
|
||||||
{
|
|
||||||
double x, y;
|
|
||||||
Complex *result;
|
|
||||||
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) {
|
|
||||||
elog(WARN, "complex_in: error in parsing
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
result = (Complex *)palloc(sizeof(Complex));
|
|
||||||
result->x = x;
|
|
||||||
result->y = y;
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
</ProgramListing>
|
|
||||||
|
|
||||||
The output function can simply be:
|
<programlisting>
|
||||||
<ProgramListing>
|
Complex *
|
||||||
char *
|
complex_in(char *str)
|
||||||
complex_out(Complex *complex)
|
{
|
||||||
{
|
double x, y;
|
||||||
char *result;
|
Complex *result;
|
||||||
if (complex == NULL)
|
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) {
|
||||||
return(NULL);
|
elog(WARN, "complex_in: error in parsing
|
||||||
result = (char *) palloc(60);
|
return NULL;
|
||||||
sprintf(result, "(%g,%g)", complex->x, complex->y);
|
}
|
||||||
return(result);
|
result = (Complex *)palloc(sizeof(Complex));
|
||||||
}
|
result->x = x;
|
||||||
</ProgramListing>
|
result->y = y;
|
||||||
</Para>
|
return (result);
|
||||||
</ListItem>
|
}
|
||||||
<ListItem>
|
</programlisting>
|
||||||
<Para> You should try to make the input and output
|
|
||||||
functions inverses of each other. If you do
|
The output function can simply be:
|
||||||
not, you will have severe problems when you need
|
|
||||||
to dump your data into a file and then read it
|
<programlisting>
|
||||||
back in (say, into someone else's database on
|
char *
|
||||||
another computer). This is a particularly common
|
complex_out(Complex *complex)
|
||||||
problem when floating-point numbers are
|
{
|
||||||
involved.
|
char *result;
|
||||||
</Para>
|
if (complex == NULL)
|
||||||
</ListItem>
|
return(NULL);
|
||||||
</ItemizedList>
|
result = (char *) palloc(60);
|
||||||
</para>
|
sprintf(result, "(%g,%g)", complex->x, complex->y);
|
||||||
<Para>
|
return(result);
|
||||||
To define the <Acronym>complex</Acronym> type, we need to create the two
|
}
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
You should try to make the input and output
|
||||||
|
functions inverses of each other. If you do
|
||||||
|
not, you will have severe problems when you need
|
||||||
|
to dump your data into a file and then read it
|
||||||
|
back in (say, into someone else's database on
|
||||||
|
another computer). This is a particularly common
|
||||||
|
problem when floating-point numbers are
|
||||||
|
involved.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
To define the <acronym>complex</acronym> type, we need to create the two
|
||||||
user-defined functions complex_in and complex_out
|
user-defined functions complex_in and complex_out
|
||||||
before creating the type:
|
before creating the type:
|
||||||
<ProgramListing>
|
|
||||||
CREATE FUNCTION complex_in(opaque)
|
|
||||||
RETURNS complex
|
|
||||||
AS 'PGROOT/tutorial/obj/complex.so'
|
|
||||||
LANGUAGE 'c';
|
|
||||||
|
|
||||||
CREATE FUNCTION complex_out(opaque)
|
<programlisting>
|
||||||
RETURNS opaque
|
CREATE FUNCTION complex_in(opaque)
|
||||||
AS 'PGROOT/tutorial/obj/complex.so'
|
RETURNS complex
|
||||||
LANGUAGE 'c';
|
AS 'PGROOT/tutorial/obj/complex.so'
|
||||||
|
LANGUAGE 'c';
|
||||||
|
|
||||||
CREATE TYPE complex (
|
CREATE FUNCTION complex_out(opaque)
|
||||||
internallength = 16,
|
RETURNS opaque
|
||||||
input = complex_in,
|
AS 'PGROOT/tutorial/obj/complex.so'
|
||||||
output = complex_out
|
LANGUAGE 'c';
|
||||||
);
|
|
||||||
</ProgramListing>
|
|
||||||
</Para>
|
|
||||||
|
|
||||||
<Para>
|
CREATE TYPE complex (
|
||||||
As discussed earlier, <ProductName>Postgres</ProductName> fully supports arrays of
|
internallength = 16,
|
||||||
base types. Additionally, <ProductName>Postgres</ProductName> supports arrays of
|
input = complex_in,
|
||||||
|
output = complex_out
|
||||||
|
);
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As discussed earlier, <productname>Postgres</productname> fully supports arrays of
|
||||||
|
base types. Additionally, <productname>Postgres</productname> supports arrays of
|
||||||
user-defined types as well. When you define a type,
|
user-defined types as well. When you define a type,
|
||||||
<ProductName>Postgres</ProductName> automatically provides support for arrays of
|
<productname>Postgres</productname> automatically provides support for arrays of
|
||||||
that type. For historical reasons, the array type has
|
that type. For historical reasons, the array type has
|
||||||
the same name as the user-defined type with the
|
the same name as the user-defined type with the
|
||||||
underscore character _ prepended.
|
underscore character _ prepended.
|
||||||
Composite types do not need any function defined on
|
Composite types do not need any function defined on
|
||||||
them, since the system already understands what they
|
them, since the system already understands what they
|
||||||
look like inside.
|
look like inside.
|
||||||
</Para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
<Sect2>
|
|
||||||
<Title>Large Objects</Title>
|
|
||||||
|
|
||||||
<Para>
|
<sect2>
|
||||||
|
<title>Large Objects</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
The types discussed to this point are all "small"
|
The types discussed to this point are all "small"
|
||||||
objects -- that is, they are smaller than 8KB in size.
|
objects -- that is, they are smaller than 8KB in size.
|
||||||
<Note>
|
<note>
|
||||||
<Para>
|
<para>
|
||||||
1024 longwords == 8192 bytes. In fact, the type must be considerably smaller than 8192 bytes,
|
1024 longwords == 8192 bytes. In fact, the type must be considerably smaller than 8192 bytes,
|
||||||
since the <ProductName>Postgres</ProductName> tuple
|
since the <productname>Postgres</productname> tuple
|
||||||
and page overhead must also fit into this 8KB limitation.
|
and page overhead must also fit into this 8KB limitation.
|
||||||
The actual value that fits depends on the machine architecture.
|
The actual value that fits depends on the machine architecture.
|
||||||
</Para>
|
</para>
|
||||||
</Note>
|
</note>
|
||||||
If you require a larger type for something like a document
|
If you require a larger type for something like a document
|
||||||
retrieval system or for storing bitmaps, you will
|
retrieval system or for storing bitmaps, you will
|
||||||
need to use the <ProductName>Postgres</ProductName> large object interface.
|
need to use the <productname>Postgres</productname> large object
|
||||||
</para>
|
interface, or will need to recompile the
|
||||||
</Sect2>
|
<productname>Postgres</productname> backend to use internal
|
||||||
</Sect1>
|
storage blocks greater than 8kbytes..
|
||||||
</Chapter>
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode:sgml
|
||||||
|
sgml-omittag:nil
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:1
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-default-dtd-file:"./reference.ced"
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/y2k.sgml,v 1.6 2000/04/07 13:30:58 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/y2k.sgml,v 1.7 2000/05/02 20:01:53 thomas Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<sect1 id="y2k">
|
<sect1 id="y2k">
|
||||||
@ -52,8 +52,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/y2k.sgml,v 1.6 2000/04/07 13:30:58 th
|
|||||||
<ulink url="http://www.postgresql.org/docs/user/datatype.htm">User's Guide</ulink>
|
<ulink url="http://www.postgresql.org/docs/user/datatype.htm">User's Guide</ulink>
|
||||||
in the chapter on data types.
|
in the chapter on data types.
|
||||||
For two-digit years, the significant transition year is 1970, not 2000;
|
For two-digit years, the significant transition year is 1970, not 2000;
|
||||||
e.g. <quote>70-01-01</quote> is interpreted as <quote>1970-01-01</quote>,
|
e.g. "<literal>70-01-01</literal>" is interpreted as 1970-01-01,
|
||||||
whereas <quote>69-01-01</quote> is interpreted as <quote>2069-01-01</quote>.
|
whereas "<literal>69-01-01</literal>" is interpreted as 2069-01-01.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user