Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f3d2b2e0
Commit
f3d2b2e0
authored
Jun 03, 1999
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
parent
214e8f32
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1104 additions
and
1372 deletions
+1104
-1372
doc/src/sgml/admin.sgml
doc/src/sgml/admin.sgml
+6
-2
doc/src/sgml/installation.sgml
doc/src/sgml/installation.sgml
+56
-43
doc/src/sgml/legal.sgml
doc/src/sgml/legal.sgml
+55
-39
doc/src/sgml/libpq++.sgml
doc/src/sgml/libpq++.sgml
+721
-710
doc/src/sgml/odbc.sgml
doc/src/sgml/odbc.sgml
+0
-388
doc/src/sgml/postgres.sgml
doc/src/sgml/postgres.sgml
+24
-20
doc/src/sgml/programmer.sgml
doc/src/sgml/programmer.sgml
+6
-2
doc/src/sgml/release.sgml
doc/src/sgml/release.sgml
+223
-159
doc/src/sgml/tutorial.sgml
doc/src/sgml/tutorial.sgml
+7
-5
doc/src/sgml/user.sgml
doc/src/sgml/user.sgml
+6
-4
No files found.
doc/src/sgml/admin.sgml
View file @
f3d2b2e0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.1
4 1999/05/26 17:30:2
7 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.1
5 1999/06/03 04:21:4
7 thomas Exp $
Postgres Administrator's Guide.
Postgres Administrator's Guide.
Derived from postgres.sgml.
Derived from postgres.sgml.
- thomas 1998-10-27
- thomas 1998-10-27
$Log: admin.sgml,v $
$Log: admin.sgml,v $
Revision 1.15 1999/06/03 04:21:47 thomas
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
Revision 1.14 1999/05/26 17:30:27 thomas
Revision 1.14 1999/05/26 17:30:27 thomas
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add an appendix with more details on date/time attributes and handling.
Add an appendix with more details on date/time attributes and handling.
...
@@ -108,7 +112,7 @@ Bigger updates to the installation instructions (install and config).
...
@@ -108,7 +112,7 @@ Bigger updates to the installation instructions (install and config).
<LegalNotice>
<LegalNotice>
<Para>
<Para>
<ProductName>PostgreSQL</ProductName> is
© 1998
-9
<ProductName>PostgreSQL</ProductName> is
Copyright © 1996
-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</Para>
</Para>
</LegalNotice>
</LegalNotice>
...
...
doc/src/sgml/installation.sgml
View file @
f3d2b2e0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.
4 1999/05/26 17:30:29
thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.
5 1999/06/03 04:21:48
thomas Exp $
Postgres quick Installation Guide.
Postgres quick Installation Guide.
- thomas 1998-10-26
- thomas 1998-10-26
$Log: installation.sgml,v $
$Log: installation.sgml,v $
Revision 1.5 1999/06/03 04:21:48 thomas
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
Revision 1.4 1999/05/26 17:30:29 thomas
Revision 1.4 1999/05/26 17:30:29 thomas
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add an appendix with more details on date/time attributes and handling.
Add an appendix with more details on date/time attributes and handling.
...
@@ -37,7 +41,6 @@ First cut at standalone installation guide to replace INSTALL text source.
...
@@ -37,7 +41,6 @@ First cut at standalone installation guide to replace INSTALL text source.
<!entity y2k SYSTEM "y2k.sgml">
<!entity y2k SYSTEM "y2k.sgml">
<!entity config SYSTEM "config.sgml">
<!entity config SYSTEM "config.sgml">
<!entity current SYSTEM "current.sgml">
<!entity intro-ag SYSTEM "intro-ag.sgml">
<!entity intro-ag SYSTEM "intro-ag.sgml">
<!entity install SYSTEM "install.sgml">
<!entity install SYSTEM "install.sgml">
<!entity options SYSTEM "pg_options.sgml">
<!entity options SYSTEM "pg_options.sgml">
...
@@ -51,27 +54,27 @@ First cut at standalone installation guide to replace INSTALL text source.
...
@@ -51,27 +54,27 @@ First cut at standalone installation guide to replace INSTALL text source.
<!entity biblio SYSTEM "biblio.sgml">
<!entity biblio SYSTEM "biblio.sgml">
]>
]>
<
Book Id="installation"
>
<
book
>
<!-- Title information -->
<!-- Title information -->
<
Title>PostgreSQL Installation Guide</T
itle>
<
title>PostgreSQL Installation Guide</t
itle>
<
BookI
nfo>
<
booki
nfo>
<
ReleaseInfo>Covering v6.5 for general release</ReleaseI
nfo>
<
releaseinfo>Covering v6.5 for general release</releasei
nfo>
<
BookB
iblio>
<
bookb
iblio>
<
AuthorG
roup>
<
authorg
roup>
<
CorpAuthor>The PostgreSQL Development Team</CorpA
uthor>
<
corpauthor>The PostgreSQL Development Team</corpa
uthor>
</
AuthorG
roup>
</
authorg
roup>
<!-- editor in authorgroup is not supported
<!-- editor in authorgroup is not supported
<AuthorGroup>
<AuthorGroup>
-->
-->
<
E
ditor>
<
e
ditor>
<
FirstName>Thomas</FirstN
ame>
<
firstname>Thomas</firstn
ame>
<
SurName>Lockhart</SurN
ame>
<
surname>Lockhart</surn
ame>
<
A
ffiliation>
<
a
ffiliation>
<
OrgName>Caltech/JPL</OrgN
ame>
<
orgname>Caltech/JPL</orgn
ame>
</
A
ffiliation>
</
a
ffiliation>
</
E
ditor>
</
e
ditor>
<!--
<!--
</AuthorGroup>
</AuthorGroup>
-->
-->
...
@@ -80,17 +83,17 @@ First cut at standalone installation guide to replace INSTALL text source.
...
@@ -80,17 +83,17 @@ First cut at standalone installation guide to replace INSTALL text source.
<AuthorInitials>TGL</AuthorInitials>
<AuthorInitials>TGL</AuthorInitials>
-->
-->
<
Date>(last updated 1999-06-01)</D
ate>
<
date>(last updated 1999-06-01)</d
ate>
</
BookB
iblio>
</
bookb
iblio>
<
LegalN
otice>
<
legaln
otice>
<
P
ara>
<
p
ara>
<
ProductName>PostgreSQL</ProductN
ame> is © 1998-9
<
productname>PostgreSQL</productn
ame> is © 1998-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</
P
ara>
</
p
ara>
</
LegalN
otice>
</
legaln
otice>
</
BookI
nfo>
</
booki
nfo>
<!--
<!--
<TOC> </TOC>
<TOC> </TOC>
...
@@ -105,22 +108,22 @@ Your name here...
...
@@ -105,22 +108,22 @@ Your name here...
</Dedication>
</Dedication>
-->
-->
<
P
reface>
<
p
reface>
<
Title>Summary</T
itle>
<
title>Summary</t
itle>
<
P
ara>
<
p
ara>
<
ProductName>Postgres</ProductN
ame>,
<
productname>Postgres</productn
ame>,
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</ProductN
ame> is a public-domain, open source descendant
<
productname>PostgreSQL</productn
ame> is a public-domain, open source descendant
of this original Berkeley code.
of this original Berkeley code.
</
P
ara>
</
p
ara>
</
P
reface>
</
p
reface>
<chapter
id="intro"
>
<chapter>
<title>Introduction</title>
<title>Introduction</title>
<para>
<para>
...
@@ -129,24 +132,34 @@ and runtime environment for your system. This may be adequate for many installat
...
@@ -129,24 +132,34 @@ and runtime environment for your system. This may be adequate for many installat
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>.
<citetitle>Administrator's Guide</citetitle>.
</para>
</chapter>
</chapter>
&ports;
&ports;
&install;
&install;
&config;
&config;
&release;
<chapter id="release">
<title>Release Notes</title>
¤t;
</chapter>
<!--
<!--
<INDEX> </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:
-->
doc/src/sgml/legal.sgml
View file @
f3d2b2e0
<
S
ect1>
<
s
ect1>
<Title>Copyrights and Trademarks</T
itle>
<title>Copyrights and Trademarks</t
itle>
<P
ara>
<p
ara>
<ProductName>PostgreSQL</ProductName> is copyright (C) 1996-8
<productname>PostgreSQL</productname> is Copyright © 1996-9
by the PostgreSQL Global Development Group,
by the PostgreSQL Global Development Group,
and is distributed under the terms of the Berkeley license.
and is distributed under the terms of the Berkeley license.
</P
ara>
</p
ara>
<P
ara>
<p
ara>
<ProductName>Postgres95</ProductName> is copyright (C)
1994-5
<productname>Postgres95</productname> is Copyright ©
1994-5
by the Regents of the University of California.
by the Regents of the University of California.
Permission to use, copy, modify, and distribute this software and its documentation
Permission to use, copy, modify, and distribute this software and its documentation
for any purpose, without fee, and without a written agreement is hereby granted,
for any purpose, without fee, and without a written agreement is hereby granted,
provided that the above copyright notice and this paragraph and the following two
provided that the above copyright notice and this paragraph and the following two
paragraphs appear in all copies.
paragraphs appear in all copies.
</P
ara>
</p
ara>
<P
ara>
<p
ara>
In no event shall the University of California be liable to
In no event shall the University of California be liable to
any party for direct, indirect, special, incidental, or consequential
any party for direct, indirect, special, incidental, or consequential
damages, including lost profits, arising out of the use of this
damages, including lost profits, arising out of the use of this
software and its documentation, even if the University of California
software and its documentation, even if the University of California
has been advised of the possibility of such damage.
has been advised of the possibility of such damage.
</P
ara>
</p
ara>
<P
ara>
<p
ara>
The University of California specifically disclaims any
The University of California specifically disclaims any
warranties, including, but not limited to, the implied warranties
warranties, including, but not limited to, the implied warranties
of merchantability and fitness for a particular purpose.
of merchantability and fitness for a particular purpose.
The software provided hereunder is on an "as-is" basis, and
The software provided hereunder is on an "as-is" basis, and
the University of California has no obligations to provide
the University of California has no obligations to provide
maintainance, support, updates, enhancements, or modifications.
maintainance, support, updates, enhancements, or modifications.
</P
ara>
</p
ara>
<P
ara>
<p
ara>
<Acronym>UNIX</A
cronym> is a trademark of X/Open, Ltd. Sun4, SPARC, SunOS
<acronym>UNIX</a
cronym> is a trademark of X/Open, Ltd. Sun4, SPARC, SunOS
and Solaris are trademarks of Sun Microsystems, Inc. DEC,
and Solaris are trademarks of Sun Microsystems, Inc. DEC,
DECstation, Alpha AXP and ULTRIX are trademarks of Digital
DECstation, Alpha AXP and ULTRIX are trademarks of Digital
Equipment Corp. PA-RISC and HP-UX are trademarks of
Equipment Corp. PA-RISC and HP-UX are trademarks of
Hewlett-Packard Co. OSF/1 is a trademark of the Open
Hewlett-Packard Co. OSF/1 is a trademark of the Open
Software Foundation.
Software Foundation.
</P
ara>
</p
ara>
</
S
ect1>
</
s
ect1>
<!-- 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:
-->
doc/src/sgml/libpq++.sgml
View file @
f3d2b2e0
...
@@ -2,41 +2,44 @@
...
@@ -2,41 +2,44 @@
<title>libpq C++ Binding</title>
<title>libpq C++ Binding</title>
<para>
<para>
<filename>libpq++</filename> is the C++ API to
<filename>libpq++</filename> is the C++ API to
<productname>Postgres</productname>.
<productname>Postgres</productname>.
<filename>libpq++</filename> is a set of classes which allow
<filename>libpq++</filename> is a set of classes which allow
client programs to connect to the
client programs to connect to the
<productname>Postgres</productname> backend server. These connections
<productname>Postgres</productname> backend server. These connections
come in two forms: a Database Class and a Large Object class.
come in two forms: a Database Class and a Large Object class.
</para>
</para>
<para>
<para>
The Database Class is intended for manipulating a database. You can
The Database Class is intended for manipulating a database. You can
send all sorts of SQL queries to the <productname>Postgres</productname>
send all sorts of SQL queries to the <productname>Postgres</productname>
backend server and retrieve the responses of the server.
backend server and retrieve the responses of the server.
</para>
</para>
<para>
<para>
The Large Object Class is intended for manipulating a large object
The Large Object Class is intended for manipulating a large object
in a database. Although a Large Object instance can send normal
in a database. Although a Large Object instance can send normal
queries to the <productname>Postgres</productname> backend server
queries to the <productname>Postgres</productname> backend server
it is only intended for simple
it is only intended for simple
queries that do not return any data. A large object should be seen
queries that do not return any data. A large object should be seen
as a file stream. In the future it should behave much like the C++ file
as a file stream. In the future it should behave much like the C++ file
streams
streams
<literal>cin</literal>,
<literal>cin</literal>,
<literal>cout</literal>
<literal>cout</literal>
and
and
<literal>cerr</literal>.
<literal>cerr</literal>.
</para>
</para>
<para>
<para>
This chapter is based on the documentation
This chapter is based on the documentation
for the <filename>libpq</filename> C library. Three
for the <filename>libpq</filename> C library. Three
short programs are listed at the end of this section as examples of
short programs are listed at the end of this section as examples of
<filename>libpq++</filename> programming
<filename>libpq++</filename> programming
(though not necessarily of good programming).
(though not necessarily of good programming).
There are several examples of <filename>libpq++</filename>
There are several examples of <filename>libpq++</filename>
applications in
applications in
<filename>src/libpq++/examples</filename>, including the source
<filename>src/libpq++/examples</filename>, including the source
code for the three examples in this chapter.
code for the three examples in this chapter.
</para>
</para>
<sect1>
<sect1>
...
@@ -44,713 +47,721 @@
...
@@ -44,713 +47,721 @@
<sect2>
<sect2>
<title>Environment Variables</title>
<title>Environment Variables</title>
<para>
<para>
The following environment variables can be used to set up default
The following environment variables can be used to set up default
values for an environment and to avoid hard-coding database names into
values for an environment and to avoid hard-coding database names into
an application program:
an application program:
<note>
<note>
<para>
<para>
Refer to the <xref endterm="libpq" linkend="libpq-envars"> for a complete
Refer to the <xref endterm="libpq" linkend="libpq-envars"> for a complete
list of available connection options.
list of available connection options.
</para>
</para>
</note>
</note>
</para>
</para>
<para>
<para>
The following environment variables can be used to select default
The following environment variables can be used to select default
connection parameter values, which will be used by PQconnectdb or
connection parameter values, which will be used by PQconnectdb or
PQsetdbLogin if no value is directly specified by the calling code.
PQsetdbLogin if no value is directly specified by the calling code.
These are useful to avoid hard-coding database names into simple
These are useful to avoid hard-coding database names into simple
application programs.
application programs.
<note>
<note>
<para>
<para>
<filename>libpq++</filename> uses only environment variables or PQconnectdb
<filename>libpq++</filename> uses only environment variables or PQconnectdb
conninfo style strings.
conninfo style strings.
</para>
</para>
</note>
</note>
<itemizedlist>
<listitem>
<para>
<envar>PGHOST</envar> sets the default server name.
If a non-zero-length string is specified, TCP/IP communication is used.
Without a host name, libpq will connect using a local Unix domain socket.
</para>
</listitem>
<listitem>
<para>
<envar>PGPORT</envar> sets the default port or local Unix domain socket
file extension for communicating with the <productname>Postgres</productname>
backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGDATABASE</envar> sets the default
<productname>Postgres</productname> database name.
</para>
</listitem>
<listitem>
<para>
<envar>PGUSER</envar>
sets the username used to connect to the database and for authentication.
</para>
</listitem>
<listitem>
<para>
<envar>PGPASSWORD</envar>
sets the password used if the backend demands password authentication.
</para>
</listitem>
<listitem>
<para>
<envar>PGREALM</envar> sets the Kerberos realm to use with
<productname>Postgres</productname>,
if it is different from the local realm. If
<envar>PGREALM</envar> is set, <productname>Postgres</productname>
applications will attempt
authentication with servers for this realm and use
separate ticket files to avoid conflicts with local
ticket files. This environment variable is only
used if Kerberos authentication is selected by the backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGOPTIONS</envar> sets additional runtime options for
the <productname>Postgres</productname> backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGTTY</envar> sets the file or tty on which debugging
messages from the backend server are displayed.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The following environment variables can be used to specify user-level default
behavior for every Postgres session:
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
<envar>PGDATESTYLE</envar>
<envar>PGHOST</envar> sets the default server name.
sets the default style of date/time representation.
If a non-zero-length string is specified, TCP/IP communication is used.
</para>
Without a host name, libpq will connect using a local Unix domain socket.
</listitem>
</para>
<listitem>
</listitem>
<para>
<listitem>
<envar>PGTZ</envar>
<para>
sets the default time zone.
<envar>PGPORT</envar> sets the default port or local Unix domain socket
</para>
file extension for communicating with the <productname>Postgres</productname>
</listitem>
backend.
</itemizedlist>
</para>
</para>
</listitem>
<listitem>
<para>
<envar>PGDATABASE</envar> sets the default
<productname>Postgres</productname> database name.
</para>
</listitem>
<listitem>
<para>
<envar>PGUSER</envar>
sets the username used to connect to the database and for authentication.
</para>
</listitem>
<listitem>
<para>
<envar>PGPASSWORD</envar>
sets the password used if the backend demands password authentication.
</para>
</listitem>
<listitem>
<para>
<envar>PGREALM</envar> sets the Kerberos realm to use with
<productname>Postgres</productname>,
if it is different from the local realm. If
<envar>PGREALM</envar> is set, <productname>Postgres</productname>
applications will attempt
authentication with servers for this realm and use
separate ticket files to avoid conflicts with local
ticket files. This environment variable is only
used if Kerberos authentication is selected by the backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGOPTIONS</envar> sets additional runtime options for
the <productname>Postgres</productname> backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGTTY</envar> sets the file or tty on which debugging
messages from the backend server are displayed.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<para>
The following environment variables can be used to specify default internal
The following environment variables can be used to specify user-level default
behavior for every Postgres session:
behavior for every Postgres session:
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
<envar>PGGEQO</envar>
<envar>PGDATESTYLE</envar>
sets the default mode for the genetic optimizer.
sets the default style of date/time representation.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
<envar>PGRPLANS</envar>
<envar>PGTZ</envar>
sets the default mode to allow or disable right-sided plans in the optimizer.
sets the default time zone.
</para>
</para>
</listitem>
</listitem>
<listitem>
</itemizedlist>
<para>
</para>
<envar>PGCOSTHEAP</envar>
sets the default cost for heap searches for the optimizer.
<para>
</para>
The following environment variables can be used to specify default internal
</listitem>
behavior for every Postgres session:
<listitem>
<para>
<itemizedlist>
<envar>PGCOSTINDEX</envar>
<listitem>
sets the default cost for indexed searches for the optimizer.
<para>
</para>
<envar>PGGEQO</envar>
</listitem>
sets the default mode for the genetic optimizer.
<listitem>
</para>
<para>
</listitem>
<envar>PGQUERY_LIMIT</envar>
<listitem>
sets the maximum number of rows returned by a query.
<para>
</para>
<envar>PGRPLANS</envar>
</listitem>
sets the default mode to allow or disable right-sided plans in the optimizer.
</itemizedlist>
</para>
</para>
</listitem>
<listitem>
<para>
<envar>PGCOSTHEAP</envar>
sets the default cost for heap searches for the optimizer.
</para>
</listitem>
<listitem>
<para>
<envar>PGCOSTINDEX</envar>
sets the default cost for indexed searches for the optimizer.
</para>
</listitem>
<listitem>
<para>
<envar>PGQUERY_LIMIT</envar>
sets the maximum number of rows returned by a query.
</para>
</listitem>
</itemizedlist>
</para>
<para>
<para>
Refer to the <command>SET</command> <acronym>SQL</acronym> command
Refer to the <command>SET</command> <acronym>SQL</acronym> command
for information on correct values for these environment variables.
for information on correct values for these environment variables.
</para>
</para>
</sect2>
</sect2>
</sect1>
<sect1>
<title>libpq++ Classes</title>
<para></para>
<sect2>
<title>Connection Class: <classname>PgConnection</classname></title>
<para>
The connection class makes the actual connection to the database and is inherited
by all of the access classes.
</para>
</sect2>
<sect2>
<title>Database Class: <classname>PgDatabase</classname></title>
<para>
The database class provides C++ objects that have a connection
to a backend server. To create such an object one first needs
the apropriate environment for the backend to access.
The following constructors deal with making a connection to a backend
server from a C++ program.
</para>
</sect2>
</sect1>
</sect1>
<sect1>
<sect1>
<title>Database Connection Functions</title>
<title>libpq++ Classes</title>
<sect2>
<title>Connection Class: <classname>PgConnection</classname></title>
<para>
<para>
<itemizedlist>
The connection class makes the actual connection to the database and is inherited
<listitem>
by all of the access classes.
<para>
<function>PgConnection</function>
makes a new connection to a backend database server.
<synopsis>
PgConnection::PgConnection(const char *conninfo)
</synopsis>
Although typically called from one of the access classes, a connection to
a backend server is possible by creating a PgConnection object.
</para>
</listitem>
<listitem>
<para>
<function>ConnectionBad</function>
returns whether or not the connection to the backend server succeeded or
failed.
<synopsis>
int PgConnection::ConnectionBad()
</synopsis>
Returns TRUE if the connection failed.
</para>
</listitem>
<listitem>
<para>
<function>Status</function>
returns the status of the connection to the backend server.
<synopsis>
ConnStatusType PgConnection::Status()
</synopsis>
Returns either CONNECTION_OK or CONNECTION_BAD depending on the state
of the connection.
</para>
</listitem>
<listitem>
<para>
<function>PgDatabase</function>
makes a new connection to a backend database server.
<synopsis>
PgDatabase(const char *conninfo)
</synopsis>
After a PgDatabase has been created it should be checked to make sure
the connection to the database succeded before sending
queries to the object. This can easily be done by
retrieving the current status of the PgDatabase object with the
<function>Status</function> or <function>ConnectionBad</function> methods.
</para>
</listitem>
<listitem>
<para>
<function>DBName</function>
Returns the name of the current database.
<synopsis>
const char *PgConnection::DBName()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>Notifies</function>
Returns the next notification from a list of unhandled notification messages
received from the backend.
<synopsis>
PGnotify* PgConnection::Notifies()
</synopsis>
See PQnotifies() for details.
</para>
</listitem>
</itemizedlist>
</para>
</para>
</sect2>
<sect2>
<title>Database Class: <classname>PgDatabase</classname></title>
<para>
The database class provides C++ objects that have a connection
to a backend server. To create such an object one first needs
the apropriate environment for the backend to access.
The following constructors deal with making a connection to a backend
server from a C++ program.
</para>
</sect2>
</sect1>
</sect1>
<sect1>
<sect1>
<title>Query Execution Functions</title>
<title>Database Connection Functions</title>
<para>
<para>
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
<function>Exec</function>
<function>PgConnection</function>
Sends a query to the backend server. It's probably more desirable to
makes a new connection to a backend database server.
use one of the next two functions.
<synopsis>
<synopsis>
PgConnection::PgConnection(const char *conninfo)
ExecStatusType PgConnection::Exec(const char* query)
</synopsis>
</synopsis>
Although typically called from one of the access classes, a connection to
Returns the result of the query. The following status results can be expected:
a backend server is possible by creating a PgConnection object.
</para>
<simplelist>
</listitem>
<member>
<listitem>
PGRES_EMPTY_QUERY
<para>
</member>
<function>ConnectionBad</function>
<member>
returns whether or not the connection to the backend server succeeded or
PGRES_COMMAND_OK, if the query was a command
failed.
</member>
<synopsis>
<member>
int PgConnection::ConnectionBad()
PGRES_TUPLES_OK, if the query successfully returned tuples
</synopsis>
</member>
Returns TRUE if the connection failed.
<member>
</para>
PGRES_COPY_OUT
</listitem>
</member>
<listitem>
<member>
<para>
PGRES_COPY_IN
<function>Status</function>
</member>
returns the status of the connection to the backend server.
<member>
<synopsis>
PGRES_BAD_RESPONSE, if an unexpected response was received
ConnStatusType PgConnection::Status()
</member>
</synopsis>
<member>
Returns either CONNECTION_OK or CONNECTION_BAD depending on the state
PGRES_NONFATAL_ERROR
of the connection.
</member>
</para>
<member>
</listitem>
PGRES_FATAL_ERROR
<listitem>
</member>
<para>
</simplelist>
<function>PgDatabase</function>
</para>
makes a new connection to a backend database server.
</listitem>
<synopsis>
<listitem>
PgDatabase(const char *conninfo)
<para>
</synopsis>
<function>ExecCommandOk</function>
After a PgDatabase has been created it should be checked to make sure
Sends a command query to the backend server.
the connection to the database succeded before sending
<synopsis>
queries to the object. This can easily be done by
int PgConnection::ExecCommandOk(const char *query)
retrieving the current status of the PgDatabase object with the
</synopsis>
<function>Status</function> or <function>ConnectionBad</function> methods.
Returns TRUE if the command query succeeds.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
<function>DBName</function>
<function>ExecTuplesOk</function>
Returns the name of the current database.
Sends a command query to the backend server.
<synopsis>
<synopsis>
const char *PgConnection::DBName()
int PgConnection::ExecTuplesOk(const char *query)
</synopsis>
</synopsis>
</para>
Returns TRUE if the command query succeeds and there are tuples to be retrieved.
</listitem>
</para>
<listitem>
</listitem>
<para>
<listitem>
<function>Notifies</function>
<para>
Returns the next notification from a list of unhandled notification messages
<function>ErrorMessage</function>
received from the backend.
Returns the last error message text.
<synopsis>
<synopsis>
PGnotify* PgConnection::Notifies()
const char *PgConnection::ErrorMessage()
</synopsis>
</synopsis>
See PQnotifies() for details.
</para>
</para>
</listitem>
</listitem>
<listitem>
</itemizedlist>
<para>
</para>
<function>Tuples</function>
Returns the number of tuples (instances) in the query result.
<synopsis>
int PgDatabase::Tuples()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>Fields</function>
Returns the number of fields (attributes) in each tuple of the query result.
<synopsis>
int PgDatabase::Fields()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldName</function>
Returns the field (attribute) name associated with the given field index.
Field indices start at 0.
<synopsis>
const char *PgDatabase::FieldName(int field_num)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldNum</function>
PQfnumber Returns the field (attribute) index associated with
the given field name.
<synopsis>
int PgDatabase::FieldNum(const char* field_name)
</synopsis>
-1 is returned if the given name does not match any field.
</para>
</listitem>
<listitem>
<para>
<function>FieldType</function>
Returns the field type associated with the given field index. The
integer returned is an internal coding of the type. Field indices
start at 0.
<synopsis>
Oid PgDatabase::FieldType(int field_num)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldType</function>
Returns the field type associated with the given field name. The
integer returned is an internal coding of the type. Field indices
start at 0.
<synopsis>
Oid PgDatabase::FieldType(const char* field_name)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldSize</function>
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
short PgDatabase::FieldSize(int field_num)
</synopsis>
Returns the space allocated for this field in a database tuple given
the field number. In other words the size of the server's binary
representation of the data type. -1 is returned if the field is
variable size.
</para>
</listitem>
<listitem>
<para>
<function>FieldSize</function>
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
short PgDatabase::FieldSize(const char *field_name)
</synopsis>
Returns the space allocated for this field in a database tuple given
the field name. In other words the size of the server's binary
representation of the data type. -1 is returned if the field is
variable size.
</para>
</listitem>
<listitem>
<para>
<function>GetValue</function>
Returns a single field (attribute) value of one tuple of a PGresult.
Tuple and field indices start at 0.
<synopsis>
const char *PgDatabase::GetValue(int tup_num, int field_num)
</synopsis>
For most queries, the value returned by GetValue is a null-terminated
ASCII string representation of the attribute value. But if BinaryTuples()
is TRUE, the value returned by GetValue is the binary representation
of the type in the internal format of the backend server (but not including
the size word, if the field is variable-length). It is then the programmer's
responsibility to cast and convert the data to the correct C type. The
pointer returned by GetValue points to storage that is part of the
PGresult structure. One should not modify it, and one must explicitly
copy the value into other storage if it is to be used past the lifetime
of the PGresult structure itself. BinaryTuples() is not yet implemented.
</para>
</listitem>
<listitem>
<para>
<function>GetValue</function>
Returns a single field (attribute) value of one tuple of a PGresult.
Tuple and field indices start at 0.
<synopsis>
const char *PgDatabase::GetValue(int tup_num, const char *field_name)
</synopsis>
For most queries, the value returned by GetValue is a null-terminated
ASCII string representation of the attribute value. But if BinaryTuples()
is TRUE, the value returned by GetValue is the binary representation
of the type in the internal format of the backend server (but not including
the size word, if the field is variable-length). It is then the programmer's
responsibility to cast and convert the data to the correct C type. The
pointer returned by GetValue points to storage that is part of the
PGresult structure. One should not modify it, and one must explicitly
copy the value into other storage if it is to be used past the lifetime
of the PGresult structure itself. BinaryTuples() is not yet implemented.
</para>
</listitem>
<listitem>
<para>
<function>GetLength</function>
Returns the length of a field (attribute) in bytes. Tuple and field
indices start at 0.
<synopsis>
int PgDatabase::GetLength(int tup_num, int field_num)
</synopsis>
This is the actual data length for the particular data value, that
is the size of the object pointed to by GetValue. Note that for
ASCII-represented values, this size has little to do with the binary
size reported by PQfsize.
</para>
</listitem>
<listitem>
<para>
<function>GetLength</function>
Returns the length of a field (attribute) in bytes. Tuple and field
indices start at 0.
<synopsis>
int PgDatabase::GetLength(int tup_num, const char* field_name)
</synopsis>
This is the actual data length for the particular data value, that
is the size of the object pointed to by GetValue. Note that for
ASCII-represented values, this size has little to do with the binary
size reported by PQfsize.
</para>
</listitem>
<listitem>
<para>
<function>DisplayTuples</function>
Prints out all the tuples and, optionally, the attribute names to the
specified output stream.
<synopsis>
void PgDatabase::DisplayTuples(FILE *out = 0, int fillAlign = 1,
const char* fieldSep = "|",int printHeader = 1, int quiet = 0)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>PrintTuples</function>
Prints out all the tuples and, optionally, the attribute names to the
specified output stream.
<synopsis>
void PgDatabase::PrintTuples(FILE *out = 0, int printAttName = 1,
int terseOutput = 0, int width = 0)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>GetLine</function>
<synopsis>
int PgDatabase::GetLine(char* string, int length)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>PutLine</function>
<synopsis>
void PgDatabase::PutLine(const char* string)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>OidStatus</function>
<synopsis>
const char *PgDatabase::OidStatus()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>EndCopy</function>
<synopsis>
int PgDatabase::EndCopy()
</synopsis>
</para>
</listitem>
</itemizedlist>
</para>
</sect1>
</sect1>
<sect1>
<sect1>
<title>Asynchronous Notification</title>
<title>Query Execution Functions</title>
<para>
<itemizedlist>
<listitem>
<para>
<function>Exec</function>
Sends a query to the backend server. It's probably more desirable to
use one of the next two functions.
<synopsis>
ExecStatusType PgConnection::Exec(const char* query)
</synopsis>
Returns the result of the query. The following status results can be expected:
<simplelist>
<member>
PGRES_EMPTY_QUERY
</member>
<member>
PGRES_COMMAND_OK, if the query was a command
</member>
<member>
PGRES_TUPLES_OK, if the query successfully returned tuples
</member>
<member>
PGRES_COPY_OUT
</member>
<member>
PGRES_COPY_IN
</member>
<member>
PGRES_BAD_RESPONSE, if an unexpected response was received
</member>
<member>
PGRES_NONFATAL_ERROR
</member>
<member>
PGRES_FATAL_ERROR
</member>
</simplelist>
</para>
</listitem>
<listitem>
<para>
<function>ExecCommandOk</function>
Sends a command query to the backend server.
<synopsis>
int PgConnection::ExecCommandOk(const char *query)
</synopsis>
Returns TRUE if the command query succeeds.
</para>
</listitem>
<listitem>
<para>
<function>ExecTuplesOk</function>
Sends a command query to the backend server.
<synopsis>
int PgConnection::ExecTuplesOk(const char *query)
</synopsis>
Returns TRUE if the command query succeeds and there are tuples to be retrieved.
</para>
</listitem>
<listitem>
<para>
<function>ErrorMessage</function>
Returns the last error message text.
<synopsis>
const char *PgConnection::ErrorMessage()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>Tuples</function>
Returns the number of tuples (instances) in the query result.
<synopsis>
int PgDatabase::Tuples()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>Fields</function>
Returns the number of fields (attributes) in each tuple of the query result.
<synopsis>
int PgDatabase::Fields()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldName</function>
Returns the field (attribute) name associated with the given field index.
Field indices start at 0.
<synopsis>
const char *PgDatabase::FieldName(int field_num)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldNum</function>
PQfnumber Returns the field (attribute) index associated with
the given field name.
<synopsis>
int PgDatabase::FieldNum(const char* field_name)
</synopsis>
-1 is returned if the given name does not match any field.
</para>
</listitem>
<listitem>
<para>
<function>FieldType</function>
Returns the field type associated with the given field index. The
integer returned is an internal coding of the type. Field indices
start at 0.
<synopsis>
Oid PgDatabase::FieldType(int field_num)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldType</function>
Returns the field type associated with the given field name. The
integer returned is an internal coding of the type. Field indices
start at 0.
<synopsis>
Oid PgDatabase::FieldType(const char* field_name)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>FieldSize</function>
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
short PgDatabase::FieldSize(int field_num)
</synopsis>
Returns the space allocated for this field in a database tuple given
the field number. In other words the size of the server's binary
representation of the data type. -1 is returned if the field is
variable size.
</para>
</listitem>
<listitem>
<para>
<function>FieldSize</function>
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
short PgDatabase::FieldSize(const char *field_name)
</synopsis>
Returns the space allocated for this field in a database tuple given
the field name. In other words the size of the server's binary
representation of the data type. -1 is returned if the field is
variable size.
</para>
</listitem>
<listitem>
<para>
<function>GetValue</function>
Returns a single field (attribute) value of one tuple of a PGresult.
Tuple and field indices start at 0.
<synopsis>
const char *PgDatabase::GetValue(int tup_num, int field_num)
</synopsis>
For most queries, the value returned by GetValue is a null-terminated
ASCII string representation of the attribute value. But if BinaryTuples()
is TRUE, the value returned by GetValue is the binary representation
of the type in the internal format of the backend server (but not including
the size word, if the field is variable-length). It is then the programmer's
responsibility to cast and convert the data to the correct C type. The
pointer returned by GetValue points to storage that is part of the
PGresult structure. One should not modify it, and one must explicitly
copy the value into other storage if it is to be used past the lifetime
of the PGresult structure itself. BinaryTuples() is not yet implemented.
</para>
</listitem>
<listitem>
<para>
<function>GetValue</function>
Returns a single field (attribute) value of one tuple of a PGresult.
Tuple and field indices start at 0.
<synopsis>
const char *PgDatabase::GetValue(int tup_num, const char *field_name)
</synopsis>
For most queries, the value returned by GetValue is a null-terminated
ASCII string representation of the attribute value. But if BinaryTuples()
is TRUE, the value returned by GetValue is the binary representation
of the type in the internal format of the backend server (but not including
the size word, if the field is variable-length). It is then the programmer's
responsibility to cast and convert the data to the correct C type. The
pointer returned by GetValue points to storage that is part of the
PGresult structure. One should not modify it, and one must explicitly
copy the value into other storage if it is to be used past the lifetime
of the PGresult structure itself. BinaryTuples() is not yet implemented.
</para>
</listitem>
<listitem>
<para>
<function>GetLength</function>
Returns the length of a field (attribute) in bytes. Tuple and field
indices start at 0.
<synopsis>
int PgDatabase::GetLength(int tup_num, int field_num)
</synopsis>
This is the actual data length for the particular data value, that
is the size of the object pointed to by GetValue. Note that for
ASCII-represented values, this size has little to do with the binary
size reported by PQfsize.
</para>
</listitem>
<listitem>
<para>
<function>GetLength</function>
Returns the length of a field (attribute) in bytes. Tuple and field
indices start at 0.
<synopsis>
int PgDatabase::GetLength(int tup_num, const char* field_name)
</synopsis>
This is the actual data length for the particular data value, that
is the size of the object pointed to by GetValue. Note that for
ASCII-represented values, this size has little to do with the binary
size reported by PQfsize.
</para>
</listitem>
<listitem>
<para>
<function>DisplayTuples</function>
Prints out all the tuples and, optionally, the attribute names to the
specified output stream.
<synopsis>
void PgDatabase::DisplayTuples(FILE *out = 0, int fillAlign = 1,
const char* fieldSep = "|",int printHeader = 1, int quiet = 0)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>PrintTuples</function>
Prints out all the tuples and, optionally, the attribute names to the
specified output stream.
<synopsis>
void PgDatabase::PrintTuples(FILE *out = 0, int printAttName = 1,
int terseOutput = 0, int width = 0)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>GetLine</function>
<synopsis>
int PgDatabase::GetLine(char* string, int length)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>PutLine</function>
<synopsis>
void PgDatabase::PutLine(const char* string)
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>OidStatus</function>
<synopsis>
const char *PgDatabase::OidStatus()
</synopsis>
</para>
</listitem>
<listitem>
<para>
<function>EndCopy</function>
<synopsis>
int PgDatabase::EndCopy()
</synopsis>
</para>
</listitem>
</itemizedlist>
</para>
</sect1>
<sect1>
<title>Asynchronous Notification</title>
<para>
<para>
<productname>Postgres</productname> supports asynchronous notification
<productname>Postgres</productname> supports asynchronous notification
via the <command>LISTEN</command> and <command>NOTIFY</command>
via the <command>LISTEN</command> and <command>NOTIFY</command>
commands. A backend registers its interest in a particular semaphore
commands. A backend registers its interest in a particular semaphore
with the <command>LISTEN</command> command.
with the <command>LISTEN</command> command.
All backends that are listening on a
All backends that are listening on a
particular named semaphore will be notified asynchronously when
particular named semaphore will be notified asynchronously when
a <command>NOTIFY</command> of
a <command>NOTIFY</command> of
that name is executed by another backend. No additional
that name is executed by another backend. No additional
information is passed from the notifier to the listener. Thus,
information is passed from the notifier to the listener. Thus,
typically, any actual data that needs to be communicated is transferred
typically, any actual data that needs to be communicated is transferred
through the relation.
through the relation.
<note>
<note>
<para>
<para>
In the past, the documentation has associated the names used for asyncronous
In the past, the documentation has associated the names used for asyncronous
notification with relations or classes. However, there is in fact no
notification with relations or classes. However, there is in fact no
direct linkage of the two concepts in the implementation, and the
direct linkage of the two concepts in the implementation, and the
named semaphore in fact does not need to have a corresponding relation
named semaphore in fact does not need to have a corresponding relation
previously defined.
previously defined.
</para>
</para>
</note>
</note>
</para>
</para>
<para>
<para>
<filename>libpq++</filename> applications are notified whenever a
<filename>libpq++</filename> applications are notified whenever a
connected backend has
connected backend has
received an asynchronous notification. However, the communication from
received an asynchronous notification. However, the communication from
the backend to the frontend is not asynchronous.
the backend to the frontend is not asynchronous.
The <filename>libpq++</filename> application
The <filename>libpq++</filename> application
must poll the backend to see if there is any pending notification
must poll the backend to see if there is any pending notification
information. After the execution of a query, a frontend may call
information. After the execution of a query, a frontend may call
<function>PgDatabase::Notifies</function>
<function>PgDatabase::Notifies</function>
to see if any notification data is currently available from the backend.
to see if any notification data is currently available from the backend.
<function>PgDatabase::Notifies</function>
<function>PgDatabase::Notifies</function>
returns the notification from a list of unhandled notifications from the
returns the notification from a list of unhandled notifications from the
backend. The function eturns NULL if there is no pending notifications from the
backend. The function eturns NULL if there is no pending notifications from the
backend.
backend.
<function>PgDatabase::Notifies</function>
<function>PgDatabase::Notifies</function>
behaves like the popping of a stack. Once a notification is returned
behaves like the popping of a stack. Once a notification is returned
from <function>PgDatabase::Notifies</function>,
from <function>PgDatabase::Notifies</function>,
it is considered handled and will be removed from the list of
it is considered handled and will be removed from the list of
notifications.
notifications.
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
<function>PgDatabase::Notifies</function>
<function>PgDatabase::Notifies</function>
retrieves pending notifications from the server.
retrieves pending notifications from the server.
<synopsis>
<synopsis>
PGnotify* PgDatabase::Notifies()
PGnotify* PgDatabase::Notifies()
</synopsis>
</synopsis>
</para>
</para>
</listitem>
</listitem>
</itemizedlist>
</itemizedlist>
</para>
</para>
<para>
<para>
The second sample program gives an example of the use of asynchronous
The second sample program gives an example of the use of asynchronous
notification.
notification.
</para>
</para>
</sect1>
</sect1>
<sect1>
<sect1>
<title>Functions Associated with the COPY Command</title>
<title>Functions Associated with the COPY Command</title>
<para>
The <command>copy</command> command in <productname>Postgres</productname>
has options to read from or write to the network
connection used by <filename>libpq++</filename>.
Therefore, functions are necessary to
access this network connection directly so applications may take full
advantage of this capability.
<para>
<itemizedlist>
The <command>copy</command> command in <productname>Postgres</productname>
<listitem>
has options to read from or write to the network
<para>
connection used by <filename>libpq++</filename>.
<function>PgDatabase::GetLine</function>
Therefore, functions are necessary to
reads a newline-terminated line of characters (transmitted by the
access this network connection directly so applications may take full
backend server) into a buffer
advantage of this capability.
<replaceable class="parameter">string</replaceable>
of size <replaceable class="parameter">length</replaceable>.
<itemizedlist>
<synopsis>
<listitem>
int PgDatabase::GetLine(char* string, int length)
<para>
</synopsis>
<function>PgDatabase::GetLine</function>
</para>
reads a newline-terminated line of characters (transmitted by the
<para>
backend server) into a buffer
Like the Unix system routine
<replaceable class="parameter">string</replaceable>
<function>fgets (3)</function>,
of size <replaceable class="parameter">length</replaceable>.
this routine copies up to
<synopsis>
<literal><replaceable class="parameter">length</replaceable>-1</literal>
int PgDatabase::GetLine(char* string, int length)
characters into
</synopsis>
<replaceable class="parameter">string</replaceable>.
</para>
It is like
<para>
<function>gets (3)</function>,
Like the Unix system routine
however, in that it converts the terminating newline into a null
<function>fgets (3)</function>,
character.
this routine copies up to
</para>
<literal><replaceable class="parameter">length</replaceable>-1</literal>
<para>
characters into
<function>PgDatabase::GetLine</function>
<replaceable class="parameter">string</replaceable>.
returns EOF at end of file, 0 if the entire line has been read, and 1 if the
It is like
buffer is full but the terminating newline has not yet been read.
<function>gets (3)</function>,
</para>
however, in that it converts the terminating newline into a null
<para>
character.
Notice that the application must check to see if a new line consists
</para>
of a single period ("."), which indicates that the backend
<para>
server has finished sending the results of the
<function>PgDatabase::GetLine</function>
<command>copy</command>.
returns EOF at end of file, 0 if the entire line has been read, and 1 if the
Therefore, if the application ever expects to receive lines
buffer is full but the terminating newline has not yet been read.
that are more than
</para>
<literal><replaceable class="parameter">length</replaceable>-1</literal>
<para>
characters long, the application must be sure to check the return
Notice that the application must check to see if a new line consists
value of <function>PgDatabase::GetLine</function> very carefully.
of a single period ("."), which indicates that the backend
</para>
server has finished sending the results of the
</listitem>
<command>copy</command>.
<listitem>
Therefore, if the application ever expects to receive lines
<para>
that are more than
<function>PgDatabase::PutLine</function>
<literal><replaceable class="parameter">length</replaceable>-1</literal>
Sends a null-terminated <replaceable class="parameter">string</replaceable>
characters long, the application must be sure to check the return
to the backend server.
value of <function>PgDatabase::GetLine</function> very carefully.
<synopsis>
</para>
void PgDatabase::PutLine(char* string)
</listitem>
</synopsis>
<listitem>
</para>
<para>
<para>
<function>PgDatabase::PutLine</function>
The application must explicitly send a single period character (".")
Sends a null-terminated <replaceable class="parameter">string</replaceable>
to indicate to the backend that it has finished sending its data.
to the backend server.
</para>
<synopsis>
</listitem>
void PgDatabase::PutLine(char* string)
<listitem>
</synopsis>
<para>
</para>
<function>PgDatabase::EndCopy</function>
<para>
syncs with the backend.
The application must explicitly send a single period character (".")
<synopsis>
to indicate to the backend that it has finished sending its data.
int PgDatabase::EndCopy()
</para>
</synopsis>
</listitem>
This function waits until the backend has
<listitem>
finished processing the <command>copy</command>.
<para>
It should either be issued when the
<function>PgDatabase::EndCopy</function>
last string has been sent to the backend using
syncs with the backend.
<function>PgDatabase::PutLine</function>
<synopsis>
or when the last string has been received from the backend using
int PgDatabase::EndCopy()
<function>PgDatabase::GetLine</function>.
</synopsis>
It must be issued or the backend may get <quote>out of sync</quote> with
This function waits until the backend has
the frontend. Upon return from this function, the backend is ready to
finished processing the <command>copy</command>.
receive the next query.
It should either be issued when the
</para>
last string has been sent to the backend using
<para>
<function>PgDatabase::PutLine</function>
The return value is 0 on successful completion, nonzero otherwise.
or when the last string has been received from the backend using
</para>
<function>PgDatabase::GetLine</function>.
</listitem>
It must be issued or the backend may get <quote>out of sync</quote> with
</itemizedlist>
the frontend. Upon return from this function, the backend is ready to
</para>
receive the next query.
<para>
</para>
As an example:
<para>
The return value is 0 on successful completion, nonzero otherwise.
<programlisting>
</para>
</listitem>
</itemizedlist>
</para>
<para>
As an example:
<programlisting>
PgDatabase data;
PgDatabase data;
data.exec("create table foo (a int4, b char16, d float8)");
data.exec("create table foo (a int4, b char16, d float8)");
data.exec("copy foo from stdin");
data.exec("copy foo from stdin");
data.putline("3\etHello World\et4.5\en");
data.putline("3\etHello World\et4.5\en");
data.putline("4\etGoodbye World\et7.11\en");
data.putline("4\etGoodbye World\et7.11\en");
\&
...
&
...
data.putline(".\en");
data.putline(".\en");
data.endcopy();
data.endcopy();
</programlisting>
</programlisting>
</para>
</para>
</sect1>
</sect1>
<sect1>
<sect1>
<title>Caveats</title>
<title>Caveats</title>
<para>
<para>
The query buffer is 8192 bytes long, and queries over that length will
The query buffer is 8192 bytes long, and queries over that length will
be silently truncated.
be silently truncated.
</para>
</para>
</sect1>
</sect1>
</chapter>
</chapter>
...
...
doc/src/sgml/odbc.sgml
View file @
f3d2b2e0
...
@@ -1047,394 +1047,6 @@ database login and password to the standard Applix startup
...
@@ -1047,394 +1047,6 @@ database login and password to the standard Applix startup
macro file. This is an example
macro file. This is an example
<filename>~/axhome/macros/login.am</filename> file:
<filename>~/axhome/macros/login.am</filename> file:
=======
<productname>ApplixWare</productname> must be configured correctly
in order for it to
be able to access the <productname>Postgres</productname>
<acronym>ODBC</acronym> software drivers.
</para>
<procedure>
<title>Enabling ApplixWare Database Access</title>
<para>
Note that
these instructions are for the 4.4.1 release of
<productname>ApplixWare</productname> on <productname>Linux</productname>.
Refer to the <citetitle>Linux Sys Admin</citetitle> on-line book
for more detailed information.
</para>
<step performance="required">
<para>
You must modify <filename>axnet.cnf</filename> so that
<filename>elfodbc</filename> can
find <filename>libodbc.so</filename>
(the <acronym>ODBC</acronym> driver manager) shared library.
This library is included with the ApplixWare distribution,
but <filename>axnet.cnf</filename> needs to be modified to point to the
correct location.
</para>
<para>
As root, edit the file
<filename><replaceable>applixroot</replaceable>/applix/axdata/axnet.cnf</filename>.
</para>
<substeps>
<step performance="required">
<para>
At the bottom of <filename>axnet.cnf</filename>,
find the line that starts with
<programlisting>
#libFor elfodbc /ax/<replaceable>...</replaceable>
</programlisting>
</para>
</step>
<step performance="required">
<para>
Change line to read
<programlisting>
libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
</programlisting>
which will tell elfodbc to look in this directory
for the <acronym>ODBC</acronym> support library.
If you have installed applix somewhere else,
change the path accordingly.
</para>
</step>
</substeps>
</step>
<step performance="required">
<para>
Create <filename>.odbc.ini</filename> as
described above. You may also want to add the flag
<programlisting>
TextAsLongVarchar=0
</programlisting>
to the database-specific portion of <filename>.odbc.ini</filename>
so that text fields will not be shown as <literal>**BLOB**</literal>.
</para>
</step>
</procedure>
<procedure>
<title>Testing ApplixWare ODBC Connections</title>
<step performance="required">
<para>
Bring up <application>Applix Data</application>
</para>
</step>
<step performance="required">
<para>
Select the <productname>Postgres</productname> database of interest.
</para>
<substeps>
<step performance="required">
<para>
Select <command>Query->Choose Server</command>.
</para>
</step>
<step performance="required">
<para>
Select <acronym>ODBC</acronym>, and click <command>Browse</command>.
The database you configured in <filename>.odbc.ini</filename>
should be shown. Make sure that the <option>Host: field</option>
is empty (if it is not, axnet will try to contact axnet on another machine
to look for the database).
</para>
</step>
<step performance="required">
<para>
Select the database in the box that was launched by <command>Browse</command>,
then click <command>OK</command>.
</para>
</step>
<step performance="required">
<para>
Enter username and password in the login identification dialog,
and click <command>OK</command>.
</para>
</step>
</substeps>
<para>
You should see <quote>Starting elfodbc server</quote>
in the lower left corner of the
data window. If you get an error dialog box, see the debugging section
below.
</para>
</step>
<step performance="required">
<para>
The 'Ready' message will appear in the lower left corner of the data
window. This indicates that you can now enter queries.
</para>
</step>
<step performance="required">
<para>
Select a table from Query->Choose tables, and then select Query->Query
to access the database. The first 50 or so rows from the table should
appear.
</para>
</step>
</procedure>
</sect2>
<sect2>
<title>Common Problems</title>
<para>
The following messages can appear while trying to make an
<acronym>ODBC</acronym> connection through
<productname>Applix Data</productname>:
<variablelist>
<varlistentry>
<term>
Cannot launch gateway on server
</term>
<listitem>
<para>
<literal>elfodbc</literal> can't find <filename>libodbc.so</filename>.
Check your <filename>axnet.cnf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Error from ODBC Gateway:
IM003::[iODBC][Driver Manager]Specified driver could not be loaded
</term>
<listitem>
<para>
<filename>libodbc.so</filename> cannot find the driver listed in
<filename>.odbc.ini</filename>. Verify the settings.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Server: Broken Pipe
</term>
<listitem>
<para>
The driver process has terminated due to some other
problem. You might not have an up-to-date version
of the <productname>Postgres</productname>
<acronym>ODBC</acronym> package.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
<sect2>
<title>Debugging ApplixWare ODBC Connections</title>
<para>
One good tool for debugging connection problems uses the Unix system
utility <application>strace</application>.
</para>
<procedure>
<title>Debugging with strace</title>
<step performance="required">
<para>
Start applixware.
</para>
</step>
<step performance="required">
<para>
Start an <application>strace</application> on
the axnet process. For example, if
<programlisting>
ps -aucx | grep ax
</programlisting>
shows
<programlisting>
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
</programlisting>
</para>
<para>
Then run
<programlisting>
strace -f -s 1024 -p 10432
</programlisting>
</para>
</step>
<step performance="required">
<para>
Check the strace output.
</para>
<note>
<title>Note from Cary</title>
<para>
Many of the error messages from <productname>ApplixWare</productname>
go to <filename>stderr</filename>,
but I'm not sure where <filename>stderr</filename>
is sent, so <application>strace</application> is the way to find out.
</para>
</note>
</step>
</procedure>
<para>
For example, after getting
a <quote>Cannot launch gateway on server</quote>,
I ran strace on axnet and got
<programlisting>
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
</programlisting>
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.
</para>
</sect2>
<sect2>
<title>Running the ApplixWare Demo</title>
<para>
In order to go through the
<citetitle>ApplixWare Data Tutorial</citetitle>, you need to create
the sample tables that the Tutorial refers to. The ELF Macro used to
create the tables tries to use a NULL condition
on many of the database columns,
and <productname>Postgres</productname> does not currently allow this option.
</para>
<para>
To get around this problem, you can do the following:
</para>
<procedure>
<title>Modifying the ApplixWare Demo</title>
<step performance="required">
<para>
Copy <filename>/opt/applix/axdata/eng/Demos/sqldemo.am</filename>
to a local directory.
</para>
</step>
<step performance="required">
<para>
Edit this local copy of <filename>sqldemo.am</filename>:
</para>
<substeps>
<step performance="required">
<para>
Search for 'null_clause = "NULL"
</para>
</step>
<step performance="required">
<para>
Change this to null_clause = ""
</para>
</step>
</substeps>
</step>
<step performance="required">
<para>
Start <application>Applix Macro Editor</application>.
</para>
</step>
<step performance="required">
<para>
Open the sqldemo.am file from the <application>Macro Editor</application>.
</para>
</step>
<step performance="required">
<para>
Select <command>File->Compile and Save</command>.
</para>
</step>
<step performance="required">
<para>
Exit <application>Macro Editor</application>.
</para>
</step>
<step performance="required">
<para>
Start <application>Applix Data</application>.
</para>
</step>
<step performance="required">
<para>
Select <command>*->Run Macro</command>
</para>
</step>
<step performance="required">
<para>
Enter the value <quote>sqldemo</quote>, then click <command>OK</command>.
</para>
<para>
You should see the progress in the status line of the data window
(in the lower left corner).
</para>
</step>
<step performance="required">
<para>
You should now be able to access the demo tables.
</para>
</step>
</procedure>
</sect2>
<sect2>
<title>Useful Macros</title>
<para>
You can add information about your
database login and password to the standard Applix startup
macro file. This is an example
<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")
...
...
doc/src/sgml/postgres.sgml
View file @
f3d2b2e0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.2
6 1999/06/01 17:26:18
thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.2
7 1999/06/03 04:21:49
thomas Exp $
Postgres integrated documentation.
Postgres integrated documentation.
Other subset docs should be copied and shrunk from here.
Other subset docs should be copied and shrunk from here.
thomas 1998-02-23
thomas 1998-02-23
$Log: postgres.sgml,v $
$Log: postgres.sgml,v $
Revision 1.27 1999/06/03 04:21:49 thomas
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
Revision 1.26 1999/06/01 17:26:18 thomas
Revision 1.26 1999/06/01 17:26:18 thomas
Make sure that only one intro is included in the integrated doc.
Make sure that only one intro is included in the integrated doc.
Multiple intros cause trouble since they have some section elements
Multiple intros cause trouble since they have some section elements
...
@@ -102,10 +106,11 @@ Move SQL reference pages up into the User's Guide.
...
@@ -102,10 +106,11 @@ Move SQL reference pages up into the User's Guide.
<!entity y2k SYSTEM "y2k.sgml">
<!entity y2k SYSTEM "y2k.sgml">
<!-- tutorial -->
<!-- tutorial -->
<!entity intro SYSTEM "intro.sgml">
<!entity arch SYSTEM "arch.sgml">
<!entity arch SYSTEM "arch.sgml">
<!entity
start SYSTEM "start
.sgml">
<!entity
intro SYSTEM "intro
.sgml">
<!entity query SYSTEM "query.sgml">
<!entity query SYSTEM "query.sgml">
<!entity sql SYSTEM "sql.sgml">
<!entity start SYSTEM "start.sgml">
<!-- user's guide -->
<!-- user's guide -->
<!entity advanced SYSTEM "advanced.sgml">
<!entity advanced SYSTEM "advanced.sgml">
...
@@ -121,7 +126,6 @@ Move SQL reference pages up into the User's Guide.
...
@@ -121,7 +126,6 @@ Move SQL reference pages up into the User's Guide.
<!entity oper SYSTEM "oper.sgml">
<!entity oper SYSTEM "oper.sgml">
<!entity pgaccess SYSTEM "pgaccess.sgml">
<!entity pgaccess SYSTEM "pgaccess.sgml">
<!entity psql SYSTEM "psql.sgml">
<!entity psql SYSTEM "psql.sgml">
<!entity sql SYSTEM "sql.sgml">
<!entity query-ug SYSTEM "query-ug.sgml">
<!entity query-ug SYSTEM "query-ug.sgml">
<!entity storage SYSTEM "storage.sgml">
<!entity storage SYSTEM "storage.sgml">
<!entity syntax SYSTEM "syntax.sgml">
<!entity syntax SYSTEM "syntax.sgml">
...
@@ -219,7 +223,7 @@ Move SQL reference pages up into the User's Guide.
...
@@ -219,7 +223,7 @@ Move SQL reference pages up into the User's Guide.
<LegalNotice>
<LegalNotice>
<Para>
<Para>
<ProductName>PostgreSQL</ProductName> is
© 1998
-9
<ProductName>PostgreSQL</ProductName> is
Copyright © 1996
-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</Para>
</Para>
</LegalNotice>
</LegalNotice>
...
@@ -254,20 +258,6 @@ Your name here...
...
@@ -254,20 +258,6 @@ Your name here...
</Para>
</Para>
</Preface>
</Preface>
<part Id="part-tutorial">
<Title>Tutorial</Title>
<PartIntro>
<Para>
Introduction for new users.
</Para>
</PartIntro>
&intro;
&arch;
&start;
&query;
&advanced;
</Part>
<part Id="part-user">
<part Id="part-user">
<Title>User's Guide</Title>
<Title>User's Guide</Title>
<PartIntro>
<PartIntro>
...
@@ -276,7 +266,6 @@ Your name here...
...
@@ -276,7 +266,6 @@ Your name here...
</Para>
</Para>
</PartIntro>
</PartIntro>
&sql;
&syntax;
&syntax;
&datatype;
&datatype;
&oper;
&oper;
...
@@ -383,6 +372,21 @@ Your name here...
...
@@ -383,6 +372,21 @@ Your name here...
&page;
&page;
</Part>
</Part>
<part Id="part-tutorial">
<Title>Tutorial</Title>
<PartIntro>
<Para>
Introduction for new users.
</Para>
</PartIntro>
&intro;
&sql;
&arch;
&start;
&query;
&advanced;
</Part>
<part Id="part-appendix">
<part Id="part-appendix">
<Title>Appendices</Title>
<Title>Appendices</Title>
<PartIntro>
<PartIntro>
...
...
doc/src/sgml/programmer.sgml
View file @
f3d2b2e0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.1
6 1999/05/26 17:30:30
thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.1
7 1999/06/03 04:21:49
thomas Exp $
Postgres Programmer's Guide.
Postgres Programmer's Guide.
- thomas 1998-10-27
- thomas 1998-10-27
$Log: programmer.sgml,v $
$Log: programmer.sgml,v $
Revision 1.17 1999/06/03 04:21:49 thomas
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
Revision 1.16 1999/05/26 17:30:30 thomas
Revision 1.16 1999/05/26 17:30:30 thomas
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add an appendix with more details on date/time attributes and handling.
Add an appendix with more details on date/time attributes and handling.
...
@@ -148,7 +152,7 @@ Bigger updates to the installation instructions (install and config).
...
@@ -148,7 +152,7 @@ Bigger updates to the installation instructions (install and config).
<LegalNotice>
<LegalNotice>
<Para>
<Para>
<ProductName>PostgreSQL</ProductName> is
© 1998
-9
<ProductName>PostgreSQL</ProductName> is
Copyright © 1996
-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</Para>
</Para>
</LegalNotice>
</LegalNotice>
...
...
doc/src/sgml/release.sgml
View file @
f3d2b2e0
<Chapter Id="release"
>
<chapter
>
<Title>Release Notes</T
itle>
<title>Release Notes</t
itle>
<S
ect1>
<s
ect1>
<Title>Release 6.5</T
itle>
<title>Release 6.5</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -15,84 +15,130 @@
...
@@ -15,84 +15,130 @@
</docinfo>
</docinfo>
-->
-->
<para>
<para>
This release marks the development team's final mastery of the source
This release marks a major step in the development team's mastery of the source
code we inherited from Berkeley. You will see we are now easily adding
code we inherited from Berkeley. You will see we are now easily adding
major features, thanks to the increasing size and experience of our
major features, thanks to the increasing size and experience of our
world-wide development team: Here is a brief, incomplete summary:
world-wide development team.
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
<para>
Here is a brief summary of some of the more noticable changes:
Multi-version concurrency control(MVCC): This removes our old
table-level locking, and replaces it with a locking system that is
<variablelist>
superior to most commercial database systems. In a traditional system,
<varlistentry>
each row that is modified is locked until committed, preventing reads by
<term>
other users. MVCC uses the natural multi-version nature of PostgreSQL
Multi-version concurrency control(MVCC)
to allow readers to continue reading consistent data during writer
</term>
activity. Writers continue to use the compact pg_log transaction
<listitem>
system. This is all preformed without having to allocate a lock for
<para>
every row like traditional database systems. So, basically, we no
This removes our old
longer have table-level locking, we have something better than row-level
table-level locking, and replaces it with a locking system that is
locking.
superior to most commercial database systems. In a traditional system,
</para>
each row that is modified is locked until committed, preventing reads by
</listitem>
other users. MVCC uses the natural multi-version nature of PostgreSQL
<listitem>
to allow readers to continue reading consistent data during writer
<para>
activity. Writers continue to use the compact pg_log transaction
Numeric data type: We now have a true numeric data type, with
system. This is all preformed without having to allocate a lock for
user-specified precision.
every row like traditional database systems. So, basically, we no
</para>
longer have table-level locking, we have something better than row-level
</listitem>
locking.
</para>
<listitem>
</listitem>
<para>
</varlistentry>
Temporary tables: Temporary tables are guaranteed to have unique names
within a database session, and are destroyed on session exit.
<varlistentry>
</para>
<term>
</listitem>
Numeric data type
</term>
<listitem>
<listitem>
<para>
<para>
New SQL features: We now have CASE, INTERSECT, and EXCEPT statement
We now have a true numeric data type, with
support. We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL,
user-specified precision.
SELECT ... FOR UPDATE, and an improved LOCK command.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
<listitem>
<varlistentry>
<para>
<term>
Speedups: We continue to speed up PostgreSQL, thanks to the variety of
Temporary tables
talents within our team. We have sped up memory allocation,
</term>
optimization, table joins, and row transfers routines.
<listitem>
</para>
<para>
</listitem>
Temporary tables are guaranteed to have unique names
within a database session, and are destroyed on session exit.
<listitem>
</para>
<para>
</listitem>
Other: We continue to expand our port list, this time including
</varlistentry>
Win32/NT. Most interfaces have new versions, and existing functionality
has been improved.
<varlistentry>
</para>
<term>
</listitem>
New SQL features
</term>
</itemizedlist>
<listitem>
</para>
<para>
We now have CASE, INTERSECT, and EXCEPT statement
<sect2>
support. We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL,
<title>Migration to v6.5</title>
SELECT ... FOR UPDATE, and an improved LOCK command.
</para>
<para>
</listitem>
A dump/restore using <application>pg_dump</application>
</varlistentry>
or <application>pg_dumpall</application>
is required for those wishing to migrate data from any
<varlistentry>
previous release of <productname>Postgres</productname>.
<term>
</para>
Speedups
</sect2>
</term>
<sect2>
<listitem>
<title>Detailed Change List</title>
<para>
We continue to speed up PostgreSQL, thanks to the variety of
<para>
talents within our team. We have sped up memory allocation,
<programlisting>
optimization, table joins, and row transfer routines.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Ports
</term>
<listitem>
<para>
We continue to expand our port list, this time including
WinNT/ix86 and NetBSD/arm32.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Interfaces
</term>
<listitem>
<para>
Most interfaces have new versions, and existing functionality
has been improved.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<sect2>
<title>Migration to v6.5</title>
<para>
A dump/restore using <application>pg_dump</application>
or <application>pg_dumpall</application>
is required for those wishing to migrate data from any
previous release of <productname>Postgres</productname>.
</para>
</sect2>
<sect2>
<title>Detailed Change List</title>
<para>
<programlisting>
Bug Fixes
Bug Fixes
---------
---------
Fix text<->float8 and text<->float4 conversion functions(Thomas)
Fix text<->float8 and text<->float4 conversion functions(Thomas)
...
@@ -237,14 +283,14 @@ Add ARM32 support(Andrew McMurry)
...
@@ -237,14 +283,14 @@ Add ARM32 support(Andrew McMurry)
Better support for HPUX 11 and Unixware
Better support for HPUX 11 and Unixware
Improve file handling to be more uniform, prevent file descriptor leak(Tom)
Improve file handling to be more uniform, prevent file descriptor leak(Tom)
New install commands for plpgsql(Jan)
New install commands for plpgsql(Jan)
</programlisting>
</programlisting>
</P
ara>
</p
ara>
</sect2>
</sect2>
</S
ect1>
</s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.4.2</T
itle>
<
title>Release 6.4.2</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -278,14 +324,14 @@ A dump/restore is <emphasis>not</emphasis> required for those running
...
@@ -278,14 +324,14 @@ A dump/restore is <emphasis>not</emphasis> required for those running
<programlisting>
<programlisting>
Fix for datetime constant problem on some platforms(Thomas)
Fix for datetime constant problem on some platforms(Thomas)
</programlisting>
</programlisting>
</
P
ara>
</
p
ara>
</sect2>
</sect2>
</
S
ect1>
</
s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.4.1</T
itle>
<
title>Release 6.4.1</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -348,14 +394,14 @@ Add routines to help with single-byte (internal) character type(Thomas)
...
@@ -348,14 +394,14 @@ Add routines to help with single-byte (internal) character type(Thomas)
Compilation of libpq for Win32 fixes(Magnus)
Compilation of libpq for Win32 fixes(Magnus)
Upgrade to PyGreSQL 2.2(D'Arcy)
Upgrade to PyGreSQL 2.2(D'Arcy)
</programlisting>
</programlisting>
</
P
ara>
</
p
ara>
</sect2>
</sect2>
</
S
ect1>
</
s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.4</T
itle>
<
title>Release 6.4</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -374,7 +420,7 @@ Thanks to our developers and maintainers, nearly every aspect of the system
...
@@ -374,7 +420,7 @@ Thanks to our developers and maintainers, nearly every aspect of the system
has received some attention since the previous release.
has received some attention since the previous release.
Here is a brief, incomplete summary:
Here is a brief, incomplete summary:
<itemizedlist
spacing="compact"
>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
Views and rules are now functional thanks to extensive new code in the
Views and rules are now functional thanks to extensive new code in the
...
@@ -652,12 +698,12 @@ smarter perl configuration(Brook)
...
@@ -652,12 +698,12 @@ smarter perl configuration(Brook)
configure uses supplied install-sh if no install script found(Tom)
configure uses supplied install-sh if no install script found(Tom)
new Makefile.shlib for shared library configuration(Tom)
new Makefile.shlib for shared library configuration(Tom)
</programlisting>
</programlisting>
</
P
ara>
</
p
ara>
</sect2>
</sect2>
</
S
ect1>
</
s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.3.2</T
itle>
<
title>Release 6.3.2</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -677,7 +723,7 @@ Refer to the release notes for v6.3 for a more complete summary of new features.
...
@@ -677,7 +723,7 @@ Refer to the release notes for v6.3 for a more complete summary of new features.
<para>
<para>
Summary:
Summary:
<itemizedlist
spacing="compact"
>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
Repairs automatic configuration support for some platforms, including Linux,
Repairs automatic configuration support for some platforms, including Linux,
...
@@ -693,7 +739,7 @@ Correctly handles function calls on the left side of BETWEEN and LIKE clauses.
...
@@ -693,7 +739,7 @@ Correctly handles function calls on the left side of BETWEEN and LIKE clauses.
</itemizedlist>
</itemizedlist>
</para>
</para>
<
P
ara>
<
p
ara>
A dump/restore is NOT required for those running 6.3 or 6.3.1. A
A dump/restore is NOT required for those running 6.3 or 6.3.1. A
'make distclean', 'make', and 'make install' is all that is required.
'make distclean', 'make', and 'make install' is all that is required.
This last step should be performed while the postmaster is not running.
This last step should be performed while the postmaster is not running.
...
@@ -733,8 +779,8 @@ ASSERT fixes(Bruce)
...
@@ -733,8 +779,8 @@ ASSERT fixes(Bruce)
</para>
</para>
</sect2>
</sect2>
</sect1>
</sect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.3.1</T
itle>
<
title>Release 6.3.1</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -752,7 +798,7 @@ Mon Mar 23 10:21:52 EST 1998
...
@@ -752,7 +798,7 @@ Mon Mar 23 10:21:52 EST 1998
<para>
<para>
Summary:
Summary:
<itemizedlist
spacing="compact"
>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
Additional support for multi-byte character sets.
Additional support for multi-byte character sets.
...
@@ -779,7 +825,7 @@ Improvements to the configuration autodetection for installation.
...
@@ -779,7 +825,7 @@ Improvements to the configuration autodetection for installation.
</itemizedlist>
</itemizedlist>
</para>
</para>
<
P
ara>
<
p
ara>
A dump/restore is NOT required for those running 6.3. A
A dump/restore is NOT required for those running 6.3. A
'make distclean', 'make', and 'make install' is all that is required.
'make distclean', 'make', and 'make install' is all that is required.
This last step should be performed while the postmaster is not running.
This last step should be performed while the postmaster is not running.
...
@@ -828,8 +874,8 @@ Better identify tcl and tk libs and includes(Bruce)
...
@@ -828,8 +874,8 @@ Better identify tcl and tk libs and includes(Bruce)
</para>
</para>
</sect2>
</sect2>
</sect1>
</sect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.3</T
itle>
<
title>Release 6.3</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -848,7 +894,7 @@ Sun Mar 1 14:57:30 EST 1998
...
@@ -848,7 +894,7 @@ Sun Mar 1 14:57:30 EST 1998
There are <emphasis>many</emphasis> new features and improvements in this release.
There are <emphasis>many</emphasis> new features and improvements in this release.
Here is a brief, incomplete summary:
Here is a brief, incomplete summary:
<itemizedlist
spacing="compact"
>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
Many new SQL features, including
Many new SQL features, including
...
@@ -1143,12 +1189,12 @@ Add string functions to regression suite(Thomas)
...
@@ -1143,12 +1189,12 @@ Add string functions to regression suite(Thomas)
Expand a few function names formerly truncated to 16 characters(Thomas)
Expand a few function names formerly truncated to 16 characters(Thomas)
Remove un-needed malloc() calls and replace with palloc()(Bruce)
Remove un-needed malloc() calls and replace with palloc()(Bruce)
</programlisting>
</programlisting>
</
P
ara>
</
p
ara>
</sect2>
</sect2>
</
S
ect1>
</
s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.2.1</T
itle>
<
title>Release 6.2.1</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -1169,7 +1215,7 @@ v6.2.1 is a bug-fix and usability release on v6.2.
...
@@ -1169,7 +1215,7 @@ v6.2.1 is a bug-fix and usability release on v6.2.
<para>
<para>
Summary:
Summary:
<itemizedlist
spacing="compact"
>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
Allow strings to span lines, per <acronym>SQL92</acronym>.
Allow strings to span lines, per <acronym>SQL92</acronym>.
...
@@ -1236,10 +1282,10 @@ Trigger function for inserting user names for INSERT/UPDATE(Brook Milligan)
...
@@ -1236,10 +1282,10 @@ Trigger function for inserting user names for INSERT/UPDATE(Brook Milligan)
</programlisting>
</programlisting>
</para>
</para>
</sect2>
</sect2>
</
S
ect1>
</
s
ect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.2</T
itle>
<
title>Release 6.2</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -1399,8 +1445,8 @@ SPI and Trigger programming guides (Vadim & D'Arcy)
...
@@ -1399,8 +1445,8 @@ SPI and Trigger programming guides (Vadim & D'Arcy)
</sect2>
</sect2>
</sect1>
</sect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.1.1</T
itle>
<
title>Release 6.1.1</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -1455,8 +1501,8 @@ pg_dumpall now returns proper status, portability fix(Bruce)
...
@@ -1455,8 +1501,8 @@ pg_dumpall now returns proper status, portability fix(Bruce)
</sect2>
</sect2>
</sect1>
</sect1>
<
S
ect1>
<
s
ect1>
<
Title>Release 6.1</T
itle>
<
title>Release 6.1</t
itle>
<!--
<!--
<docinfo>
<docinfo>
<authorgroup>
<authorgroup>
...
@@ -1471,21 +1517,22 @@ Sun Jun 8 14:41:13 EDT 1997
...
@@ -1471,21 +1517,22 @@ Sun Jun 8 14:41:13 EDT 1997
</docinfo>
</docinfo>
-->
-->
<
P
ara>
<
p
ara>
The regression tests have been adapted and extensively modified for the
The regression tests have been adapted and extensively modified for the
v6.1 release of <productname>Postgres</productname>.
v6.1 release of <productname>Postgres</productname>.
</
P
ara>
</
p
ara>
<
P
ara>
<
p
ara>
Three new data types (datetime, timespan, and circle) have been added to
Three new data types (datetime, timespan, and circle) have been added to
the native set of <productname>Postgres</productname> types. Points, boxes, paths, and polygons
the native set of <productname>Postgres</productname> types. Points, boxes, paths, and polygons
have had their output formats made consistant across the data types.
have had their output formats made consistant across the data types.
The polygon output in misc.out has only been spot-checked for correctness
The polygon output in misc.out has only been spot-checked for correctness
relative to the original regression output.
relative to the original regression output.
</
P
ara>
</
p
ara>
<Para>
<para>
<productname>Postgres</productname> v6.1 introduces a new, alternate optimizer which uses <FirstTerm>genetic</FirstTerm>
<productname>Postgres</productname> v6.1 introduces a new, alternate
optimizer which uses <firstterm>genetic</firstterm>
algorithms. These algorithms introduce a random behavior in the ordering
algorithms. These algorithms introduce a random behavior in the ordering
of query results when the query contains multiple qualifiers or multiple
of query results when the query contains multiple qualifiers or multiple
tables (giving the optimizer a choice on order of evaluation). Several
tables (giving the optimizer a choice on order of evaluation). Several
...
@@ -1493,28 +1540,28 @@ Sun Jun 8 14:41:13 EDT 1997
...
@@ -1493,28 +1540,28 @@ Sun Jun 8 14:41:13 EDT 1997
hence are insensitive to optimizer choices. A few regression tests are
hence are insensitive to optimizer choices. A few regression tests are
for data types which are inherently unordered (e.g. points and time
for data types which are inherently unordered (e.g. points and time
intervals) and tests involving those types are explicitly bracketed with
intervals) and tests involving those types are explicitly bracketed with
<
Command>set geqo to 'off'</Command> and <Command>reset geqo</C
ommand>.
<
command>set geqo to 'off'</command> and <command>reset geqo</c
ommand>.
</
P
ara>
</
p
ara>
<
P
ara>
<
p
ara>
The interpretation of array specifiers (the curly braces around atomic
The interpretation of array specifiers (the curly braces around atomic
values) appears to have changed sometime after the original regression
values) appears to have changed sometime after the original regression
tests were generated. The current <
FileName>./expected/*.out</FileN
ame> files reflect this
tests were generated. The current <
filename>./expected/*.out</filen
ame> files reflect this
new interpretation, which may not be correct!
new interpretation, which may not be correct!
</
P
ara>
</
p
ara>
<
P
ara>
<
p
ara>
The float8 regression test fails on at least some platforms. This is due
The float8 regression test fails on at least some platforms. This is due
to differences in implementations of pow() and exp() and the signaling
to differences in implementations of pow() and exp() and the signaling
mechanisms used for overflow and underflow conditions.
mechanisms used for overflow and underflow conditions.
</
P
ara>
</
p
ara>
<
P
ara>
<
p
ara>
The "random" results in the random test should cause the "random" test
The "random" results in the random test should cause the "random" test
to be "failed", since the regression tests are evaluated using a simple
to be "failed", since the regression tests are evaluated using a simple
diff. However, "random" does not seem to produce random results on my
diff. However, "random" does not seem to produce random results on my
test machine (Linux/gcc/i686).
test machine (Linux/gcc/i686).
</
P
ara>
</
p
ara>
<sect2>
<sect2>
<title>Migration to v6.1</title>
<title>Migration to v6.1</title>
...
@@ -2440,40 +2487,40 @@ Initial release.
...
@@ -2440,40 +2487,40 @@ Initial release.
</para>
</para>
</sect1>
</sect1>
<
S
ect1>
<
s
ect1>
<
Title>Timing Results</T
itle>
<
title>Timing Results</t
itle>
<
P
ara>
<
p
ara>
These timing results are from running the regression test with the commands
These timing results are from running the regression test with the commands
<
ProgramL
isting>
<
programl
isting>
% cd src/test/regress
% cd src/test/regress
% make all
% make all
% time make runtest
% time make runtest
</
ProgramL
isting>
</
programl
isting>
</para>
</para>
<
P
ara>
<
p
ara>
Timing under Linux 2.0.27 seems to have a roughly 5% variation from run
Timing under Linux 2.0.27 seems to have a roughly 5% variation from run
to run, presumably due to the scheduling vagaries of multitasking systems.
to run, presumably due to the scheduling vagaries of multitasking systems.
</para>
</para>
<
S
ect2>
<
s
ect2>
<
Title>v6.4beta</T
itle>
<
title>v6.4beta</t
itle>
<para>
<para>
The times for this release are not directly comparable to those for previous releases
The times for this release are not directly comparable to those for previous releases
since some additional regression tests have been included.
since some additional regression tests have been included.
In general, however, v6.4 should be slightly faster than the previous release (thanks, Bruce!).
In general, however, v6.4 should be slightly faster than the previous release (thanks, Bruce!).
</para>
</para>
<
P
ara>
<
p
ara>
<
ProgramL
isting>
<
programl
isting>
Time System
Time System
02:26 Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
02:26 Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
</
ProgramL
isting>
</
programl
isting>
</para>
</para>
</sect2>
</sect2>
<
S
ect2>
<
s
ect2>
<
Title>v6.3</T
itle>
<
title>v6.3</t
itle>
<para>
<para>
The times for this release are not directly comparable to those for previous releases
The times for this release are not directly comparable to those for previous releases
...
@@ -2481,26 +2528,43 @@ since some additional regression tests have been included and some obsolete test
...
@@ -2481,26 +2528,43 @@ since some additional regression tests have been included and some obsolete test
time travel have been removed.
time travel have been removed.
In general, however, v6.3 is substantially faster than previous releases (thanks, Bruce!).
In general, however, v6.3 is substantially faster than previous releases (thanks, Bruce!).
</para>
</para>
<
P
ara>
<
p
ara>
<
ProgramL
isting>
<
programl
isting>
Time System
Time System
02:30 Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
02:30 Dual Pentium Pro 180, 96MB, UW-SCSI, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
04:12 Dual Pentium Pro 180, 96MB, EIDE, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
04:12 Dual Pentium Pro 180, 96MB, EIDE, Linux 2.0.30, gcc 2.7.2.1 -O2 -m486
</
ProgramL
isting>
</
programl
isting>
</para>
</para>
</sect2>
</sect2>
<
S
ect2>
<
s
ect2>
<
Title>v6.1</T
itle>
<
title>v6.1</t
itle>
<
P
ara>
<
p
ara>
<
ProgramL
isting>
<
programl
isting>
Time System
Time System
06:12 Pentium Pro 180, 32MB, EIDE, Linux 2.0.30, gcc 2.7.2 -O2 -m486
06:12 Pentium Pro 180, 32MB, EIDE, Linux 2.0.30, gcc 2.7.2 -O2 -m486
12:06 P-100, 48MB, Linux 2.0.29, gcc
12:06 P-100, 48MB, Linux 2.0.29, gcc
39:58 Sparc IPC 32MB, Solaris 2.5, gcc 2.7.2.1 -O -g
39:58 Sparc IPC 32MB, Solaris 2.5, gcc 2.7.2.1 -O -g
</
ProgramL
isting>
</
programl
isting>
</para>
</para>
</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:
-->
doc/src/sgml/tutorial.sgml
View file @
f3d2b2e0
...
@@ -13,12 +13,13 @@
...
@@ -13,12 +13,13 @@
<!entity notation SYSTEM "notation.sgml">
<!entity notation SYSTEM "notation.sgml">
<!entity y2k SYSTEM "y2k.sgml">
<!entity y2k SYSTEM "y2k.sgml">
<!entity intro SYSTEM "intro.sgml">
<!entity arch SYSTEM "arch.sgml">
<!entity start SYSTEM "start.sgml">
<!entity query SYSTEM "query.sgml">
<!entity advanced SYSTEM "advanced.sgml">
<!entity advanced SYSTEM "advanced.sgml">
<!entity arch SYSTEM "arch.sgml">
<!entity biblio SYSTEM "biblio.sgml">
<!entity biblio SYSTEM "biblio.sgml">
<!entity intro SYSTEM "intro.sgml">
<!entity query SYSTEM "query.sgml">
<!entity sql SYSTEM "sql.sgml">
<!entity start SYSTEM "start.sgml">
]>
]>
<Book Id="tutorial">
<Book Id="tutorial">
...
@@ -54,7 +55,7 @@
...
@@ -54,7 +55,7 @@
<LegalNotice>
<LegalNotice>
<Para>
<Para>
<ProductName>PostgreSQL</ProductName> is
copyright (©) 1998
-9
<ProductName>PostgreSQL</ProductName> is
Copyright © 1996
-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</Para>
</Para>
</LegalNotice>
</LegalNotice>
...
@@ -90,6 +91,7 @@ Your name here...
...
@@ -90,6 +91,7 @@ Your name here...
</Preface>
</Preface>
&intro;
&intro;
&sql;
&arch;
&arch;
&start;
&start;
&query;
&query;
...
...
doc/src/sgml/user.sgml
View file @
f3d2b2e0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.1
1 1999/05/26 17:30:30
thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/user.sgml,v 1.1
2 1999/06/03 04:21:51
thomas Exp $
Postgres User's Manual.
Postgres User's Manual.
Derived from postgres.sgml.
Derived from postgres.sgml.
thomas 1998-02-24
thomas 1998-02-24
$Log: user.sgml,v $
$Log: user.sgml,v $
Revision 1.12 1999/06/03 04:21:51 thomas
Markup changes for v6.5 release.
Clean out duplicate stuff in odbc.sgml resulting from a faulty patch.
Revision 1.11 1999/05/26 17:30:30 thomas
Revision 1.11 1999/05/26 17:30:30 thomas
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add chapters on CVS access, MVCC, SQL theory to the docs.
Add an appendix with more details on date/time attributes and handling.
Add an appendix with more details on date/time attributes and handling.
...
@@ -69,7 +73,6 @@ Move SQL reference pages up into the User's Guide.
...
@@ -69,7 +73,6 @@ Move SQL reference pages up into the User's Guide.
<!entity manage SYSTEM "manage.sgml">
<!entity manage SYSTEM "manage.sgml">
<!entity mvcc SYSTEM "mvcc.sgml">
<!entity mvcc SYSTEM "mvcc.sgml">
<!entity oper SYSTEM "oper.sgml">
<!entity oper SYSTEM "oper.sgml">
<!entity sql SYSTEM "sql.sgml">
<!entity storage SYSTEM "storage.sgml">
<!entity storage SYSTEM "storage.sgml">
<!entity syntax SYSTEM "syntax.sgml">
<!entity syntax SYSTEM "syntax.sgml">
<!entity typeconv SYSTEM "typeconv.sgml">
<!entity typeconv SYSTEM "typeconv.sgml">
...
@@ -113,7 +116,7 @@ Move SQL reference pages up into the User's Guide.
...
@@ -113,7 +116,7 @@ Move SQL reference pages up into the User's Guide.
<LegalNotice>
<LegalNotice>
<Para>
<Para>
<ProductName>PostgreSQL</ProductName> is
© 1998
-9
<ProductName>PostgreSQL</ProductName> is
Copyright © 1996
-9
by the Postgres Global Development Group.
by the Postgres Global Development Group.
</Para>
</Para>
</LegalNotice>
</LegalNotice>
...
@@ -149,7 +152,6 @@ Your name here...
...
@@ -149,7 +152,6 @@ Your name here...
</Preface>
</Preface>
&intro;
&intro;
&sql;
&syntax;
&syntax;
&datatype;
&datatype;
&oper;
&oper;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment