#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.13 2000/01/14 22:11:31 petere Exp $
+# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.14 2000/05/02 20:01:51 thomas Exp $
#
#----------------------------------------------------------------------------
MANSOURCES= $(wildcard ref/*.sgml)
-APPLICATIONS= createdb.sgml createuser.sgml \
- createlang.sgml \
- dropdb.sgml dropuser.sgml \
- droplang.sgml \
+APPLICATIONS= createdb.sgml createlang.sgml createuser.sgml \
+ dropdb.sgml droplang.sgml dropuser.sgml \
+ ecpg-ref.sgml \
initdb.sgml initlocation.sgml \
ipcclean.sgml \
pg_dump.sgml \
pg_dumpall.sgml \
+ pg_passwd.sgml \
pg_upgrade.sgml \
pgaccess-ref.sgml \
pgadmin-ref.sgml \
+ pgctl-ref.sgml \
pgtclsh.sgml \
pgtksh.sgml \
postgres-ref.sgml \
COMMANDS= abort.sgml alter_group.sgml alter_table.sgml alter_user.sgml \
begin.sgml \
- close.sgml cluster.sgml commit.sgml copy.sgml \
- create_aggregate.sgml create_database.sgml create_function.sgml create_group.sgml \
+ close.sgml cluster.sgml comment.sgml commit.sgml copy.sgml \
+ create_aggregate.sgml create_constraint.sgml create_database.sgml \
+ create_function.sgml create_group.sgml \
create_index.sgml \
create_language.sgml create_operator.sgml create_rule.sgml create_sequence.sgml \
create_table.sgml create_table_as.sgml create_trigger.sgml create_type.sgml \
drop_index.sgml \
drop_language.sgml drop_operator.sgml drop_rule.sgml drop_sequence.sgml \
drop_table.sgml drop_trigger.sgml drop_type.sgml drop_user.sgml drop_view.sgml \
- explain.sgml fetch.sgml grant.sgml \
+ end.sgml explain.sgml fetch.sgml grant.sgml \
insert.sgml listen.sgml load.sgml lock.sgml move.sgml \
notify.sgml \
- reset.sgml revoke.sgml rollback.sgml \
+ reindex.sgml reset.sgml revoke.sgml rollback.sgml \
select.sgml select_into.sgml set.sgml show.sgml \
- unlisten.sgml update.sgml vacuum.sgml
+ truncate.sgml unlisten.sgml update.sgml vacuum.sgml
FUNCTIONS= current_date.sgml current_time.sgml current_timestamp.sgml current_user.sgml
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.21 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.22 2000/05/02 20:01:51 thomas Exp $
Postgres Administrator's Guide.
Derived from postgres.sgml.
<!entity biblio SYSTEM "biblio.sgml">
]>
-<Book Id="admin">
+<book id="admin">
<!-- Title information -->
- <Title>PostgreSQL Administrator's Guide</Title>
- <BookInfo>
- <ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
- <BookBiblio>
- <AuthorGroup>
- <CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
- </AuthorGroup>
+ <title>PostgreSQL Administrator's Guide</title>
+ <bookinfo>
+ <releaseinfo>Covering v7.0 for general release</releaseinfo>
+ <bookbiblio>
+ <authorgroup>
+ <corpauthor>The PostgreSQL Development Team</corpauthor>
+ </authorgroup>
<!-- editor in authorgroup is not supported
<AuthorGroup>
-->
- <Editor>
- <FirstName>Thomas</FirstName>
- <SurName>Lockhart</SurName>
- <Affiliation>
- <OrgName>Caltech/JPL</OrgName>
- </Affiliation>
- </Editor>
+ <editor>
+ <firstname>Thomas</firstname>
+ <surname>Lockhart</surname>
+ <affiliation>
+ <orgname>Caltech/JPL</orgname>
+ </affiliation>
+ </editor>
<!--
</AuthorGroup>
-->
<AuthorInitials>TGL</AuthorInitials>
-->
- <Date>(last updated 1999-06-01)</Date>
- </BookBiblio>
+ <date>(last updated 2000-05-01)</date>
+ </bookbiblio>
- <LegalNotice>
- <Para>
- <ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
- by the Postgres Global Development Group.
- </Para>
- </LegalNotice>
+ <legalnotice>
+ <para>
+ <productname>PostgreSQL</productname> is Copyright © 1996-2000
+ by PostgreSQL Inc.
+ </para>
+ </legalnotice>
- </BookInfo>
+ </bookinfo>
<!--
<TOC> </TOC>
</Dedication>
-->
- <Preface id="preface">
- <Title>Summary</Title>
+ <preface id="preface">
+ <title>Summary</title>
- <Para>
- <ProductName>Postgres</ProductName>,
+ <para>
+ <productname>Postgres</productname>,
developed originally in the UC Berkeley Computer Science Department,
pioneered many of the object-relational concepts
now becoming available in some commercial databases.
It provides SQL92/SQL3 language support,
transaction integrity, and type extensibility.
- <ProductName>PostgreSQL</ProductName> is an open-source descendant
+ <productname>PostgreSQL</productname> is an open-source descendant
of this original Berkeley code.
- </Para>
- </Preface>
+ </para>
+ </preface>
&intro-ag;
</index>
-->
-</Book>
+</book>
<!-- Keep this comment at the end of the file
Local variables:
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.11 2000/04/11 05:39:06 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/advanced.sgml,v 1.12 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="advanced">
+----------+----------+
</programlisting>
- Here the <quote>*</quote> after cities indicates that the query should
+ Here the "*" after cities indicates that the query should
be run over cities and all classes below cities in the
inheritance hierarchy. Many of the commands that we
have already discussed (<command>SELECT</command>,
<command>UPDATE</command> and <command>DELETE</command>)
- support this <quote>*</quote> notation, as do others, like
+ support this inheritance notation using "*" as do other commands like
<command>ALTER</command>.
</para>
</sect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.12 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/biblio.sgml,v 1.13 2000/05/02 20:01:51 thomas Exp $
-->
<bibliography id="biblio">
<productname>Postgres</productname> development team
are available at
<ulink url="http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/">
- http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/</ulink>
+ the University of California, Berkeley, Computer Science
+ Department web site</ulink>
</para>
<bibliodiv>
<surname>Lockhart</surname>
</editor>
- <pubdate>1998-10-01</pubdate>
+ <pubdate>2000-05-01</pubdate>
<publisher>
<publishername>The PostgreSQL Global Development Group</publishername>
</publisher>
<surname>Lockhart</surname>
</editor>
- <pubdate>1998-10-01</pubdate>
+ <pubdate>2000-05-01</pubdate>
<publisher>
<publishername>The PostgreSQL Global Development Group</publishername>
</publisher>
<surname>Lockhart</surname>
</editor>
- <pubdate>1998-10-01</pubdate>
+ <pubdate>2000-05-01</pubdate>
<publisher>
<publishername>The PostgreSQL Global Development Group</publishername>
</publisher>
<surname>Lockhart</surname>
</editor>
- <pubdate>1998-10-01</pubdate>
+ <pubdate>2000-05-01</pubdate>
<publisher>
<publishername>The PostgreSQL Global Development Group</publishername>
</publisher>
<surname>Lockhart</surname>
</editor>
- <pubdate>1998-10-01</pubdate>
+ <pubdate>2000-05-01</pubdate>
<publisher>
<publishername>The PostgreSQL Global Development Group</publishername>
</publisher>
</ulink>
</title>
<titleabbrev id="SESHADRI95">
+ Seshardri, 1995
</titleabbrev>
<authorgroup>
<author>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.2 1998/12/29 02:24:13 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/bki.sgml,v 1.3 2000/05/02 20:01:51 thomas Exp $
Transcribed from the original bki.man.5 documentation
- Thomas Lockhart 1998-08-03
and the <acronym>SQL</acronym> command <command>CREATE DATABASE</command>.
</para>
-<sect1>
-<title><acronym>BKI</acronym> File Format</title>
+ <sect1>
+ <title><acronym>BKI</acronym> File Format</title>
-<para>
-The <productname>Postgres</productname> backend interprets <acronym>BKI</acronym> files as described below. This
-description will be easier to understand if the <filename>global1.bki.source</filename> file is
-at hand as an example. (As explained above, this .source file isn't quite
-a <acronym>BKI</acronym> file, but you'll be able to guess what the resulting <acronym>BKI</acronym> file would be
-anyway).
-</para>
+ <para>
+ The <productname>Postgres</productname> backend interprets
+ <acronym>BKI</acronym> files as described below. This
+ description will be easier to understand if the
+ <filename>global1.bki.source</filename> file is
+ at hand as an example. (As explained above, this .source file isn't quite
+ a <acronym>BKI</acronym> file, but you'll be able to guess what
+ the resulting <acronym>BKI</acronym> file would be
+ anyway).
+ </para>
<para>
Commands are composed of a command name followed by space separated
-arguments. Arguments to a command which begin with a <quote>$</quote> are
-treated specially. If <quote>$$</quote> are the first two characters, then
-the first <quote>$</quote> is ignored and the argument is then processed
-normally. If the <quote>$</quote> is followed by space, then it is treated
+arguments. Arguments to a command which begin with a "$" are
+treated specially. If "$$" are the first two characters, then
+the first "$" is ignored and the argument is then processed
+normally. If the "$" is followed by space, then it is treated
as a NULL
-value. Otherwise, the characters following the <quote>$</quote> are
+value. Otherwise, the characters following the "$" are
interpreted as the name of a macro causing the argument to be replaced
with the macro's value. It is an error for this macro to be
undefined.
<replaceable class="parameter">oid_value</replaceable>
for its OID. If
<replaceable class="parameter">oid_value</replaceable>
-is not <quote>0</quote>, then this value will be used as the instance's
+is not zero (0), then this value will be used as the instance's
object identifier. Otherwise, it is an error.
</para>
</listitem>
<title>Example</title>
<para>
-The following set of commands will create the <quote>pg_opclass</quote>
+The following set of commands will create the <literal>pg_opclass</literal>
class containing the
<parameter>int_ops</parameter>
collection as an object with an OID of
</para>
</sect1>
</chapter>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode:sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"./reference.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:("/usr/lib/sgml/catalog")
+sgml-local-ecat-files:nil
+End:
+-->
-<chapter id="config">
-<title id="install-config">Configuration Options</title>
+ <chapter>
+ <title>Configuration Options</title>
- <sect1>
- <title>Parameters for Configuration (<application>configure</application>)</title>
+ <sect1>
+ <title>Parameters for Configuration
+ (<application>configure</application>)</title>
- <para>
- The full set of parameters available in <application>configure</application>
- can be obtained by typing
+ <para>
+ The full set of parameters available in <application>configure</application>
+ can be obtained by typing
- <programlisting>
- $ ./configure --help
- </programlisting>
- </para>
- <para>
- The following parameters may be of interest to installers:
+ <programlisting>
+$ ./configure --help
+ </programlisting>
+ </para>
+
+ <para>
+ The following parameters may be of interest to installers:
- <programlisting>
+ <programlisting>
Directories to install PostgreSQL in:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local/pgsql]
--with-CXX=<replaceable>compiler</replaceable>
use specific C++ compiler
--without-CXX prevent building C++ code
- </programlisting>
- </para>
- <para>
- Some systems may have trouble building a specific feature of
- <productname>Postgres</productname>. For example, systems with a damaged
- C++ compiler may need to specify <option>--without-CXX</option> to instruct
- the build procedure to skip construction of <filename>libpq++</filename>.
- </para>
- <para>
- Use the <option>--with-includes</option> and
- <option>--with-libraries</option> options if you want to build
- <productname>Postgres</productname> using include files or libraries
- that are not installed in your system's standard search path. For
- example, you might use these to build with an experimental version of
- Tcl. If you need to specify more than one nonstandard directory for
- include files or libraries, do it like this:
- <programlisting>
- --with-includes="/opt/tcl/include /opt/perl5/include"
- </programlisting>
- </para>
- <para>
- </para>
- </sect1>
- <sect1>
- <title>Parameters for Building (<application>make</application>)</title>
+ </programlisting>
+ </para>
+
+ <para>
+ Some systems may have trouble building a specific feature of
+ <productname>Postgres</productname>. For example, systems with a damaged
+ C++ compiler may need to specify <option>--without-CXX</option> to instruct
+ the build procedure to skip construction of <filename>libpq++</filename>.
+ </para>
+
+ <para>
+ Use the <option>--with-includes</option> and
+ <option>--with-libraries</option> options if you want to build
+ <productname>Postgres</productname> using include files or libraries
+ that are not installed in your system's standard search path. For
+ example, you might use these to build with an experimental version of
+ Tcl. If you need to specify more than one nonstandard directory for
+ include files or libraries, do it like this:
+
+ <programlisting>
+--with-includes="/opt/tcl/include /opt/perl5/include"
+ </programlisting>
+ </para>
+ </sect1>
+
+ <sect1>
+ <title>Parameters for Building (<application>make</application>)</title>
- <para>
- Many installation-related parameters can be set in the building
- stage of <productname>Postgres</productname> installation.
- </para>
- <para>
- In most cases, these parameters should be placed in a file,
- <filename>Makefile.custom</filename>, intended just for that purpose.
- The default distribution does not contain this optional file, so you
- will create it using a text editor of your choice. When upgrading installations,
- you can simply copy your old Makefile.custom to the new installation before
- doing the build.
- </para>
- <para>
- Alternatively, you can set variables on the <application>make</application>
- command line:
- <synopsis>
- make [ <replaceable>variable</replaceable>=<replaceable class="parameter">value</replaceable> [...] ]
- </synopsis>
- </para>
- <para>
- A few of the many variables that can be specified are:
-
- <variablelist>
- <varlistentry>
- <term>
- <envar>POSTGRESDIR</envar>
- </term>
- <listitem>
- <para>
- Top of the installation tree.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>BINDIR</envar>
- </term>
- <listitem>
- <para>
- Location of applications and utilities.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>LIBDIR</envar>
- </term>
- <listitem>
- <para>
- Location of object libraries, including shared libraries.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>HEADERDIR</envar>
- </term>
- <listitem>
- <para>
- Location of include files.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>ODBCINST</envar>
- </term>
- <listitem>
- <para>
- Location of installation-wide <application>psqlODBC</application>
- (<acronym>ODBC</acronym>) configuration file.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- There are other optional parameters which are not as commonly used.
- Many of those listed below are appropriate when doing
- <application>Postgres</application> server code development.
+ <para>
+ Many installation-related parameters can be set in the building
+ stage of <productname>Postgres</productname> installation.
+ </para>
+
+ <para>
+ In most cases, these parameters should be placed in a file,
+ <filename>Makefile.custom</filename>, intended just for that purpose.
+ The default distribution does not contain this optional file, so you
+ will create it using a text editor of your choice. When upgrading installations,
+ you can simply copy your old Makefile.custom to the new installation before
+ doing the build.
+ </para>
+
+ <para>
+ Alternatively, you can set variables on the <application>make</application>
+ command line:
+
+ <programlisting>
+make [ <replaceable>variable</replaceable>=<replaceable>value</replaceable> [...] ]
+ </programlisting>
+ </para>
+
+ <para>
+ A few of the many variables that can be specified are:
- <variablelist>
- <varlistentry>
- <term>
- <envar>CFLAGS</envar>
- </term>
- <listitem>
- <para>
- Set flags for the C compiler.
- Should be assigned with "+=" to retain relevant default parameters.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>YFLAGS</envar>
- </term>
- <listitem>
- <para>
- Set flags for the yacc/bison parser. <option>-v</option> might be
- used to help diagnose problems building a new parser.
- Should be assigned with "+=" to retain relevant default parameters.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>USE_TCL</envar>
- </term>
- <listitem>
- <para>
- Enable Tcl interface building.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>HSTYLE</envar>
- </term>
- <listitem>
- <para>
- DocBook <acronym>HTML</acronym> style sheets for building the
- documentation from scratch.
- Not used unless you are developing new documentation from the
- DocBook-compatible <acronym>SGML</acronym> source documents in
- <filename>doc/src/sgml/</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <envar>PSTYLE</envar>
- </term>
- <listitem>
- <para>
- DocBook style sheets for building printed documentation from scratch.
- Not used unless you are developing new documentation from the
- DocBook-compatible <acronym>SGML</acronym> source documents in
- <filename>doc/src/sgml/</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- Here is an example <filename>Makefile.custom</filename> for a
- PentiumPro Linux system:
+ <variablelist>
+ <varlistentry>
+ <term>
+ <envar>POSTGRESDIR</envar>
+ </term>
+ <listitem>
+ <para>
+ Top of the installation tree.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>BINDIR</envar>
+ </term>
+ <listitem>
+ <para>
+ Location of applications and utilities.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>LIBDIR</envar>
+ </term>
+ <listitem>
+ <para>
+ Location of object libraries, including shared libraries.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>HEADERDIR</envar>
+ </term>
+ <listitem>
+ <para>
+ Location of include files.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>ODBCINST</envar>
+ </term>
+ <listitem>
+ <para>
+ Location of installation-wide <application>psqlODBC</application>
+ (<acronym>ODBC</acronym>) configuration file.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+ <para>
+ There are other optional parameters which are not as commonly used.
+ Many of those listed below are appropriate when doing
+ <application>Postgres</application> server code development.
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ <envar>CFLAGS</envar>
+ </term>
+ <listitem>
+ <para>
+ Set flags for the C compiler.
+ Should be assigned with "+=" to retain relevant default parameters.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>YFLAGS</envar>
+ </term>
+ <listitem>
+ <para>
+ Set flags for the yacc/bison parser. <option>-v</option> might be
+ used to help diagnose problems building a new parser.
+ Should be assigned with "+=" to retain relevant default parameters.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>USE_TCL</envar>
+ </term>
+ <listitem>
+ <para>
+ Enable Tcl interface building.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>HSTYLE</envar>
+ </term>
+ <listitem>
+ <para>
+ DocBook <acronym>HTML</acronym> style sheets for building the
+ documentation from scratch.
+ Not used unless you are developing new documentation from the
+ DocBook-compatible <acronym>SGML</acronym> source documents in
+ <filename>doc/src/sgml/</filename>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <envar>PSTYLE</envar>
+ </term>
+ <listitem>
+ <para>
+ DocBook style sheets for building printed documentation from scratch.
+ Not used unless you are developing new documentation from the
+ DocBook-compatible <acronym>SGML</acronym> source documents in
+ <filename>doc/src/sgml/</filename>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+
+ <para>
+ Here is an example <filename>Makefile.custom</filename> for a
+ PentiumPro Linux system:
- <programlisting>
+ <programlisting>
# Makefile.custom
# Thomas Lockhart 1999-06-01
HSTYLE= /home/tgl/SGML/db118.d/docbook/html
PSTYLE= /home/tgl/SGML/db118.d/docbook/print
- </programlisting>
- </para>
- </sect1>
- <Sect1>
- <Title>Locale Support</Title>
+ </programlisting>
+ </para>
+ </sect1>
+
+ <sect1>
+ <title>Locale Support</title>
- <Para>
- <Note>
- <Para>
- Written by Oleg Bartunov.
- See <ULink url="http://www.sai.msu.su/~megera/postgres/">Oleg's web page</ULink>
- for additional information on locale and Russian language support.
-
- </Para>
- </Note>
+ <para>
+ <note>
+ <para>
+ Written by Oleg Bartunov.
+ See <ulink url="http://www.sai.msu.su/~megera/postgres/">Oleg's web page</ulink>
+ for additional information on locale and Russian language support.
+
+ </para>
+ </note>
While doing a project for a company in Moscow, Russia,
I encountered the problem that postgresql had no
support of national alphabets. After looking for possible workarounds
I'm not a C-programer but already had some experience with locale programming
when I work with perl
(debugging) and glimpse. After several days of digging through
- the <ProductName>Postgres</ProductName> source tree I made very minor corections to
+ the <productname>Postgres</productname> source tree I made very minor corections to
src/backend/utils/adt/varlena.c and src/backend/main/main.c and got what I needed!
I did support only for
<envar>LC_CTYPE</envar> and <envar>LC_COLLATE</envar>,
and (to my surprise) it was
incorporated into the <productname>Postgres</productname> distribution.
</para>
- <Para>
+ <para>
People often complain that locale doesn't work for them.
There are several common mistakes:
- <ItemizedList>
- <ListItem>
- <Para>
+ <itemizedlist>
+ <listitem>
+ <para>
Didn't properly configure postgresql before compilation.
You must run configure with --enable-locale option to enable locale support.
Didn't setup environment correctly when starting postmaster.
I use following shell script
(runpostgres):
- <ProgramListing>
+ <programlisting>
#!/bin/sh
export LC_CTYPE=koi8-r
export LC_COLLATE=koi8-r
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
- </ProgramListing>
+ </programlisting>
and run it from rc.local as
- <ProgramListing>
+ <programlisting>
/bin/su - postgres -c "/home/postgres/runpostgres"
- </ProgramListing>
+ </programlisting>
- </Para>
- </ListItem>
- <ListItem>
- <Para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
Broken locale support in OS (for example, locale support in libc
under Linux several times has changed
and this caused a lot of problems). Latest perl has also support of
perl: warning: Falling back to the standard locale ("C").
</programlisting>
- </Para>
- </ListItem>
- <ListItem>
- <Para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
Wrong location of locale files!
Possible locations include:
Under Linux I did a symbolic link between <filename>/usr/lib/locale</filename> and
<filename>/usr/share/locale</filename> to be sure that
the next libc will not break my locale.
- </Para>
- </ListItem>
- </ItemizedList>
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
- <Sect2>
- <Title>What are the Benefits?</Title>
+ <sect2>
+ <title>What are the Benefits?</title>
- <Para>
+ <para>
You can use ~* and order by operators for strings contain characters
from national alphabets. Non-english users
definitely need that. If you won't use locale stuff just undefine
</para>
</sect2>
- <Sect2>
- <Title>What are the Drawbacks?</Title>
+ <sect2>
+ <title>What are the Drawbacks?</title>
- <Para>
+ <para>
There is one evident drawback of using locale - its speed!
So, use locale only if you really need it.
</para>
</sect2>
</sect1>
- <Sect1>
- <Title>Kerberos Authentication</Title>
+ <sect1>
+ <title>Kerberos Authentication</title>
- <Para>
+ <para>
<productname>Kerberos</productname> is an industry-standard secure authentication
system suitable for distributed computing over a public network.
</para>
<para>
The
<productname>Kerberos</productname>
- authentication system is not distributed with <Productname>Postgres</Productname>. Versions of
+ authentication system is not distributed with <productname>Postgres</productname>. Versions of
<productname>Kerberos</productname>
are typically available as optional software from operating system
vendors. In addition, a source code distribution may be obtained through
Note that <acronym>FAQL</acronym>s
(Frequently-Asked Questions Lists) are periodically posted to the
- <ulink url="mailto:kerberos@ATHENA.MIT.EDU"><productname>Kerberos</productname> mailing list</ulink>
+ <ulink url="mailto:kerberos@athena.mit.edu"><productname>Kerberos</productname> mailing list</ulink>
(send
- <ulink url="mailto:kerberos-request@ATHENA.MIT.EDU">mail to subscribe</ulink>),
+ <ulink url="mailto:kerberos-request@athena.mit.edu">mail to subscribe</ulink>),
and
<ulink url="news:comp.protocols.kerberos">USENET news group</ulink>.
</para>
is somehow readable by the <productname>Postgres</productname> account.
</para>
<para>
- <Productname>Postgres</Productname> and its clients can be compiled to use
+ <productname>Postgres</productname> and its clients can be compiled to use
either Version 4 or Version 5 of the MIT
<productname>Kerberos</productname>
protocols by setting the
<envar>KRBVERS</envar>
variable in the file <filename>src/Makefile.global</filename> to the
appropriate value. You can also change the location where
- <Productname>Postgres</Productname>
+ <productname>Postgres</productname>
expects to find the associated libraries, header files and its own
server key file.
</para>
<para>
- After compilation is complete, <Productname>Postgres</Productname>
+ After compilation is complete, <productname>Postgres</productname>
must be registered as a <productname>Kerberos</productname>
service. See the
<citetitle>Kerberos Operations Notes</citetitle>
<title>Operation</title>
<para>
- After initial installation, <Productname>Postgres</Productname>
+ After initial installation, <productname>Postgres</productname>
should operate in all ways as a normal
<productname>Kerberos</productname>
service. For details on the use of authentication, see the
<listitem>
<para>
User principal names (anames) are assumed to
- contain the actual Unix/<Productname>Postgres</Productname> user name
+ contain the actual Unix/<productname>Postgres</productname> user name
in the first component.
</para>
</listitem>
<listitem>
<para>
- The <Productname>Postgres</Productname> service is assumed to be have two components,
+ The <productname>Postgres</productname> service is assumed to be have two components,
the service name and a hostname, canonicalized as in Version 4 (i.e., with all domain
suffixes removed).
</para>
</itemizedlist>
</para>
+
<para>
<table tocentry="1">
<title>Kerberos Parameter Examples</title>
</sect2>
</sect1>
</chapter>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode:sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"./reference.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:("/usr/lib/sgml/catalog")
+sgml-local-ecat-files:nil
+End:
+-->
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.7 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.8 2000/05/02 20:01:51 thomas Exp $
CVS code repository
Thomas Lockhart
-->
1.6
</programlisting>
- then the tag <quote><literal>TAG</literal></quote> will reference
+ then the tag "<literal>TAG</literal>" will reference
file1-1.2, file2-1.3, etc.
<note>
who are actively maintaining the code base originally developed by
<ulink
url="http://www.research.digital.com/SRC/modula-3/html/home.html">the DEC Systems Research Center</ulink>.
- The <quote>PM3</quote> <productname>RPM</productname> distribution is roughly
+ The <productname>PM3</productname> <productname>RPM</productname> distribution is roughly
30MB compressed. At the time of writing, the 1.1.10-1 release
installed cleanly on RH-5.2, whereas the 1.1.11-1 release is
apparently built for another release (RH-6.0?) and does not run on RH-5.2.
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.29 2000/04/14 15:08:56 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.30 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="datatype">
<note>
<para>
- The original <productname>Postgres</productname> v4.2 code received from
- Berkeley rounded all double precision floating point results to six digits for
- output. Starting with v6.1, floating point numbers are allowed to retain
+ Floating point numbers are allowed to retain
most of the intrinsic precision of the type (typically 15 digits for doubles,
6 digits for 4-byte floats).
Other types with underlying floating point fields (e.g. geometric
<title>Numeric Types</title>
<para>
- Numeric types consist of two- and four-byte integers and four- and eight-byte
- floating point numbers.
+ Numeric types consist of two- and four-byte integers, four- and eight-byte
+ floating point numbers and fixed-precision decimals.
</para>
<para>
<entry>decimal</entry>
<entry>variable</entry>
<entry>User-specified precision</entry>
- <entry>no limit</entry>
+ <entry>~8000 digits</entry>
</row>
<row>
<entry>float4</entry>
<title>Date/Time Types</title>
<para>
- <productname>PostgreSQL</productname> supports the full set of
+ <productname>Postgres</productname> supports the full set of
<acronym>SQL</acronym> date and time types.
</para>
<para>
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Date/Time Types</title>
+ <title><productname>Postgres</productname> Date/Time Types</title>
<titleabbrev>Date/Time</titleabbrev>
<tgroup cols="4">
<thead>
<tbody>
<row>
<entry><type>timestamp</type></entry>
- <entry>for data containing both date and time</entry>
+ <entry>both date and time</entry>
<entry>8 bytes</entry>
<entry>4713 BC</entry>
<entry>AD 1465001</entry>
</row>
<row>
<entry><type>timestamp with time zone</type></entry>
- <entry>date and time including time zone</entry>
+ <entry>date and time with time zone</entry>
<entry>8 bytes</entry>
<entry>1903 AD</entry>
<entry>2037 AD</entry>
</row>
<row>
<entry><type>date</type></entry>
- <entry>for data containing only dates</entry>
+ <entry>dates only</entry>
<entry>4 bytes</entry>
<entry>4713 BC</entry>
<entry>32767 AD</entry>
</row>
<row>
<entry><type>time</type></entry>
- <entry>for data containing only times of the day</entry>
+ <entry>times of day only</entry>
<entry>4 bytes</entry>
<entry>00:00:00.00</entry>
<entry>23:59:59.99</entry>
</row>
<row>
<entry><type>time with time zone</type></entry>
- <entry>times of the day</entry>
+ <entry>times of day only</entry>
<entry>4 bytes</entry>
<entry>00:00:00.00+12</entry>
<entry>23:59:59.99-12</entry>
<note>
<para>
- To ensure compatibility to earlier versions of <productname>PostgreSQL</productname>
+ To ensure compatibility to earlier versions of <productname>Postgres</productname>
we also continue to provide <type>datetime</type> (equivalent to <type>timestamp</type>) and
- <type>timespan</type> (equivalent to <type>interval</type>). The types <type>abstime</type>
+ <type>timespan</type> (equivalent to <type>interval</type>),
+ however support for these is now restricted to having an
+ implicit translation to <type>timestamp</type> and
+ <type>interval</type>.
+ The types <type>abstime</type>
and <type>reltime</type> are lower precision types which are used internally.
You are discouraged from using any of these types in new
applications and are encouraged to move any old
- ones over when appropriate. Any or all of these types might disappear in a future release.
+ ones over when appropriate. Any or all of these internal types might disappear in a future release.
</para>
</note>
</para>
<acronym>ISO-8601</acronym>, <acronym>SQL</acronym>-compatible,
traditional <productname>Postgres</productname>, and others.
The ordering of month and day in date input can be ambiguous, therefore a setting
- exists to specify how it should be interpreted. The command
+ exists to specify how it should be interpreted in ambiguous cases. The command
<literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal>
- specifies the variant <quote>month before day</quote>, the command
+ specifies the variant "month before day", the command
<literal>SET DateStyle TO 'European'</literal> sets the variant
- <quote>day before month</quote>. The <literal>ISO</literal> style
+ "day before month". The <literal>ISO</literal> style
is the default but this default can be changed at compile time or at run time.
</para>
The following are possible inputs for the <type>date</type> type.
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Date Input</title>
+ <title><productname>Postgres</productname> Date Input</title>
<titleabbrev>Date Inputs</titleabbrev>
<tgroup cols="2">
<thead>
<entry>1/18/1999</entry>
<entry>US; read as January 18 in any mode</entry>
</row>
- <row>
- <entry>1999.008</entry>
- <entry>Year and day of year</entry>
- </row>
<row>
<entry>19990108</entry>
<entry>ISO-8601 year, month, day</entry>
</row>
<row>
<entry>January 8, 99 BC</entry>
- <entry>Year 99 before the common era</entry>
+ <entry>Year 99 before the Common Era</entry>
</row>
</tbody>
</tgroup>
<para>
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Month Abbreviations</title>
+ <title><productname>Postgres</productname> Month Abbreviations</title>
<titleabbrev>Month Abbreviations</titleabbrev>
<tgroup cols="2">
<thead>
<para>
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Day of Week Abbreviations</title>
+ <title><productname>Postgres</productname> Day of Week Abbreviations</title>
<titleabbrev>Day of Week Abbreviations</titleabbrev>
<tgroup cols="2">
<thead>
The following are valid <type>time</type> inputs.
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Time Input</title>
+ <title><productname>Postgres</productname> Time Input</title>
<titleabbrev>Time Inputs</titleabbrev>
<tgroup cols="2">
<thead>
<sect3>
<title>time with time zone</title>
+
<para>
This type is defined by SQL92, but the definition exhibits
- fundamental deficiencies which renders the type near useless. In
+ fundamental deficiencies which renders the type nearly useless. In
most cases, a combination of <type>date</type>,
- <type>time</type>, and <type>timestamp with time zone</type>
+ <type>time</type>, and <type>timestamp</type>
should provide a complete range of date/time functionality
- required by an application.
+ required by any application.
</para>
<para>
as follows:
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Time With Time
+ <title><productname>Postgres</productname> Time With Time
Zone Input</title>
<titleabbrev>Time With Time Zone Inputs</titleabbrev>
<tgroup cols="2">
<sect3>
<title>timestamp</title>
- <para>
- Valid input for the <type>timestamp</type> type consists of a concatenation
- of a date and a time, followed by an optional <literal>AD</literal> or
- <literal>BC</literal>, followed by an optional time zone. (See below.)
- Thus
-<programlisting>
+
+ <para>
+ Valid input for the <type>timestamp</type> type consists of a concatenation
+ of a date and a time, followed by an optional <literal>AD</literal> or
+ <literal>BC</literal>, followed by an optional time zone. (See below.)
+ Thus
+
+ <programlisting>
1999-01-08 04:05:06 -8:00
-</programlisting>
- is a valid <type>timestamp</type> value, which is <acronym>ISO</acronym>-compliant.
- In addition, the wide-spread format
-<programlisting>
+ </programlisting>
+
+ is a valid <type>timestamp</type> value, which is <acronym>ISO</acronym>-compliant.
+ In addition, the wide-spread format
+
+ <programlisting>
January 8 04:05:06 1999 PST
-</programlisting>
- is supported.
- </para>
+ </programlisting>
+ is supported.
+ </para>
- <para>
- <table tocentry="1" id="timezone">
- <title id="timezone-title"><productname>PostgreSQL</productname> Time Zone Input</title>
- <titleabbrev>Time Zone Inputs</titleabbrev>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Time Zone</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>PST</entry>
- <entry>Pacific Standard Time</entry>
- </row>
- <row>
- <entry>-8:00</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- <row>
- <entry>-800</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- <row>
- <entry>-8</entry>
- <entry>ISO-8601 offset for PST</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
+ <para>
+ <table tocentry="1" id="timezone">
+ <title id="timezone-title"><productname>Postgres</productname> Time Zone Input</title>
+ <titleabbrev>Time Zone Inputs</titleabbrev>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Time Zone</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PST</entry>
+ <entry>Pacific Standard Time</entry>
+ </row>
+ <row>
+ <entry>-8:00</entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ <row>
+ <entry>-800</entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ <row>
+ <entry>-8</entry>
+ <entry>ISO-8601 offset for PST</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
</sect3>
<sect3>
<title>interval</title>
+
<para>
<type>interval</type>s can be specified with the following syntax:
-<programlisting>
+
+ <programlisting>
Quantity Unit [Quantity Unit...] [Direction]
@ Quantity Unit [Direction]
-</programlisting>
- where: <literal>Quantity</literal> is ..., <literal>-1</literal>,
- <literal>0</literal>, <literal>1</literal>, <literal>2</literal>, ...;
- <literal>Unit</literal> is <literal>second</literal>,
- <literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
- <literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
- <literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>,
- or abbreviations or plurals of these units;
- <literal>Direction</literal> can be <literal>ago</literal> or
- empty.
- </para>
- </sect3>
+ </programlisting>
+
+ where: <literal>Quantity</literal> is ..., <literal>-1</literal>,
+ <literal>0</literal>, <literal>1</literal>, <literal>2</literal>, ...;
+ <literal>Unit</literal> is <literal>second</literal>,
+ <literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
+ <literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
+ <literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>,
+ or abbreviations or plurals of these units;
+ <literal>Direction</literal> can be <literal>ago</literal> or
+ empty.
+ </para>
+ </sect3>
<sect3>
- <title>Special values</title>
- <para>
- The following <acronym>SQL</acronym>-compatible functions can be used as date or time
- input for the corresponding datatype: <literal>CURRENT_DATE</literal>,
- <literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
- </para>
- <para>
- <productname>PostgreSQL</productname> also supports several special constants for
- convenience.
+ <title>Special values</title>
+
+ <para>
+ The following <acronym>SQL</acronym>-compatible functions can be used as date or time
+ input for the corresponding datatype: <literal>CURRENT_DATE</literal>,
+ <literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
+ </para>
+ <para>
+ <productname>Postgres</productname> also supports several special constants for
+ convenience.
<table tocentry="1">
- <title><productname>PostgresSQL</productname> Special Date/Time Constants</title>
+ <title><productname>Postgres</productname> Special Date/Time Constants</title>
<titleabbrev>Constants</titleabbrev>
<tgroup cols="2">
<thead>
The default is the <acronym>ISO</acronym> format.
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Date/Time Output Styles</title>
+ <title><productname>Postgres</productname> Date/Time Output Styles</title>
<titleabbrev>Styles</titleabbrev>
<tgroup cols="3">
<thead>
<para>
The output of the <type>date</type> and <type>time</type> styles is of course
- only the date or time part in accordance with the above examples
+ only the date or time part in accordance with the above examples.
</para>
<para>
at Date/Time Input, how this setting affects interpretation of input values.)
<table tocentry="1">
- <title><productname>PostgreSQL</productname> Date Order Conventions</title>
- <titleabbrev>Order</titleabbrev>
+ <title><productname>Postgres</productname> Date Order Conventions</title>
+ <titleabbrev>Date Order</titleabbrev>
<tgroup cols="3">
<thead>
<row>
<entry>Style Specification</entry>
+ <entry>Description</entry>
<entry>Example</entry>
</row>
</thead>
<tbody>
<row>
<entry>European</entry>
+ <entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
<entry>17/12/1997 15:37:16.00 MET</entry>
</row>
<row>
<entry>US</entry>
+ <entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry>
<entry>12/17/1997 07:37:16.00 PST</entry>
</row>
</tbody>
</para>
<para>
- <type>interval</type> output looks like the input format, expect that units like
+ <type>interval</type> output looks like the input format, except that units like
<literal>week</literal> or <literal>century</literal> are converted to years and days.
In ISO mode the output looks like
+
<programlisting>
[ Quantity Units [ ... ] ] [ Days ] Hours:Minutes [ ago ]
</programlisting>
<title>Time Zones</title>
<para>
- <productname>PostgreSQL</productname> endeavors to be compatible with
+ <productname>Postgres</productname> endeavors to be compatible with
<acronym>SQL92</acronym> definitions for typical usage.
However, the <acronym>SQL92</acronym> standard has an odd mix of date and
time types and capabilities. Two obvious problems are:
</para>
<para>
- To address these difficulties, <productname>PostgreSQL</productname>
+ To address these difficulties, <productname>Postgres</productname>
associates time zones only with date and time
types which contain both date and time,
and assumes local time for any type containing only
</para>
<para>
- <productname>PostgreSQL</productname> obtains time zone support
+ <productname>Postgres</productname> obtains time zone support
from the underlying operating system for dates between 1902 and
2038 (near the typical date limits for Unix-style
systems). Outside of this range, all dates are assumed to be
<title>Internals</title>
<para>
- <productname>PostgreSQL</productname> uses Julian dates
+ <productname>Postgres</productname> uses Julian dates
for all date/time calculations. They have the nice property of correctly
predicting/calculating any date more recent than 4713BC
to far into the future, using the assumption that the length of the
<para>
<type>point</type> is specified using the following syntax:
- <programlisting>
-( x , y )
- x , y
-where
- x is the x-axis coordinate as a floating point number
- y is the y-axis coordinate as a floating point number
- </programlisting>
+ <synopsis>
+( <replaceable>x</replaceable> , <replaceable>y</replaceable> )
+ <replaceable>x</replaceable> , <replaceable>y</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term><replaceable>x</replaceable></term>
+ <listitem>
+ <para>
+ The x-axis coordinate as a floating point number.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable>y</replaceable></term>
+ <listitem>
+ <para>
+ The y-axis coordinate as a floating point number.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
</sect2>
<para>
<type>lseg</type> is specified using the following syntax:
- <programlisting>
-( ( x1 , y1 ) , ( x2 , y2 ) )
- ( x1 , y1 ) , ( x2 , y2 )
- x1 , y1 , x2 , y2
-where
- (x1,y1) and (x2,y2) are the endpoints of the segment
- </programlisting>
+
+ <synopsis>
+( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
+ <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</term>
+ <term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
+ <listitem>
+ <para>
+ The endpoints of the line segment.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
</sect2>
<para>
<type>box</type> is specified using the following syntax:
- <programlisting>
-( ( x1 , y1 ) , ( x2 , y2 ) )
- ( x1 , y1 ) , ( x2 , y2 )
- x1 , y1 , x2 , y2
-where
- (x1,y1) and (x2,y2) are opposite corners
- </programlisting>
+ <synopsis>
+( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
+ <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</term>
+ <term>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</term>
+ <listitem>
+ <para>
+ Opposite corners of the box.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
Boxes are output using the first syntax.
The corners are reordered on input to store
the lower left corner first and the upper right corner last.
<function>isopen(p)</function>
and
<function>isclosed(p)</function>
- are supplied to select either type in a query.
+ are supplied to test for either type in a query.
</para>
<para>
<type>path</type> is specified using the following syntax:
- <programlisting>
-( ( x1 , y1 ) , ... , ( xn , yn ) )
-[ ( x1 , y1 ) , ... , ( xn , yn ) ]
- ( x1 , y1 ) , ... , ( xn , yn )
- ( x1 , y1 , ... , xn , yn )
- x1 , y1 , ... , xn , yn
-where
- (x1,y1),...,(xn,yn) are points 1 through n
- a leading "[" indicates an open path
- a leading "(" indicates a closed path
- </programlisting>
+ <synopsis>
+( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
+[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) ]
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
+ <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
+ <listitem>
+ <para>
+ Endpoints of the line segments comprising the path.
+ A leading square bracket ("[") indicates an open path, while
+ a leading parenthesis ("(") indicates a closed path.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
Paths are output using the first syntax.
Note that <productname>Postgres</productname> versions prior to
v6.1 used a format for paths which had a single leading parenthesis,
<para>
<type>polygon</type> is specified using the following syntax:
- <programlisting>
-( ( x1 , y1 ) , ... , ( xn , yn ) )
- ( x1 , y1 ) , ... , ( xn , yn )
- ( x1 , y1 , ... , xn , yn )
- x1 , y1 , ... , xn , yn
-where
- (x1,y1),...,(xn,yn) are points 1 through n
- </programlisting>
+ <synopsis>
+( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
+ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
+ <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
+ <listitem>
+ <para>
+ Endpoints of the line segments comprising the boundary of the
+ polygon.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
Polygons are output using the first syntax.
Note that <productname>Postgres</productname> versions prior to
v6.1 used a format for polygons which had a single leading parenthesis, the list
- of x-axis coordinates, the list of y-axis coordinates,
+ of x-axis coordinates, the list of y-axis coordinates,
followed by a closing parenthesis.
The built-in function <function>upgradepoly</function> is supplied to convert
polygons dumped and reloaded from pre-v6.1 databases.
<para>
<type>circle</type> is specified using the following syntax:
- <programlisting>
-< ( x , y ) , r >
-( ( x , y ) , r )
- ( x , y ) , r
- x , y , r
-where
- (x,y) is the center of the circle
- r is the radius of the circle
- </programlisting>
+ <synopsis>
+< ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> >
+( ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable> )
+ ( <replaceable>x</replaceable> , <replaceable>y</replaceable> ) , <replaceable>r</replaceable>
+ <replaceable>x</replaceable> , <replaceable>y</replaceable> , <replaceable>r</replaceable>
+ </synopsis>
+
+ where the arguments are
+
+ <variablelist>
+ <varlistentry>
+ <term>(<replaceable>x</replaceable>,<replaceable>y</replaceable>)</term>
+ <listitem>
+ <para>
+ Center of the circle.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable>r</replaceable></term>
+ <listitem>
+ <para>
+ Radius of the circle.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
Circles are output using the first syntax.
</para>
</sect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.8 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.9 2000/05/02 20:01:51 thomas Exp $
Date/time details
-->
</para>
<para>
- <quote>Julian Day</quote> is different from <quote>Julian Date</quote>.
+ "Julian Day" is different from "Julian Date".
The Julian calendar was introduced by Julius Caesar in 45 BC. It was
in common use until the 1582, when countries started changing to the
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.10 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="dfunc">
<para>
-<!--
-.SH "Compiling Dynamically-Loaded C Functions"
-.PP
-Different operating systems require different procedures for compiling
-C source files so that Postgres can load them dynamically. This section
-discusses the required compiler and loader options on each system.
-.PP
-Under Linux ELF, object files can be generated by specifing the compiler
-flag -fpic.
-.PP
-Under Ultrix, all object files that Postgres is expected to load
-dynamically must be compiled using
-.IR /bin/cc
-with the \*(lq-G 0\*(rq option turned on. The object file name in the
-.IR as
-clause should end in \*(lq.o\*(rq.
-.PP
-Under HP-UX, DEC OSF/1, AIX and SunOS 4, all object files must be
-turned into
-.IR "shared libraries"
-using the operating system's native object file loader,
-.IR ld(1).
-.PP
-Under HP-UX, an object file must be compiled using the native HP-UX C
-compiler,
-.IR /bin/cc ,
-with both the \*(lq+z\*(rq and \*(lq+u\*(rq flags turned on. The
-first flag turns the object file into \*(lqposition-independent
-code\*(rq (PIC); the second flag removes some alignment restrictions
-that the PA-RISC architecture normally enforces. The object file must
-then be turned into a shared library using the HP-UX loader,
-.IR /bin/ld .
-The command lines to compile a C source file, \*(lqfoo.c\*(rq, look
-like:
-.nf
-cc <other flags> +z +u -c foo.c
-ld <other flags> -b -o foo.sl foo.o
-.fi
-The object file name in the
-.BR as
-clause should end in \*(lq.sl\*(rq.
-.PP
-An extra step is required under versions of HP-UX prior to 9.00. If
-the Postgres header file
-.nf
-include/c.h
-.fi
-is not included in the source file, then the following line must also
-be added at the top of every source file:
-.nf
-#pragma HP_ALIGN HPUX_NATURAL_S500
-.fi
-However, this line must not appear in programs compiled under HP-UX
-9.00 or later.
-.PP
-Under DEC OSF/1, an object file must be compiled and then turned
-into a shared library using the OSF/1 loader,
-.IR /bin/ld .
-In this case, the command lines look like:
-.nf
-cc <other flags> -c foo.c
-ld <other flags> -shared -expect_unresolved '*' -o foo.so foo.o
-.fi
-The object file name in the
-.BR as
-clause should end in \*(lq.so\*(rq.
-.PP
-Under SunOS 4, an object file must be compiled and then turned into a
-shared library using the SunOS 4 loader,
-.IR /bin/ld .
-The command lines look like:
-.nf
-cc <other flags> -PIC -c foo.c
-ld <other flags> -dc -dp -Bdynamic -o foo.so foo.o
-.fi
-The object file name in the
-.BR as
-clause should end in \*(lq.so\*(rq.
-.PP
-Under AIX, object files are compiled normally but building the shared
-library requires a couple of steps. First, create the object file:
-.nf
-cc <other flags> -c foo.c
-.fi
-You must then create a symbol \*(lqexports\*(rq file for the object
-file:
-.nf
-mkldexport foo.o `pwd` > foo.exp
-.fi
-Finally, you can create the shared library:
-.nf
-ld <other flags> -H512 -T512 -o foo.so -e _nostart \e
- -bI:.../lib/postgres.exp -bE:foo.exp foo.o \e
- -lm -lc 2>/dev/null
-.fi
-You should look at the Postgres User's Manual for an explanation of this
-procedure.
--->
-
After you have created and registered a user-defined
function, your work is essentially done.
<productname>Postgres</productname>,
describes how to perform the compilation and
link-editing required before you can load your user-defined
functions into a running <productname>Postgres</productname> server.
- Note that
- this process has changed as of Version 4.2.
</para>
<!--
You should expect to read (and reread, and re-reread) the
manual pages for the C compiler, cc(1), and the link
editor, ld(1), if you have specific questions. In
- addition, the regression test suites in the directory
- <filename>PGROOT/src/regress</filename> contain several
- working examples of this process. If you copy what these
- tests do, you should not have any problems.
+ addition, the contrib area (<filename>PGROOT/contrib</filename>)
+ and the regression test suites in the directory
+ <filename>PGROOT/src/test/regress</filename> contain several
+ working examples of this process. If you copy an example then
+ you should not have any problems.
</para>
<para>
</itemizedlist>
</para>
+ <sect1>
+ <title>Linux</title>
+
+ <para>
+ Under Linux ELF, object files can be generated by specifying the compiler
+ flag -fpic.
+ </para>
+
+ <para>
+ For example,
+ <programlisting>
+# simple Linux example
+% cc -fpic -c <replaceable>foo.c</replaceable>
+ </programlisting>
+
+ produces an object file called <replaceable>foo.o</replaceable>
+ that can then be
+ dynamically loaded into <productname>Postgres</productname>.
+ No additional loading or link-editing must be performed.
+ </para>
+ </sect1>
+
+<!--
<sect1>
<title><acronym>ULTRIX</acronym></title>
No additional loading or link-editing must be performed.
</para>
</sect1>
+-->
<sect1>
<title><acronym>DEC OSF/1</acronym></title>
file with special compiler flags and a shared library
must be produced.
The necessary steps with HP-UX are as follows. The +z
- flag to the HP-UX C compiler produces so-called
- "Position Independent Code" (PIC) and the +u flag
- removes
+ flag to the HP-UX C compiler produces
+ <firstterm>Position Independent Code</firstterm> (PIC)
+ and the +u flag removes
some alignment restrictions that the PA-RISC architecture
normally enforces. The object file must be turned
into a shared library using the HP-UX link editor with
the -b option. This sounds complicated but is actually
very simple, since the commands to do it are just:
+
<programlisting>
# simple HP-UX example
% cc +z +u -c foo.c
command line.
</para>
</sect1>
+
+ <!--
+ Future integration: Create separate sections for these operating
+ systems and integrate the info from this old man page.
+ - thomas 2000-04-21
+
+Under HP-UX, DEC OSF/1, AIX and SunOS 4, all object files must be
+turned into
+.IR "shared libraries"
+using the operating system's native object file loader,
+.IR ld(1).
+.PP
+Under HP-UX, an object file must be compiled using the native HP-UX C
+compiler,
+.IR /bin/cc ,
+with both the \*(lq+z\*(rq and \*(lq+u\*(rq flags turned on. The
+first flag turns the object file into \*(lqposition-independent
+code\*(rq (PIC); the second flag removes some alignment restrictions
+that the PA-RISC architecture normally enforces. The object file must
+then be turned into a shared library using the HP-UX loader,
+.IR /bin/ld .
+The command lines to compile a C source file, \*(lqfoo.c\*(rq, look
+like:
+.nf
+cc <other flags> +z +u -c foo.c
+ld <other flags> -b -o foo.sl foo.o
+.fi
+The object file name in the
+.BR as
+clause should end in \*(lq.sl\*(rq.
+.PP
+An extra step is required under versions of HP-UX prior to 9.00. If
+the Postgres header file
+.nf
+include/c.h
+.fi
+is not included in the source file, then the following line must also
+be added at the top of every source file:
+.nf
+#pragma HP_ALIGN HPUX_NATURAL_S500
+.fi
+However, this line must not appear in programs compiled under HP-UX
+9.00 or later.
+.PP
+Under DEC OSF/1, an object file must be compiled and then turned
+into a shared library using the OSF/1 loader,
+.IR /bin/ld .
+In this case, the command lines look like:
+.nf
+cc <other flags> -c foo.c
+ld <other flags> -shared -expect_unresolved '*' -o foo.so foo.o
+.fi
+The object file name in the
+.BR as
+clause should end in \*(lq.so\*(rq.
+.PP
+Under SunOS 4, an object file must be compiled and then turned into a
+shared library using the SunOS 4 loader,
+.IR /bin/ld .
+The command lines look like:
+.nf
+cc <other flags> -PIC -c foo.c
+ld <other flags> -dc -dp -Bdynamic -o foo.so foo.o
+.fi
+The object file name in the
+.BR as
+clause should end in \*(lq.so\*(rq.
+.PP
+Under AIX, object files are compiled normally but building the shared
+library requires a couple of steps. First, create the object file:
+.nf
+cc <other flags> -c foo.c
+.fi
+You must then create a symbol \*(lqexports\*(rq file for the object
+file:
+.nf
+mkldexport foo.o `pwd` > foo.exp
+.fi
+Finally, you can create the shared library:
+.nf
+ld <other flags> -H512 -T512 -o foo.so -e _nostart \e
+ -bI:.../lib/postgres.exp -bE:foo.exp foo.o \e
+ -lm -lc 2>/dev/null
+.fi
+You should look at the Postgres User's Manual for an explanation of this
+procedure.
+
+ -->
+
</chapter>
<!-- Keep this comment at the end of the file
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.25 2000/02/02 16:22:45 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.26 2000/05/02 20:01:51 thomas Exp $
Documentation Guide
Thomas Lockhart
-
-Revision 1.15 1999/05/27 15:49:07 thomas
-Markup fixes.
-Update for v6.5 release.
-
-Revision 1.12 1998/12/18 16:17:29 thomas
-Include more details on editing with Emacs.
-Remove mention of the old "migration" flat files.
-Change URLs for resources to point to areas, not particular files.
- That way things stay correct even when version of tools change.
- Suggested by Vince Vielhaber.
-
-Revision 1.11 1998/10/30 19:36:57 thomas
-Minor editing and markup changes as a result of preparing the Postscript
- documentation for v6.4.
-Bigger updates to the installation instructions (install and config).
-
-Revision 1.8 1998/08/17 16:17:07 thomas
-Bring document list closer to up to day.
-Add a note on sgml-tools that they are now working with jade and so
- may become the toolset of choice in the future.
-
-->
<appendix label="DG2" id="docguide">
<para>
The purpose of documentation is to make <productname>Postgres</productname>
- easier to learn, use, and develop.
+ easier to learn, use, and extend..
The documentation set should describe the <productname>Postgres</productname>
system, language, and interfaces.
It should be able to answer
formats:
<itemizedlist>
- <listitem><para>
+ <listitem>
+ <para>
Plain text for pre-installation information.
- </para></listitem>
- <listitem><para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<acronym>HTML</acronym>, for on-line browsing and reference.
- </para></listitem>
- <listitem><para>
- Hardcopy, for in-depth reading and reference.
- </para></listitem>
- <listitem><para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Hardcopy (Postscript or PDF), for in-depth reading and reference.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<acronym>man pages</acronym>, for quick reference.
- </para></listitem>
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect1>
<sect1>
- <title>Hardcopy Generation for v6.5</title>
+ <title>Hardcopy Generation for v7.0</title>
<para>
The hardcopy Postscript documentation is generated by converting the
<step performance="required">
<para>
- Export the result as <quote>ASCII Layout</quote>.
+ Export the result as "ASCII Layout".
</para>
</step>
<step performance="required">
<para>
Using emacs or vi, clean up the tabular information in
- <filename>INSTALL</filename>. Remove the <quote>mailto</quote>
+ <filename>INSTALL</filename>. Remove the "mailto"
<acronym>URLs</acronym> for the porting contributors to shrink
the column heights.
</para>
<para>
Several areas are addressed while generating Postscript
- hardcopy.
+ hardcopy, including RTF repair, ToC generation, and page break
+ adjustments.
</para>
<procedure>
<title>Applixware <acronym>RTF</acronym> Cleanup</title>
<para>
- Applixware does not seem to do a complete job of importing <acronym>RTF</acronym>
- generated by jade/MSS. In particular, all text is given the
- <quote>Header1</quote> style attribute label, although the text
- formatting itself is acceptable. Also, the Table of Contents page
- numbers do not refer to the section listed in the table, but rather
- refer to the page of the ToC itself.</para>
+ <application>jade</application>, an integral part of the
+ hardcopy procedure, omits specifying a default style for body
+ text. In the past, this undiagnosed problem led to a long process
+ of Table of Contents (ToC) generation. However, with great help
+ from the ApplixWare folks the symptom was diagnosed and a
+ workaround is available.
+ </para>
<step performance="required">
<para>
</para>
</step>
- <step performance="required">
- <para>
- Open a new document in <productname>Applix Words</productname> and
- then import the <acronym>RTF</acronym> file.
- </para>
- </step>
<step performance="required">
<para>
- Print out the existing Table of Contents, to mark up in the following
- few steps.
+ Repair the RTF file to correctly specify all
+ styles, in particular the default style. The field can be added
+ using <application>vi</application> or the following small
+ <application>sed</application> procedure:
+
+ <programlisting>
+#!/bin/sh
+# fixrtf.sh
+# Utility to repair slight damage in RTF files generated by jade
+#
+for i in $* ; do
+ mv $i $i.orig
+ cat $i.orig | sed 's#\\stylesheet#\\stylesheet{\\s0 Normal;}#' > $i
+done
+
+exit
+ </programlisting>
+
+ where the script is adding <literal>{\s0 Normal;}</literal> as
+ the zero-th style in the document. According to ApplixWare, the
+ RTF standard would prohibit adding an implicit zero-th style,
+ though M$Word happens to handle this case.
</para>
</step>
<step performance="required">
<para>
- Insert figures into the document. Center each figure on the page using
- the centering margins button.</para>
-
- <para>
- Not all documents have figures.
- You can grep the <acronym>SGML</acronym> source files for
- the string <quote>graphic</quote> to identify those parts of the
- documentation which may have figures. A few figures are replicated in
- various parts of the documentation.
+ Open a new document in <productname>Applix Words</productname> and
+ then import the <acronym>RTF</acronym> file.
</para>
</step>
<step performance="required">
<para>
- Work through the document, adjusting page breaks and table column
- widths.
+ Generate a new ToC using ApplixWare.
</para>
+
+ <substeps>
+ <step>
+ <para>
+ Select the existing ToC lines, from the beginning of the first
+ character on the first line to the last character of the last
+ line.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Build a new ToC using
+ <literal>Tools.BookBuilding.CreateToC</literal>. Select the
+ first three levels of headers for inclusion in the ToC.
+ This will
+ replace the existing lines imported in the RTF with a native
+ ApplixWare ToC.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Adjust the ToC formatting by using
+ <literal>Format.Style</literal>, selecting each of the three
+ ToC styles, and adjusting the indents for <literal>First</literal> and
+ <literal>Left</literal>. Use the following values:
+
+ <table>
+ <title>Indent Formatting for Table of Contents</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ Style
+ </entry>
+ <entry>
+ First Indent (inches)
+ </entry>
+ <entry>
+ Left Indent (inches)
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <literal>TOC-Heading 1</literal>
+ </entry>
+ <entry>
+ <literal>0.6</literal>
+ </entry>
+ <entry>
+ <literal>0.6</literal>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal>TOC-Heading 2</literal>
+ </entry>
+ <entry>
+ <literal>1.0</literal>
+ </entry>
+ <entry>
+ <literal>1.0</literal>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal>TOC-Heading 3</literal>
+ </entry>
+ <entry>
+ <literal>1.4</literal>
+ </entry>
+ <entry>
+ <literal>1.4</literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </step>
+ </substeps>
</step>
<step performance="required">
<para>
- If a bibliography is present, Applix Words seems to mark all remaining
- text after the first title as having an underlined attribute. Select
- all remaining text, turn off underlining using the underlining button,
- then explicitly underline each document and book title.
+ Work through the document to:
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Adjust page breaks.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Adjust table column widths.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Insert figures into the document. Center each figure on the page using
+ the centering margins button on the ApplixWare toolbar.
+
+ <note>
+ <para>
+ Not all documents have figures.
+ You can grep the <acronym>SGML</acronym> source files for
+ the string "<literal>graphic</literal>" to identify those parts of the
+ documentation which may have figures. A few figures are replicated in
+ various parts of the documentation.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
</step>
<step performance="required">
<para>
- Work through the document, marking up the ToC hardcopy with the actual
- page number of each ToC entry.
+ Replace the right-justified page numbers in the Examples and
+ Figures portions of the ToC with
+ correct values. This only takes a few minutes per document.
</para>
</step>
<step performance="required">
<para>
- Replace the right-justified incorrect page numbers in the ToC with
- correct values. This only takes a few minutes per document.
+ If a bibliography is present, remove the <firstterm>short
+ form</firstterm> reference title from each entry. The
+ <productname>DocBook</productname> stylesheets from Norm Walsh
+ seem to print these out, even though this is a subset of the
+ information immediately following.
</para>
</step>
<step performance="required">
<para>
- <quote>Print</quote> the document
+ "Print" the document
to a file in Postscript format.
</para>
</step>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.13 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.14 2000/05/02 20:01:51 thomas Exp $
-->
<chapter>
This describes an embedded <acronym>SQL</acronym> in <acronym>C</acronym>
package for <productname>Postgres</productname>.
- It is written by <ulink url="">Linus Tolke</ulink>
- and <ulink url="">Michael Meskes</ulink>.
<note>
<para>
Permission is granted to copy and use in the same way as you are allowed
- to copy and use the rest of the <productname>PostgreSQL</productname>.
+ to copy and use the rest of <productname>PostgreSQL</productname>.
</para>
</note>
</para>
+
<sect1>
<title>Why Embedded <acronym>SQL</acronym>?</title>
<para>
The following list shows all the known incompatibilities. If you find one
- not listed please notify <ulink url="">Michael
- Meskes</ulink>. Note, however, that we list only incompatibilities from
+ not listed please notify
+ Note, however, that we list only incompatibilities from
a precompiler of another RDBMS to <application>ecpg</application> and not
additional <application>ecpg</application> features that these RDBMS do not
have.
This request is modified
by the input variables, i.e. the variables that where not known at
compile time but are to be entered in the request. Where the variables
- should go the string contains <quote>;</quote>.
+ should go the string contains ";".
</para>
</listitem>
</varlistentry>
to the <FileName>.profile</FileName> file in your home directory.
From now on, we will assume that you have added the
<ProductName>Postgres</ProductName> bin directory to your path. In addition, we
- will make frequent reference to <Quote>setting a shell
- variable</Quote> or <Quote>setting an environment variable</Quote> throughout
+ will make frequent reference to "setting a shell
+ variable" or "setting an environment variable" throughout
this document. If you did not fully understand the
last paragraph on modifying your search path, you
should consult the Unix manual pages that describe your
<title id="sql-funcs">SQL Functions</title>
<para>
- <quote><acronym>SQL</acronym> functions</quote> are constructs
+ <firstterm><acronym>SQL</acronym> functions</firstterm> are constructs
defined by the <acronym>SQL92</acronym> standard which have
function-like syntax but which can not be implemented as simple
functions.
<entry>preserve months and years</entry>
<entry>age('now', timestamp '1957-06-13')</entry>
</row>
- <row>
- <entry>timestamp(abstime)</entry>
- <entry>timestamp</entry>
- <entry>convert to timestamp</entry>
- <entry>timestamp(abstime 'now')</entry>
- </row>
- <row>
- <entry>timestamp(date)</entry>
- <entry>timestamp</entry>
- <entry>convert to timestamp</entry>
- <entry>timestamp(date 'today')</entry>
- </row>
- <row>
- <entry>timestamp(date,time)</entry>
- <entry>timestamp</entry>
- <entry>convert to timestamp</entry>
- <entry>timestamp(timestamp '1998-02-24',time '23:07');</entry>
- </row>
<row>
<entry>date_part(text,timestamp)</entry>
<entry>float8</entry>
<entry>date_trunc('month',abstime 'now')</entry>
</row>
<row>
- <entry>isfinite(abstime)</entry>
- <entry>bool</entry>
- <entry>a finite time?</entry>
- <entry>isfinite(abstime 'now')</entry>
+ <entry>interval(reltime)</entry>
+ <entry>interval</entry>
+ <entry>convert to interval</entry>
+ <entry>interval(reltime '4 hours')</entry>
</row>
<row>
<entry>isfinite(timestamp)</entry>
<entry>reltime(interval '4 hrs')</entry>
</row>
<row>
- <entry>interval(reltime)</entry>
- <entry>interval</entry>
- <entry>convert to interval</entry>
- <entry>interval(reltime '4 hours')</entry>
+ <entry>timestamp(date)</entry>
+ <entry>timestamp</entry>
+ <entry>convert to timestamp</entry>
+ <entry>timestamp(date 'today')</entry>
+ </row>
+ <row>
+ <entry>timestamp(date,time)</entry>
+ <entry>timestamp</entry>
+ <entry>convert to timestamp</entry>
+ <entry>timestamp(timestamp '1998-02-24',time '23:07');</entry>
+ </row>
+ <row>
+ <entry>to_char(timestamp,text)</entry>
+ <entry>text</entry>
+ <entry>convert to string</entry>
+ <entry>to_char(timestamp '1998-02-24','DD');</entry>
</row>
</tbody>
</tgroup>
<entry>HH12</entry>
<entry>hour of day (01-12)</entry>
</row>
+ <row>
+ <entry>HH24</entry>
+ <entry>hour of day (00-23)</entry>
+ </row>
<row>
<entry>MI</entry>
<entry>minute (00-59)</entry>
<entry>month in Roman Numerals (I-XII; I=JAN) - upper case</entry>
</row>
<row>
- <entry>rn</entry>
+ <entry>rm</entry>
<entry>month in Roman Numerals (I-XII; I=JAN) - lower case</entry>
</row>
</tbody>
<para>
<function>to_timestamp</function> and <function>to_date</function>
skip blank space if the <literal>FX</literal> option is
- not use. <literal>FX</literal> Must be specified as the first item
+ not used. <literal>FX</literal> must be specified as the first item
in the template.
</para>
</listitem>
<listitem>
<para>
- '\' - must be use as double \\, example '\\HH\\MI\\SS'
+ Backslash ("<literal>\</literal>") must be specified with a double backslash
+ ("<literal>\\</literal>"); for example <literal>'\\HH\\MI\\SS'</literal>.
</para>
</listitem>
<listitem>
<para>
- '"' - string between a quotation marks is skipen and not is parsed.
- If you want write '"' to output you must use \\", example '\\"YYYY Month\\"'.
+ A double quote ('"') between quotation marks is skipped and is not parsed.
+ If you want to write a double quote to output you must preceed
+ it with a double backslash (<literal>'\\"</literal>), for
+ example <literal>'\\"YYYY Month\\"'</literal>.
</para>
</listitem>
<listitem>
<para>
- text - the PostgreSQL's to_char() support text without '"', but string
- between a quotation marks is fastly and you have guarantee, that a text
- not will interpreted as a keyword (format-picture), exapmle '"Hello Year: "YYYY'.
+ <function>to_char</function> supports text without a leading
+ double quote ('"'), but any string
+ between a quotation marks is rapidly handled and you are
+ guaranteed that it will not be interpreted as a template
+ keyword (example: <literal>'"Hello Year: "YYYY'</literal>).
</para>
</listitem>
</itemizedlist>
<row>
<entry>area(object)</entry>
<entry>float8</entry>
- <entry>area of circle, ...</entry>
+ <entry>area of item</entry>
<entry>area(box '((0,0),(1,1))')</entry>
</row>
<row>
<entry>box(box,box)</entry>
<entry>box</entry>
- <entry>boxes to intersection box</entry>
+ <entry>intersection box</entry>
<entry>box(box '((0,0),(1,1))',box '((0.5,0.5),(2,2))')</entry>
</row>
<row>
<entry>center(object)</entry>
<entry>point</entry>
- <entry>center of circle, ...</entry>
+ <entry>center of item</entry>
<entry>center(box '((0,0),(1,2))')</entry>
</row>
<row>
<row>
<entry>length(object)</entry>
<entry>float8</entry>
- <entry>length of line segment, ...</entry>
+ <entry>length of item</entry>
<entry>length(path '((-1,0),(1,0))')</entry>
</row>
- <row>
- <entry>length(path)</entry>
- <entry>float8</entry>
- <entry>length of path</entry>
- <entry>length(path '((0,0),(1,1),(2,0))')</entry>
- </row>
<row>
<entry>pclose(path)</entry>
<entry>path</entry>
<row>
<entry>box(circle)</entry>
<entry>box</entry>
- <entry>convert circle to box</entry>
+ <entry>circle to box</entry>
<entry>box('((0,0),2.0)'::circle)</entry>
</row>
<row>
<entry>box(point,point)</entry>
<entry>box</entry>
- <entry>convert points to box</entry>
+ <entry>points to box</entry>
<entry>box('(0,0)'::point,'(1,1)'::point)</entry>
</row>
<row>
<entry>box(polygon)</entry>
<entry>box</entry>
- <entry>convert polygon to box</entry>
+ <entry>polygon to box</entry>
<entry>box('((0,0),(1,1),(2,0))'::polygon)</entry>
</row>
<row>
<entry>circle(box)</entry>
<entry>circle</entry>
- <entry>convert to circle</entry>
+ <entry>to circle</entry>
<entry>circle('((0,0),(1,1))'::box)</entry>
</row>
<row>
<entry>circle(point,float8)</entry>
<entry>circle</entry>
- <entry>convert to circle</entry>
+ <entry>point to circle</entry>
<entry>circle('(0,0)'::point,2.0)</entry>
</row>
<row>
<entry>lseg(box)</entry>
<entry>lseg</entry>
- <entry>convert diagonal to lseg</entry>
+ <entry>box diagonal to lseg</entry>
<entry>lseg('((-1,0),(1,0))'::box)</entry>
</row>
<row>
<entry>lseg(point,point)</entry>
<entry>lseg</entry>
- <entry>convert to lseg</entry>
+ <entry>points to lseg</entry>
<entry>lseg('(-1,0)'::point,'(1,0)'::point)</entry>
</row>
<row>
<entry>path(polygon)</entry>
<entry>point</entry>
- <entry>convert to path</entry>
+ <entry>polygon to path</entry>
<entry>path('((0,0),(1,1),(2,0))'::polygon)</entry>
</row>
<row>
<entry>point(circle)</entry>
<entry>point</entry>
- <entry>convert to point (center)</entry>
+ <entry>center</entry>
<entry>point('((0,0),2.0)'::circle)</entry>
</row>
<row>
<entry>point(lseg,lseg)</entry>
<entry>point</entry>
- <entry>convert to point (intersection)</entry>
+ <entry>intersection</entry>
<entry>point('((-1,0),(1,0))'::lseg, '((-2,-2),(2,2))'::lseg)</entry>
</row>
<row>
<entry>point(polygon)</entry>
<entry>point</entry>
- <entry>center of polygon</entry>
+ <entry>center</entry>
<entry>point('((0,0),(1,1),(2,0))'::polygon)</entry>
</row>
<row>
<entry>polygon(box)</entry>
<entry>polygon</entry>
- <entry>convert to polygon with 12 points</entry>
+ <entry>12 point polygon</entry>
<entry>polygon('((0,0),(1,1))'::box)</entry>
</row>
<row>
<entry>polygon(circle)</entry>
<entry>polygon</entry>
- <entry>convert to 12-point polygon</entry>
+ <entry>12-point polygon</entry>
<entry>polygon('((0,0),2.0)'::circle)</entry>
</row>
<row>
<entry>polygon(<replaceable class="parameter">npts</replaceable>,circle)</entry>
<entry>polygon</entry>
- <entry>convert to <replaceable class="parameter">npts</replaceable> polygon</entry>
+ <entry><replaceable class="parameter">npts</replaceable> polygon</entry>
<entry>polygon(12,'((0,0),2.0)'::circle)</entry>
</row>
<row>
<entry>polygon(path)</entry>
<entry>polygon</entry>
- <entry>convert to polygon</entry>
+ <entry>path to polygon</entry>
<entry>polygon('((0,0),(1,1),(2,0))'::path)</entry>
</row>
</tbody>
<row>
<entry>revertpoly(polygon)</entry>
<entry>polygon</entry>
- <entry>convert pre-v6.1 polygon</entry>
+ <entry>to pre-v6.1</entry>
<entry>revertpoly('((0,0),(1,1),(2,0))'::polygon)</entry>
</row>
<row>
<entry>upgradepath(path)</entry>
<entry>path</entry>
- <entry>convert pre-v6.1 path</entry>
+ <entry>to pre-v6.1</entry>
<entry>upgradepath('(1,3,0,0,1,1,2,0)'::path)</entry>
</row>
<row>
<entry>upgradepoly(polygon)</entry>
<entry>polygon</entry>
- <entry>convert pre-v6.1 polygon</entry>
+ <entry>to pre-v6.1</entry>
<entry>upgradepoly('(0,1,2,0,1,0)'::polygon)</entry>
</row>
</tbody>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.7 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/history.sgml,v 1.8 2000/05/02 20:01:51 thomas Exp $
-->
<sect1>
<title><productname>PostgreSQL</productname></title>
<para>
- By 1996, it became clear that the name <quote>Postgres95</quote> would
+ By 1996, it became clear that the name "Postgres95" would
not stand the test of time. We chose a new name,
<productname>PostgreSQL</productname>, to reflect the relationship
between the original <productname>Postgres</productname> and the more
is an index built over a subset of a table; the subset is defined by
a predicate. <productname>Postgres</productname>
supported partial indices with arbitrary
- predicates. I believe IBM's db2 for as/400 supports partial indices
+ predicates. I believe IBM's <productname>DB2</productname>
+ for AS/400 supports partial indices
using single-clause predicates.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.6 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/inherit.sgml,v 1.7 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="inherit">
Madison | 845
</programlisting>
- Here the <quote>*</quote> after cities indicates that the query should
+ Here the "*" after cities indicates that the query should
be run over cities and all classes below cities in the
inheritance hierarchy. Many of the commands that we
have already discussed -- <command>SELECT</command>,
<command>UPDATE</command> and <command>DELETE</command> --
- support this <quote>*</quote> notation, as do others, like
+ support this "*" notation, as do others, like
<command>ALTER TABLE</command>.
</para>
</chapter>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/install.sgml,v 1.40 2000/04/14 23:04:44 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/install.sgml,v 1.41 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="install">
work with other <application>make</application> programs. On GNU/Linux systems
GNU make is the default tool, on other systems you may find that
GNU <application>make</application> is installed under the name
- <quote>gmake</quote>.
+ <literal>gmake</literal>.
We will use that name from now on to indicate <acronym>GNU</acronym>
<application>make</application>, no matter what name it has on your system.
To test for <acronym>GNU</acronym> <application>make</application> enter
Run the regression tests against the installed server (using the sequential
test method). If you didn't run the tests before installation, you should
definitely do it now.
- For detailed instructions see <xref endterm="regress-title"
- linkend="regress">.
+ For detailed instructions see
+ <xref endterm="regress-title" linkend="regress">.
</para>
</listitem>
</itemizedlist>
<para>
- To start <quote>playing around</quote>, set up the paths as explained above
+ To start experimenting with <productname>Postgres</productname>,
+ set up the paths as explained above
and start the server. To create a database, type
+
<programlisting>
> createdb testdb
</programlisting>
+
Then enter
+
<programlisting>
> psql testdb
</programlisting>
+
to connect to that database. At the prompt you can enter SQL commands
and start experimenting.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.10 2000/05/02 20:01:51 thomas Exp $
Postgres quick Installation Guide.
- thomas 1998-10-26
<!entity biblio SYSTEM "biblio.sgml">
]>
-<book>
+<book id="installation">
<!-- Title information -->
-<title>PostgreSQL Installation Guide</title>
-<bookinfo>
- <releaseinfo>Covering v6.5 for general release</releaseinfo>
- <bookbiblio>
- <authorgroup>
- <corpauthor>The PostgreSQL Development Team</corpauthor>
- </authorgroup>
+ <title>PostgreSQL Installation Guide</title>
+ <bookinfo>
+ <releaseinfo>Covering v7.0 for general release</releaseinfo>
+ <bookbiblio>
+ <authorgroup>
+ <corpauthor>The PostgreSQL Development Team</corpauthor>
+ </authorgroup>
<!-- editor in authorgroup is not supported
<AuthorGroup>
-->
- <editor>
- <firstname>Thomas</firstname>
- <surname>Lockhart</surname>
- <affiliation>
- <orgname>Caltech/JPL</orgname>
- </affiliation>
- </editor>
+ <editor>
+ <firstname>Thomas</firstname>
+ <surname>Lockhart</surname>
+ <affiliation>
+ <orgname>Caltech/JPL</orgname>
+ </affiliation>
+ </editor>
<!--
</AuthorGroup>
-->
<AuthorInitials>TGL</AuthorInitials>
-->
- <date>(last updated 1999-06-01)</date>
- </bookbiblio>
+ <date>(last updated 2000-05-01)</date>
+ </bookbiblio>
-<legalnotice>
-<para>
-<productname>PostgreSQL</productname> is Copyright © 1996-9
-by the Postgres Global Development Group.
-</para>
-</legalnotice>
+ <legalnotice>
+ <para>
+ <productname>PostgreSQL</productname> is Copyright © 1996-2000
+ by PostgreSQL Inc.
+ </para>
+ </legalnotice>
-</bookinfo>
+ </bookinfo>
<!--
<TOC> </TOC>
</Dedication>
-->
-<preface>
-<title>Summary</title>
-
-<para>
-<productname>Postgres</productname>,
- developed originally in the UC Berkeley Computer Science Department,
- pioneered many of the object-relational concepts
- now becoming available in some commercial databases.
-It provides SQL92/SQL3 language support,
- transaction integrity, and type extensibility.
- <productname>PostgreSQL</productname> is an open-source descendant
- of this original Berkeley code.
-</para>
-</preface>
-
-<chapter>
-<title>Introduction</title>
-
-<para>
-This installation procedure makes some assumptions about the desired configuration
-and runtime environment for your system. This may be adequate for many installations,
-and is almost certainly adequate for a first installation. But you may want to
-do an initial installation up to the point of unpacking the source tree
-and installing documentation, and then print or browse the
-<citetitle>Administrator's Guide</citetitle>.</para>
-
-</chapter>
-
-&ports;
-&install;
-&config;
-&release;
+ <preface>
+ <title>Summary</title>
+
+ <para>
+ <productname>Postgres</productname>,
+ developed originally in the UC Berkeley Computer Science Department,
+ pioneered many of the object-relational concepts
+ now becoming available in some commercial databases.
+ It provides SQL92/SQL3 language support,
+ transaction integrity, and type extensibility.
+ <productname>PostgreSQL</productname> is an open-source descendant
+ of this original Berkeley code.
+ </para>
+ </preface>
+
+ <chapter>
+ <title>Introduction</title>
+
+ <para>
+ This installation procedure makes some assumptions about the desired configuration
+ and runtime environment for your system. This may be adequate for many installations,
+ and is almost certainly adequate for a first installation. But you may want to
+ do an initial installation up to the point of unpacking the source tree
+ and installing documentation, and then print or browse the
+ <citetitle>Administrator's Guide</citetitle>.</para>
+
+ </chapter>
+
+ &ports;
+ &install;
+ &config;
+ &release;
<!--
<INDEX> </INDEX>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.15 2000/04/19 21:21:38 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.16 2000/05/02 20:01:51 thomas Exp $
-->
<chapter id="libpqplusplus">
<function>PgDatabase::PutLine</function>
or when the last string has been received from the backend using
<function>PgDatabase::GetLine</function>.
- It must be issued or the backend may get <quote>out of sync</quote> with
+ It must be issued or the backend may get "out of sync" with
the frontend. Upon return from this function, the backend is ready to
receive the next query.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.37 2000/04/25 16:39:07 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.38 2000/05/02 20:01:52 thomas Exp $
-->
<chapter id="libpq-chapter">
<para>
<filename>libpq</filename> is the <acronym>C</acronym>
application programmer's interface to
- <productname>PostgreSQL</productname>. <filename>libpq</filename> is a set
+ <productname>Postgres</productname>. <filename>libpq</filename> is a set
of library routines that allow client programs to pass queries to the
<productname>Postgres</productname> backend server and to receive the
results of these queries. <filename>libpq</filename> is also the
- underlying engine for several other <productname>PostgreSQL</productname>
+ underlying engine for several other <productname>Postgres</productname>
application interfaces, including <filename>libpq++</filename> (C++),
<filename>libpgtcl</filename> (Tcl), <productname>Perl</productname>, and
<filename>ecpg</filename>. So some aspects of libpq's behavior will be
is leaked for each call to PQconndefaults().
</para>
<para>
- In PostgreSQL versions before 7.0, PQconndefaults() returned a pointer
+ In Postgres versions before 7.0, PQconndefaults() returned a pointer
to a static array, rather than a dynamically allocated array. That
wasn't thread-safe, so the behavior has been changed.
</para>
maintain the PGconn abstraction. Use the accessor functions below to get
at the contents of PGconn. Avoid directly referencing the fields of the
PGconn structure because they are subject to change in the future.
-(Beginning in <productname>PostgreSQL</productname> release 6.4, the
+(Beginning in <productname>Postgres</productname> release 6.4, the
definition of struct PGconn is not even provided in <filename>libpq-fe.h</filename>.
If you have old code that accesses PGconn fields directly, you can keep using it
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
<function>PQprint</function>
Prints out all the tuples and, optionally, the
attribute names to the specified output stream.
-<synopsis>
+ <synopsis>
void PQprint(FILE* fout, /* output stream */
const PGresult *res,
const PQprintOpt *po);
pqbool expanded; /* expand tables */
pqbool pager; /* use pager for output if needed */
char *fieldSep; /* field separator */
- char *tableOpt; /* insert to HTML <table ...> */
- char *caption; /* HTML <caption> */
+ char *tableOpt; /* insert to HTML <replaceable>table ...</replaceable> */
+ char *caption; /* HTML <replaceable>caption</replaceable> */
char **fieldName; /* null terminated array of replacement field names */
} PQprintOpt;
-</synopsis>
+ </synopsis>
This function was formerly used by <application>psql</application>
to print query results, but this is no longer the case and this
function is no longer actively supported.
<title>Fast Path</title>
<para>
-<productname>PostgreSQL</productname> provides a fast path interface to send
+<productname>Postgres</productname> provides a fast path interface to send
function calls to the backend. This is a trapdoor into system internals and
can be a potential security hole. Most users will not need this feature.
<title>Asynchronous Notification</title>
<para>
-<productname>PostgreSQL</productname> supports asynchronous notification via the
+<productname>Postgres</productname> supports asynchronous notification via the
LISTEN and NOTIFY commands. A backend registers its interest in a particular
notification condition with the LISTEN command (and can stop listening
with the UNLISTEN command). All backends listening on a
</para>
<note>
<para>
- In <productname>PostgreSQL</productname> 6.4 and later,
+ In <productname>Postgres</productname> 6.4 and later,
the <literal>be_pid</literal> is the notifying backend's,
whereas in earlier versions it was always your own backend's <acronym>PID</acronym>.
</para>
<title>Functions Associated with the COPY Command</title>
<para>
- The COPY command in <productname>PostgreSQL</productname> has options to read from
+ The COPY command in <productname>Postgres</productname> has options to read from
or write to the network connection used by <filename>libpq</filename>.
Therefore, functions are necessary to access this network
connection directly so applications may take advantage of this capability.
a whole line will be returned at one time. But if the buffer offered by
the caller is too small to hold a line sent by the backend, then a partial
data line will be returned. This can be detected by testing whether the
-last returned byte is <quote><literal>\n</literal></quote> or not.
+last returned byte is "<literal>\n</literal>" or not.
The returned string is not null-terminated. (If you want to add a
terminating null, be sure to pass a bufsize one smaller than the room
actually available.)
const char *string);
</synopsis>
Note the application must explicitly send the two
-characters <quote><literal>\.</literal></quote> on a final line to indicate to
+characters "<literal>\.</literal>" on a final line to indicate to
the backend that it has finished sending its data.
</para>
</listitem>
sent to the backend using <function>PQputline</function> or when the
last string has been received from the backend
using <function>PGgetline</function>. It must be issued or the backend
- may get <quote>out of sync</quote> with the frontend. Upon
+ may get "out of sync" with the frontend. Upon
return from this function, the backend is ready to
receive the next query.
The return value is 0 on successful completion,
</para>
<para>
-By default, <application>libpq</application> prints <quote>notice</quote>
+By default, <application>libpq</application> prints "notice"
messages from the backend on <filename>stderr</filename>,
as well as a few error messages that it generates by itself.
This behavior can be overridden by supplying a callback function that
<listitem>
<para>
<envar>PGPORT</envar> sets the default port or local Unix domain socket
-file extension for communicating with the <productname>PostgreSQL</productname>
+file extension for communicating with the <productname>Postgres</productname>
backend.
</para>
</listitem>
<listitem>
<para>
<envar>PGDATABASE</envar> sets the default
-<productname>PostgreSQL</productname> database name.
+<productname>Postgres</productname> database name.
</para>
</listitem>
<listitem>
<listitem>
<para>
<envar>PGREALM</envar> sets the Kerberos realm to use with
-<productname>PostgreSQL</productname>, if it is different from the local realm.
-If <envar>PGREALM</envar> is set, <productname>PostgreSQL</productname>
+<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
<listitem>
<para>
<envar>PGOPTIONS</envar> sets additional runtime options for
-the <productname>PostgreSQL</productname> backend.
+the <productname>Postgres</productname> backend.
</para>
</listitem>
<listitem>
<para>
<filename>libpq</filename> is thread-safe as of
-<productname>PostgreSQL</productname> 7.0, so long as no two threads
+<productname>Postgres</productname> 7.0, so long as no two threads
attempt to manipulate the same PGconn object at the same time. In particular,
you can't issue concurrent queries from different threads through the same
connection object. (If you need to run concurrent queries, start up multiple
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.2 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/lisp.sgml,v 2.3 2000/05/02 20:01:52 thomas Exp $
-->
<chapter id="lisp">
<para>
The code (version 0.2) is available under GNU GPL from
- <ulink url="http://www.chez.com/emarsden/downloads/pg.el">
- http://www.chez.com/emarsden/downloads/pg.el</ulink>
+ <ulink url="http://www.chez.com/emarsden/downloads/pg.el">Eric Marsden</ulink>
</para>
<para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.10 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.11 2000/05/02 20:01:52 thomas Exp $
-->
<chapter id="largeObjects">
<para>
<programlisting>
/*--------------------------------------------------------------
- *
- * testlo.c--
- * test using large objects with libpq
- *
- * Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- * /usr/local/devel/pglite/cvs/src/doc/manual.me,v 1.16 1995/09/01 23:55:00 jolly Exp
- *
- *--------------------------------------------------------------
- */
- #include <stdio.h>
- #include "libpq-fe.h"
- #include "libpq/libpq-fs.h"
-
- #define BUFSIZE 1024
-
- /*
- * importFile * import file "in_filename" into database as large object "lobjOid"
- *
- */
- Oid importFile(PGconn *conn, char *filename)
- {
- Oid lobjId;
- int lobj_fd;
- char buf[BUFSIZE];
- int nbytes, tmp;
- int fd;
-
- /*
- * open the file to be read in
- */
- fd = open(filename, O_RDONLY, 0666);
- if (fd < 0) { /* error */
- fprintf(stderr, "can't open unix file %s\n", filename);
- }
-
- /*
- * create the large object
- */
- lobjId = lo_creat(conn, INV_READ|INV_WRITE);
- if (lobjId == 0) {
- fprintf(stderr, "can't create large object\n");
- }
-
- lobj_fd = lo_open(conn, lobjId, INV_WRITE);
- /*
- * read in from the Unix file and write to the inversion file
- */
- while ((nbytes = read(fd, buf, BUFSIZE)) > 0) {
- tmp = lo_write(conn, lobj_fd, buf, nbytes);
- if (tmp < nbytes) {
- fprintf(stderr, "error while reading large object\n");
- }
- }
-
- (void) close(fd);
- (void) lo_close(conn, lobj_fd);
-
- return lobjId;
- }
-
- void pickout(PGconn *conn, Oid lobjId, int start, int len)
- {
- int lobj_fd;
- char* buf;
- int nbytes;
- int nread;
-
- lobj_fd = lo_open(conn, lobjId, INV_READ);
- if (lobj_fd < 0) {
- fprintf(stderr,"can't open large object %d\n",
- lobjId);
- }
-
- lo_lseek(conn, lobj_fd, start, SEEK_SET);
- buf = malloc(len+1);
-
- nread = 0;
- while (len - nread > 0) {
- nbytes = lo_read(conn, lobj_fd, buf, len - nread);
- buf[nbytes] = ' ';
- fprintf(stderr,">>> %s", buf);
- nread += nbytes;
- }
- fprintf(stderr,"\n");
- lo_close(conn, lobj_fd);
- }
-
- void overwrite(PGconn *conn, Oid lobjId, int start, int len)
- {
- int lobj_fd;
- char* buf;
- int nbytes;
- int nwritten;
- int i;
-
- lobj_fd = lo_open(conn, lobjId, INV_READ);
- if (lobj_fd < 0) {
- fprintf(stderr,"can't open large object %d\n",
- lobjId);
- }
-
- lo_lseek(conn, lobj_fd, start, SEEK_SET);
- buf = malloc(len+1);
-
- for (i=0;i<len;i++)
- buf[i] = 'X';
- buf[i] = ' ';
-
- nwritten = 0;
- while (len - nwritten > 0) {
- nbytes = lo_write(conn, lobj_fd, buf + nwritten, len - nwritten);
- nwritten += nbytes;
- }
- fprintf(stderr,"\n");
- lo_close(conn, lobj_fd);
- }
-
- /*
- * exportFile * export large object "lobjOid" to file "out_filename"
- *
- */
- void exportFile(PGconn *conn, Oid lobjId, char *filename)
- {
- int lobj_fd;
- char buf[BUFSIZE];
- int nbytes, tmp;
- int fd;
-
- /*
- * create an inversion "object"
- */
- lobj_fd = lo_open(conn, lobjId, INV_READ);
- if (lobj_fd < 0) {
- fprintf(stderr,"can't open large object %d\n",
- lobjId);
- }
-
- /*
- * open the file to be written to
- */
- fd = open(filename, O_CREAT|O_WRONLY, 0666);
- if (fd < 0) { /* error */
- fprintf(stderr, "can't open unix file %s\n",
- filename);
- }
-
- /*
- * read in from the Unix file and write to the inversion file
- */
- while ((nbytes = lo_read(conn, lobj_fd, buf, BUFSIZE)) > 0) {
- tmp = write(fd, buf, nbytes);
- if (tmp < nbytes) {
- fprintf(stderr,"error while writing %s\n",
- filename);
- }
- }
-
- (void) lo_close(conn, lobj_fd);
- (void) close(fd);
-
- return;
- }
-
- void
- exit_nicely(PGconn* conn)
- {
- PQfinish(conn);
- exit(1);
- }
-
- int
- main(int argc, char **argv)
- {
- char *in_filename, *out_filename;
- char *database;
- Oid lobjOid;
- PGconn *conn;
- PGresult *res;
-
- if (argc != 4) {
- fprintf(stderr, "Usage: %s database_name in_filename out_filename\n",
- argv[0]);
- exit(1);
- }
-
- database = argv[1];
- in_filename = argv[2];
- out_filename = argv[3];
-
- /*
- * set up the connection
- */
- conn = PQsetdb(NULL, NULL, NULL, NULL, database);
-
- /* check to see that the backend connection was successfully made */
- if (PQstatus(conn) == CONNECTION_BAD) {
- fprintf(stderr,"Connection to database '%s' failed.\n", database);
- fprintf(stderr,"%s",PQerrorMessage(conn));
- exit_nicely(conn);
- }
-
- res = PQexec(conn, "begin");
- PQclear(res);
-
- printf("importing file %s\n", in_filename);
- /* lobjOid = importFile(conn, in_filename); */
- lobjOid = lo_import(conn, in_filename);
- /*
- printf("as large object %d.\n", lobjOid);
-
- printf("picking out bytes 1000-2000 of the large object\n");
- pickout(conn, lobjOid, 1000, 1000);
-
- printf("overwriting bytes 1000-2000 of the large object with X's\n");
- overwrite(conn, lobjOid, 1000, 1000);
- */
-
- printf("exporting large object to file %s\n", out_filename);
- /* exportFile(conn, lobjOid, out_filename); */
- lo_export(conn, lobjOid,out_filename);
-
- res = PQexec(conn, "end");
- PQclear(res);
- PQfinish(conn);
- exit(0);
- }
+ *
+ * testlo.c--
+ * test using large objects with libpq
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * /usr/local/devel/pglite/cvs/src/doc/manual.me,v 1.16 1995/09/01 23:55:00 jolly Exp
+ *
+ *--------------------------------------------------------------
+ */
+#include <stdio.h>
+#include "libpq-fe.h"
+#include "libpq/libpq-fs.h"
+
+#define BUFSIZE 1024
+
+/*
+ * importFile * import file "in_filename" into database as large object "lobjOid"
+ *
+ */
+Oid importFile(PGconn *conn, char *filename)
+{
+ Oid lobjId;
+ int lobj_fd;
+ char buf[BUFSIZE];
+ int nbytes, tmp;
+ int fd;
+
+ /*
+ * open the file to be read in
+ */
+ fd = open(filename, O_RDONLY, 0666);
+ if (fd < 0) { /* error */
+ fprintf(stderr, "can't open unix file %s\n", filename);
+ }
+
+ /*
+ * create the large object
+ */
+ lobjId = lo_creat(conn, INV_READ|INV_WRITE);
+ if (lobjId == 0) {
+ fprintf(stderr, "can't create large object\n");
+ }
+
+ lobj_fd = lo_open(conn, lobjId, INV_WRITE);
+ /*
+ * read in from the Unix file and write to the inversion file
+ */
+ while ((nbytes = read(fd, buf, BUFSIZE)) > 0) {
+ tmp = lo_write(conn, lobj_fd, buf, nbytes);
+ if (tmp < nbytes) {
+ fprintf(stderr, "error while reading large object\n");
+ }
+ }
+
+ (void) close(fd);
+ (void) lo_close(conn, lobj_fd);
+
+ return lobjId;
+}
+
+void pickout(PGconn *conn, Oid lobjId, int start, int len)
+{
+ int lobj_fd;
+ char* buf;
+ int nbytes;
+ int nread;
+
+ lobj_fd = lo_open(conn, lobjId, INV_READ);
+ if (lobj_fd < 0) {
+ fprintf(stderr,"can't open large object %d\n",
+ lobjId);
+ }
+
+ lo_lseek(conn, lobj_fd, start, SEEK_SET);
+ buf = malloc(len+1);
+
+ nread = 0;
+ while (len - nread > 0) {
+ nbytes = lo_read(conn, lobj_fd, buf, len - nread);
+ buf[nbytes] = ' ';
+ fprintf(stderr,">>> %s", buf);
+ nread += nbytes;
+ }
+ fprintf(stderr,"\n");
+ lo_close(conn, lobj_fd);
+}
+
+void overwrite(PGconn *conn, Oid lobjId, int start, int len)
+{
+ int lobj_fd;
+ char* buf;
+ int nbytes;
+ int nwritten;
+ int i;
+
+ lobj_fd = lo_open(conn, lobjId, INV_READ);
+ if (lobj_fd < 0) {
+ fprintf(stderr,"can't open large object %d\n",
+ lobjId);
+ }
+
+ lo_lseek(conn, lobj_fd, start, SEEK_SET);
+ buf = malloc(len+1);
+
+ for (i=0;i<len;i++)
+ buf[i] = 'X';
+ buf[i] = ' ';
+
+ nwritten = 0;
+ while (len - nwritten > 0) {
+ nbytes = lo_write(conn, lobj_fd, buf + nwritten, len - nwritten);
+ nwritten += nbytes;
+ }
+ fprintf(stderr,"\n");
+ lo_close(conn, lobj_fd);
+}
+
+/*
+ * exportFile * export large object "lobjOid" to file "out_filename"
+ *
+ */
+void exportFile(PGconn *conn, Oid lobjId, char *filename)
+{
+ int lobj_fd;
+ char buf[BUFSIZE];
+ int nbytes, tmp;
+ int fd;
+
+ /*
+ * create an inversion "object"
+ */
+ lobj_fd = lo_open(conn, lobjId, INV_READ);
+ if (lobj_fd < 0) {
+ fprintf(stderr,"can't open large object %d\n",
+ lobjId);
+ }
+
+ /*
+ * open the file to be written to
+ */
+ fd = open(filename, O_CREAT|O_WRONLY, 0666);
+ if (fd < 0) { /* error */
+ fprintf(stderr, "can't open unix file %s\n",
+ filename);
+ }
+
+ /*
+ * read in from the Unix file and write to the inversion file
+ */
+ while ((nbytes = lo_read(conn, lobj_fd, buf, BUFSIZE)) > 0) {
+ tmp = write(fd, buf, nbytes);
+ if (tmp < nbytes) {
+ fprintf(stderr,"error while writing %s\n",
+ filename);
+ }
+ }
+
+ (void) lo_close(conn, lobj_fd);
+ (void) close(fd);
+
+ return;
+}
+
+void
+exit_nicely(PGconn* conn)
+{
+ PQfinish(conn);
+ exit(1);
+}
+
+int
+main(int argc, char **argv)
+{
+ char *in_filename, *out_filename;
+ char *database;
+ Oid lobjOid;
+ PGconn *conn;
+ PGresult *res;
+
+ if (argc != 4) {
+ fprintf(stderr, "Usage: %s database_name in_filename out_filename\n",
+ argv[0]);
+ exit(1);
+ }
+
+ database = argv[1];
+ in_filename = argv[2];
+ out_filename = argv[3];
+
+ /*
+ * set up the connection
+ */
+ conn = PQsetdb(NULL, NULL, NULL, NULL, database);
+
+ /* check to see that the backend connection was successfully made */
+ if (PQstatus(conn) == CONNECTION_BAD) {
+ fprintf(stderr,"Connection to database '%s' failed.\n", database);
+ fprintf(stderr,"%s",PQerrorMessage(conn));
+ exit_nicely(conn);
+ }
+
+ res = PQexec(conn, "begin");
+ PQclear(res);
+
+ printf("importing file %s\n", in_filename);
+/* lobjOid = importFile(conn, in_filename); */
+ lobjOid = lo_import(conn, in_filename);
+/*
+ printf("as large object %d.\n", lobjOid);
+
+ printf("picking out bytes 1000-2000 of the large object\n");
+ pickout(conn, lobjOid, 1000, 1000);
+
+ printf("overwriting bytes 1000-2000 of the large object with X's\n");
+ overwrite(conn, lobjOid, 1000, 1000);
+*/
+
+ printf("exporting large object to file %s\n", out_filename);
+/* exportFile(conn, lobjOid, out_filename); */
+ lo_export(conn, lobjOid,out_filename);
+
+ res = PQexec(conn, "end");
+ PQclear(res);
+ PQfinish(conn);
+ exit(0);
+}
</programlisting>
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.7 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.8 2000/05/02 20:01:52 thomas Exp $
-->
<chapter id="manage-ag">
White space (i.e., spaces, tabs and newlines) may be
used freely in <acronym>SQL</acronym> queries.
Single-line comments are denoted by two dashes
- (<quote>--</quote>). Everything after the dashes up to the end of the
+ ("<literal>--</literal>"). Everything after the dashes up to the end of the
line is ignored. Multiple-line comments, and comments within a line,
- are denoted by <quote>/* ... */</quote>, a convention borrowed
+ are denoted by "<literal>/* ... */</literal>", a convention borrowed
from <productname>Ingres</productname>.
</para>
</sect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.9 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/manage.sgml,v 1.10 2000/05/02 20:01:52 thomas Exp $
-->
<Chapter Id="manage">
</Para>
<Para>
- To create a new database named <Quote>mydb</Quote> from the command line, type
+ To create a new database named <literal>mydb</literal> from the command line, type
<ProgramListing>
% createdb mydb
</ProgramListing>
Consult with the site administrator
regarding preconfigured alternate database locations.
Any valid environment variable name may be used to reference an alternate location,
- although using variable names with a prefix of <quote>PGDATA</quote> is recommended
+ although using variable names with a prefix of <envar>PGDATA</envar> is recommended
to avoid confusion
and conflict with other variables.
</Para>
library. This allows you to submit <Acronym>SQL</Acronym> commands
from C and get answers and status messages back to
your program. This interface is discussed further
- in section ??.
+ in <citetitle>The PostgreSQL Programmer's Guide</citetitle>.
</Para>
</ListItem>
</ItemizedList>
to you and that you can type <Acronym>SQL</Acronym> queries into a
workspace maintained by the terminal monitor.
The <Application>psql</Application> program responds to escape codes that begin
- with the backslash character, <Quote>\</Quote> For example, you
+ with the backslash character, "<literal>\</literal>". For example, you
can get help on the syntax of various
<ProductName>PostgreSQL</ProductName> <Acronym>SQL</Acronym> commands by typing:
<ProgramListing>
</ProgramListing>
This tells the server to process the query. If you
- terminate your query with a semicolon, the <Quote>\g</Quote> is not
+ terminate your query with a semicolon, the "<literal>\g</literal>" is not
necessary.
<Application>psql</Application> will automatically process semicolon terminated queries.
To read queries from a file, say myFile, instead of
prompt.)
White space (i.e., spaces, tabs and newlines) may be
used freely in <Acronym>SQL</Acronym> queries. Single-line comments are denoted by
- <Quote>--</Quote>. Everything after the dashes up to the end of the
+ "<literal>--</literal>". Everything after the dashes up to the end of the
line is ignored. Multiple-line comments, and comments within a line,
- are denoted by <Quote>/* ... */</Quote>
+ are denoted by "<literal>/* ... */</literal>".
</Para>
<Sect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.9 2000/04/07 13:30:58 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.10 2000/05/02 20:01:52 thomas Exp $
-->
<sect1 id="terminology">
<title>Notation</title>
<para>
- <quote>...</quote> or <filename>/usr/local/pgsql/</filename>
+ "<literal>...</literal>" or <filename>/usr/local/pgsql/</filename>
at the front of a file name is used to represent the
path to the <Productname>Postgres</Productname> superuser's home directory.
</para>
<para>
In a command synopsis, brackets
- (<quote>[</quote> and <quote>]</quote>) indicate an optional phrase or keyword.
+ ("<literal>[</literal>" and "<literal>]</literal>") indicate an optional phrase or keyword.
Anything in braces
- (<quote>{</quote> and <quote>}</quote>) and containing vertical bars
- (<quote>|</quote>)
+ ("<literal>{</literal>" and "<literal>}</literal>") and containing vertical bars
+ ("<literal>|</literal>")
indicates that you must choose one.
</para>
<para>
- In examples, parentheses (<quote>(</quote> and <quote>)</quote>) are
+ In examples, parentheses ("<literal>(</literal>" and "<literal>)</literal>") are
used to group boolean
- expressions. <quote>|</quote> is the boolean operator OR.
+ expressions. "<literal>|</literal>" is the boolean operator OR.
</para>
<para>
Examples will show commands executed from various accounts and programs.
Commands executed from the root account will be preceeded with
- <quote>></quote>.
+ "<literal>></literal>".
Commands executed from the <Productname>Postgres</Productname>
- superuser account will be preceeded with <quote>%</quote>, while commands
+ superuser account will be preceeded with "<literal>%</literal>", while commands
executed from an unprivileged user's account will be preceeded with
- <quote>$</quote>.
- <acronym>SQL</acronym> commands will be preceeded with <quote>=></quote>
+ "<literal>$</literal>".
+ <acronym>SQL</acronym> commands will be preceeded with "<literal>=></literal>"
or will have no leading prompt, depending on the context.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.14 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.15 2000/05/02 20:01:52 thomas Exp $
-->
<chapter id="odbc">
can I write it using <acronym>ODBC</acronym> calls
to the <productname>Postgres</productname> server,
or is that only when another database program
- like MS SQL Server or Access needs to access the data?</quote>
+ like MS SQL Server or Access needs to access the data?
+ </quote>
</para>
<para>
The <acronym>ODBC</acronym> <acronym>API</acronym>
<productname>ApplixWare</productname> has an
<acronym>ODBC</acronym> database interface
supported on at least some platforms.
- <productname>ApplixWare</productname> v4.4.1 has been
- demonstrated under Linux with <productname>Postgres</productname> v6.4
+ <productname>ApplixWare</productname> v4.4.2 has been
+ demonstrated under Linux with <productname>Postgres</productname> v7.0
using the <productname>psqlODBC</productname>
driver contained in the <productname>Postgres</productname> distribution.
</para>
command-line argument for <application>src/configure</application>:
<programlisting>
- % ./configure --with-odbc
- % make
+% ./configure --with-odbc
+% make
</programlisting>
</para>
</step>
+
<step performance="required">
<para>
Rebuild the <productname>Postgres</productname> distribution:
<programlisting>
- % make install
+% make install
</programlisting>
</para>
</step>
+
+ <step performance="optional">
+ <para>
+ Install the ODBC catalog extensions available in
+ <filename>PGROOT/contrib/odbc/odbc.sql</filename>:
+
+ <programlisting>
+% psql -e template1 < $PGROOT/contrib/odbc/odbc.sql
+ </programlisting>
+
+ where specifying <literal>template1</literal> as the target
+ database will ensure that all subsequent new databases will
+ have these same definitions.
+ </para>
+ </step>
</procedure>
<para>
This can be overridden from the <application>make</application> command-line
as
<programlisting>
- % make ODBCINST=<replaceable>filename</replaceable> install
+% make ODBCINST=<replaceable>filename</replaceable> install
</programlisting>
</para>
sources, type:
<programlisting>
- % ./configure
- % make
- % make POSTGRESDIR=<replaceable class="parameter">PostgresTopDir</replaceable> install
+% ./configure
+% make
+% make POSTGRESDIR=<replaceable class="parameter">PostgresTopDir</replaceable> install
</programlisting>
</para>
</step>
then you can specify various destinations explicitly:
<programlisting>
- % make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir ODBCINST=instfile install
+% make BINDIR=bindir LIBDIR=libdir HEADERDIR=headerdir ODBCINST=instfile install
</programlisting>
</para>
</step>
or gzipped tarfile to an empty directory. If using the zip package
unzip it with the command
<programlisting>
- % unzip -a <replaceable>packagename</replaceable>
+% unzip -a <replaceable>packagename</replaceable>
</programlisting>
The <option>-a</option> option
If you have the gzipped tar package than simply run
<programlisting>
- tar -xzf <replaceable>packagename</replaceable>
+% tar -xzf <replaceable>packagename</replaceable>
</programlisting>
</para>
Create the tar file:
<programlisting>
- % cd interfaces/odbc
- % make standalone
+% cd interfaces/odbc
+% make standalone
</programlisting>
</para>
</step>
Configure the standalone installation:
<programlisting>
- % ./configure
+% ./configure
</programlisting>
</para>
The configuration can be done with options:
<programlisting>
- % ./configure --prefix=<replaceable>rootdir</replaceable>
- --with-odbc=<replaceable>inidir</replaceable>
+% ./configure --prefix=<replaceable>rootdir</replaceable> --with-odbc=<replaceable>inidir</replaceable>
</programlisting>
where <option>--prefix</option> installs the libraries and headers in
Compile and link the source code:
<programlisting>
- % make ODBCINST=<replaceable>instdir</replaceable>
+% make ODBCINST=<replaceable>instdir</replaceable>
</programlisting>
</para>
Install the source code:
<programlisting>
- % make POSTGRESDIR=<replaceable>targettree</replaceable> install
+% make POSTGRESDIR=<replaceable>targettree</replaceable> install
</programlisting>
</para>
Here is how you would specify the various destinations explicitly:
<programlisting>
- % make BINDIR=<replaceable>bindir</replaceable>
- LIBDIR<replaceable>>libdi</replaceable>>
- HEADERDIR=<replaceable>headerdir</replaceable> install
+% make BINDIR=<replaceable>bindir</replaceable> LIBDIR=<replaceable>libdir</replaceable> HEADERDIR=<replaceable>headerdir</replaceable> install
</programlisting>
</para>
For example, typing
<programlisting>
- % make POSTGRESDIR=/opt/psqlodbc install
+% make POSTGRESDIR=/opt/psqlodbc install
</programlisting>
(after you've used
The command
<programlisting>
- % make POSTGRESDIR=/opt/psqlodbc HEADERDIR=/usr/local install
+% make POSTGRESDIR=/opt/psqlodbc HEADERDIR=/usr/local install
</programlisting>
should cause the libraries to be installed in /opt/psqlodbc/lib and
<literal>[ODBC Data Sources]</literal> and must contain the following entries:
<programlisting>
- Driver = <replaceable>POSTGRESDIR</replaceable>/lib/libpsqlodbc.so
- Database=<replaceable>DatabaseName</replaceable>
- Servername=localhost
- Port=5432
+Driver = <replaceable>POSTGRESDIR</replaceable>/lib/libpsqlodbc.so
+Database=<replaceable>DatabaseName</replaceable>
+Servername=localhost
+Port=5432
</programlisting>
<tip>
</programlisting>
</para>
</sect1>
+
<sect1>
<title>ApplixWare</title>
find the line that starts with
<programlisting>
- #libFor elfodbc /ax/<replaceable>...</replaceable>
+#libFor elfodbc /ax/<replaceable>...</replaceable>
</programlisting>
</para>
</step>
Change line to read
<programlisting>
- libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
+libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
</programlisting>
which will tell elfodbc to look in this directory
described above. You may also want to add the flag
<programlisting>
- TextAsLongVarchar=0
+TextAsLongVarchar=0
</programlisting>
to the database-specific portion of <filename>.odbc.ini</filename>
</substeps>
<para>
- You should see <quote>Starting elfodbc server</quote>
+ You should see "<literal>Starting elfodbc server</literal>"
in the lower left corner of the
data window. If you get an error dialog box, see the debugging section
below.
the axnet process. For example, if
<programlisting>
- ps -aucx | grep ax
+% 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
+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>
Then run
<programlisting>
- strace -f -s 1024 -p 10432
+% strace -f -s 1024 -p 10432
</programlisting>
</para>
</step>
<para>
For example, after getting
- a <quote>Cannot launch gateway on server</quote>,
+ a "<literal>Cannot launch gateway on server</literal>",
I ran strace on axnet and got
<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)
+[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.
<step performance="required">
<para>
- Enter the value <quote>sqldemo</quote>, then click <command>OK</command>.
+ Enter the value "<literal>sqldemo</literal>", then click <command>OK</command>.
</para>
<para>
<filename>~/axhome/macros/login.am</filename> file:
<programlisting>
- macro login
- set_set_system_var@("sql_username@","tgl")
- set_system_var@("sql_passwd@","no$way")
- endmacro
+macro login
+set_set_system_var@("sql_username@","tgl")
+set_system_var@("sql_passwd@","no$way")
+endmacro
</programlisting>
<caution>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/oper.sgml,v 1.15 2000/03/31 03:27:41 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/oper.sgml,v 1.16 2000/05/02 20:01:52 thomas Exp $
-->
<Chapter Id="operators">
</Para>
<Para>
- To view all variations of the <Quote>||</Quote> string concatenation operator,
+ To view all variations of the "<literal>||</literal>" string concatenation operator,
try
<ProgramListing>
SELECT oprleft, oprright, oprresult, oprcode
<tgroup cols="2">
<thead>
<row>
-<entry>
-Element
-</entry>
-<entry>
-Precedence
-</entry>
-<entry>
-Description
-</entry>
+<entry>Element</entry>
+<entry>Precedence</entry>
+<entry>Description</entry>
</row>
</thead>
unary minus
</entry>
</row>
+<!--
+Deprecated as of v7.0
<row>
<entry>
;
statement termination, logarithm
</entry>
</row>
+-->
<row>
<entry>
:
<entry>
</entry>
<entry>
-boolean inequality
+inequality
</entry>
</row>
<row>
right
</entry>
<entry>
-negation
+logical negation
</entry>
</row>
<row>
<ENTRY>Natural Exponentiation</ENTRY>
<ENTRY>: 3.0</ENTRY>
</ROW>
+<!--
+Deprecated in v7.0, esp. since ln() is available as a generic function.
<ROW>
<ENTRY> ; </ENTRY>
<ENTRY>Natural Logarithm</ENTRY>
<ENTRY>(; 5.0)</ENTRY>
</ROW>
+-->
<ROW>
<ENTRY> @ </ENTRY>
<ENTRY>Absolute value</ENTRY>
<para>
<note>
<para>
- The operators ":" and ";" are deprecated, and will be removed in
- the near future. Use the equivalent functions exp() and ln()
+ Two operators, ":" and ";", are now deprecated and will be removed in
+ the next release. Use the equivalent functions exp() and ln()
instead.
</para>
</note>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.3 2000/03/31 06:17:21 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/plsql.sgml,v 2.4 2000/05/02 20:01:52 thomas Exp $
-->
<chapter>
<programlisting>
RAISE <replaceable class="parameter">level</replaceable> <replaceable class="parameter">format</replaceable>'' [, <replaceable class="parameter">identifier</replaceable> [...]];
</programlisting>
- Inside the format, <quote>%</quote> is used as a placeholder for the
+ Inside the format, "<literal>%</literal>" is used as a placeholder for the
subsequent comma-separated identifiers. Possible levels are
DEBUG (silently suppressed in production running databases), NOTICE
(written into the database log and forwarded to the client application)
<title>Ports</title>
<para>
- This manual describes version 6.5 of <productname>Postgres</productname>.
+ This manual describes version 7.0 of <productname>Postgres</productname>.
The <productname>Postgres</productname> developer community has
compiled and tested <productname>Postgres</productname> on a
number of platforms. Check
<entry>RS6000</entry>
<entry>v7.0</entry>
<entry>2000-04-05</entry>
</row>
<row>
<entry>BSDI 4.01</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-04-04</entry>
</row>
<row>
<entry>Compaq Tru64 5.0</entry>
<entry>Alpha</entry>
<entry>v7.0</entry>
<entry>2000-04-11</entry>
</row>
<row>
<entry>FreeBSD 4.0</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-04-04</entry>
</row>
<row>
<entry>HPUX</entry>
<entry>PA-RISC</entry>
<entry>v7.0</entry>
<entry>2000-04-12</entry>
- <entry>Both 9.0x and 10.20
+ <entry>Both 9.0x and 10.20.
</row>
<row>
<entry>IRIX 6.5.6f</entry>
<entry>MIPS</entry>
<entry>v6.5.3</entry>
<entry>2000-02-18</entry>
- <entry>MIPSPro 7.3.1.1m; full N32 build
+ <entry>MIPSPro 7.3.1.1m N32 build.
</row>
<row>
<entry>Linux 2.0.x</entry>
<entry>Alpha</entry>
<entry>v7.0</entry>
<entry>2000-04-05</entry>
- <entry> With patches
+ <entry>With published patches.
</row>
<row>
<entry>Linux 2.2.x</entry>
<entry>armv4l</entry>
<entry>v7.0</entry>
<entry>2000-04-17</entry>
- <entry>Regression test needs work
+ <entry>Regression test needs work.
</row>
<row>
<entry>Linux 2.2.x</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-03-26</entry>
</row>
<row>
<entry>Linux 2.0.x</entry>
<entry>MIPS</entry>
<entry>v7.0</entry>
<entry>2000-04-13</entry>
- <entry>Cobalt Qube
+ <entry>Cobalt Qube.
</row>
<row>
<entry>Linux 2.2.5</entry>
<entry>Sparc</entry>
<entry>v7.0</entry>
<entry>2000-04-02</entry>
</row>
<row>
<entry>LinuxPPC R4</entry>
<entry>PPC603e</entry>
<entry>v7.0</entry>
<entry>2000-04-13</entry>
</row>
<row>
<entry>mklinux</entry>
<entry>PPC750</entry>
<entry>v7.0</entry>
<entry>2000-04-13</entry>
</row>
<row>
<entry>NetBSD 1.4</entry>
<entry>arm32</entry>
<entry>v7.0</entry>
<entry>2000-04-08</entry>
- Welche</ulink>)</entry>
+ Welche</ulink></entry>
</row>
<row>
<entry>NetBSD 1.4U</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-03-26</entry>
- Welche</ulink>)</entry>
+ Welche</ulink></entry>
</row>
<row>
<entry>NetBSD</entry>
<entry>m68k</entry>
<entry>v7.0</entry>
<entry>2000-04-10</entry>
- <entry>Mac 8xx
+ <entry>Mac 8xx.
</row>
<row>
<entry>NetBSD/sparc</entry>
<entry>Sparc</entry>
<entry>v7.0</entry>
<entry>2000-04-13</entry>
</row>
<row>
<entry>QNX 4.25</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-04-01</entry>
- <entry>
</row>
<row>
<entry>SCO OpenServer 5</entry>
<entry>x86</entry>
<entry>v6.5</entry>
<entry>1999-05-25</entry>
</row>
<row>
<entry>SCO UnixWare 7</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-04-18</entry>
- <entry>See FAQ; needs patch for compiler bug
+ <entry>See FAQ.
</row>
<row>
<entry>Solaris</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-04-12</entry>
</row>
<row>
<entry>Solaris 2.5.1-2.7</entry>
<entry>Sparc</entry>
<entry>v7.0</entry>
<entry>2000-04-12</entry>
</row>
<row>
<entry>SunOS 4.1.4</entry>
<entry>Sparc</entry>
<entry>v7.0</entry>
<entry>2000-04-13</entry>
- </row>
- <row>
- <entry>SVR4</entry>
- <entry>MIPS</entry>
- <entry>v6.4</entry>
- <entry>1998-10-28</entry>
- <entry>No 64-bit int compiler support
</row>
<row>
<entry>Windows/Win32</entry>
<entry>v7.0</entry>
<entry>2000-04-02</entry>
<entry>Client-side libraries or ODBC/JDBC. No server-side.
</row>
<row>
<entry>WinNT/Cygwin</entry>
<entry>x86</entry>
<entry>v7.0</entry>
<entry>2000-03-30</entry>
- <entry>Working with the Cygwin library.
+ <entry>Uses Cygwin library.
</row>
</tbody>
</tgroup>
For <productname>Windows NT</productname>,
the server-side port of <productname>Postgres</productname> uses
the RedHat/Cygnus <productname>Cygwin</productname> library and
- toolset.
+ toolset. For <productname>Windows 9x</productname>, no
+ server-side port is available due to OS limitations.
</para>
</note>
</sect1>
tested for v7.0 or v6.5.x:
<table tocentry="1">
- <title>Obsolete Platforms</title>
+ <title>Unsupported Platforms</title>
<tgroup cols="4">
<thead>
<row>
</row>
</thead>
<tbody>
+ <row>
+ <entry>BeOS</entry>
+ <entry>x86</entry>
+ <entry>v7.0</entry>
+ <entry>2000-05-01</entry>
+ <entry>Client-side coming soon?
+ </row>
<row>
<entry>DGUX 5.4R4.11</entry>
<entry>m88k</entry>
<entry>v6.3</entry>
<entry>1998-03-01</entry>
<entry>v6.4 probably OK. Needs new maintainer.
</row>
<row>
<entry>NetBSD-current</entry>
<entry>NS32532</entry>
<entry>v6.4</entry>
<entry>1998-10-27</entry>
- <entry>small problems in date/time math
+ <entry>Date math annoyances.
</row>
<row>
<entry>NetBSD 1.3</entry>
<entry>VAX</entry>
<entry>v6.3</entry>
<entry>1998-03-01</entry>
+ <entry>v7.0 should work.
</row>
<row>
<entry>SVR4 4.4</entry>
<entry>m88k</entry>
<entry>v6.2.1</entry>
<entry>1998-03-01</entry>
- <entry>Confirmed with patching; v6.4.x will need TAS spinlock code
+ <entry>v6.4.x will need TAS spinlock code.
+ </row>
+ <row>
+ <entry>SVR4</entry>
+ <entry>MIPS</entry>
+ <entry>v6.4</entry>
+ <entry>1998-10-28</entry>
+ <entry>No 64-bit int.
</row>
<row>
<entry>Ultrix</entry>
- <entry>MIPS,VAX?</entry>
+ <entry>MIPS, VAX</entry>
<entry>v6.x</entry>
<entry>1998-03-01</entry>
<entry>No recent reports; obsolete?</entry>
<entry>x86</entry>
<entry>v6.x</entry>
<entry>1998-03-01</entry>
- <entry>Client-only support; v1.0.9 worked with patches (<ulink
+ <entry>Client-only support; v1.0.9 worked with patches
</row>
</tbody>
</tgroup>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.35 2000/03/31 03:26:21 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.36 2000/05/02 20:01:52 thomas Exp $
-->
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!entity arch-dev SYSTEM "arch-dev.sgml">
<!entity biblio SYSTEM "biblio.sgml">
<!entity bki SYSTEM "bki.sgml">
+<!entity catalogs SYSTEM "catalogs.sgml">
<!entity compiler SYSTEM "compiler.sgml">
<!entity contacts SYSTEM "contacts.sgml">
<!entity cvs SYSTEM "cvs.sgml">
<!entity sources SYSTEM "sources.sgml">
]>
<!-- entity manpages SYSTEM "man/manpages.sgml" subdoc -->
-<Book Id="postgres">
+
+<book id="postgres">
<!-- Title information -->
- <Title>PostgreSQL</Title>
- <BookInfo>
- <ReleaseInfo>Covering v6.5 for general release</ReleaseInfo>
- <BookBiblio>
- <AuthorGroup>
- <CorpAuthor>The PostgreSQL Development Team</CorpAuthor>
- </AuthorGroup>
+ <title>PostgreSQL</title>
+ <bookinfo>
+ <releaseinfo>Covering v7.0 for general release</releaseinfo>
+ <bookbiblio>
+ <authorgroup>
+ <corpauthor>The PostgreSQL Development Team</corpauthor>
+ </authorgroup>
<!-- editor in authorgroup is not supported
<AuthorGroup>
-->
- <Editor>
- <FirstName>Thomas</FirstName>
- <SurName>Lockhart</SurName>
- <Affiliation>
- <OrgName>Caltech/JPL</OrgName>
- </Affiliation>
- </Editor>
+ <editor>
+ <firstname>Thomas</firstname>
+ <surname>Lockhart</surname>
+ <affiliation>
+ <orgname>Caltech/JPL</orgname>
+ </affiliation>
+ </editor>
<!--
</AuthorGroup>
-->
<AuthorInitials>TGL</AuthorInitials>
-->
- <Date>(last updated 1999-06-01)</Date>
- </BookBiblio>
+ <date>(last updated 2000-05-01)</date>
+ </bookbiblio>
- <LegalNotice>
- <Para>
- <ProductName>PostgreSQL</ProductName> is Copyright © 1996-9
- by the Postgres Global Development Group.
- </Para>
- </LegalNotice>
+ <legalnotice>
+ <para>
+ <productname>PostgreSQL</productname> is Copyright © 1996-2000
+ by PostgreSQL Inc.
+ </para>
+ </legalnotice>
- </BookInfo>
+ </bookinfo>
<!--
<TOC> </TOC>
-->
<preface id="preface">
- <Title>Summary</Title>
+ <title>Summary</title>
- <Para>
- <ProductName>Postgres</ProductName>,
+ <para>
+ <productname>Postgres</productname>,
developed originally in the UC Berkeley Computer Science Department,
pioneered many of the object-relational concepts
now becoming available in some commercial databases.
It provides SQL92/SQL3 language support,
transaction integrity, and type extensibility.
- <ProductName>PostgreSQL</ProductName> is an
+ <productname>PostgreSQL</productname> is an
open-source descendant of this original Berkeley code.
- </Para>
- </Preface>
+ </para>
+ </preface>
- <part Id="part-user">
- <Title>User's Guide</Title>
- <PartIntro>
- <Para>
+ <part id="part-user">
+ <title>User's Guide</title>
+ <partintro>
+ <para>
Information for users.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
&intro;
&syntax;
&plan;
&populate;
&commands;
- </Part>
+ </part>
- <part Id="part-admin">
- <Title>Administrator's Guide</Title>
- <PartIntro>
- <Para>
+ <part id="part-admin">
+ <title>Administrator's Guide</title>
+ <partintro>
+ <para>
Installation and maintenance information.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
<!--
Disable these extra intro chapters since some elements (e.g. y2k
statement) are included in the first intro.sgml and cause errors if
&recovery;
®ress;
&release;
- </Part>
+ </part>
- <part Id="part-programmer">
- <Title>Programmer's Guide</Title>
- <PartIntro>
- <Para>
- Information for extending <ProductName>Postgres</ProductName>.
- </Para>
- </PartIntro>
+ <part id="part-programmer">
+ <title>Programmer's Guide</title>
+ <partintro>
+ <para>
+ Information for extending <productname>Postgres</productname>.
+ </para>
+ </partintro>
<!--
Disable these extra intro chapters since some elements (e.g. y2k
statement) are included in the first intro.sgml and cause errors if
&trigger;
&spi;
&xplang;
- </Part>
+ </part>
- <part Id="part-interfaces">
- <Title>Interfaces</Title>
- <PartIntro>
- <Para>
+ <part id="part-interfaces">
+ <title>Interfaces</title>
+ <partintro>
+ <para>
User and programmer interfaces.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
&func-ref;
&lobj;
&ecpg;
&odbc;
&jdbc;
&lisp;
- </Part>
+ </part>
- <part Id="part-developer">
- <Title>Developer's Guide</Title>
- <PartIntro>
- <Para>
+ <part id="part-developer">
+ <title>Developer's Guide</title>
+ <partintro>
+ <para>
The Developer's Guide includes discussion of design decisions and
suggestions for future development.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
&sources;
&arch-dev;
&options;
&geqo;
+<!--
+ This listing of Postgres catalogs is currently just a copy of the old
+ man page. It is not up to date and has not been marked up for SGML.
+ - thomas 2000-04-20
+ &catalogs;
+-->
&protocol;
&signals;
&compiler;
&bki;
&page;
- </Part>
+ </part>
- <part Id="part-tutorial">
- <Title>Tutorial</Title>
- <PartIntro>
- <Para>
+ <part id="part-tutorial">
+ <title>Tutorial</title>
+ <partintro>
+ <para>
Introduction for new users.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
&sql;
&arch;
&start;
&query;
&advanced;
- </Part>
+ </part>
- <part Id="part-appendix">
- <Title>Appendices</Title>
- <PartIntro>
- <Para>
+ <part id="part-appendix">
+ <title>Appendices</title>
+ <partintro>
+ <para>
Additional related information.
- </Para>
- </PartIntro>
+ </para>
+ </partintro>
&datetime;
&cvs;
&contacts;
-->
&biblio;
- </Part>
+ </part>
<!--
Omit index until we have some index entries.
</index>
-->
-</Book>
+</book>
<!-- Keep this comment at the end of the file
Local variables:
<title>Identifying Bugs</title>
<para>
- Before you ask <quote>Is this a bug?</quote>, please read and re-read the
+ Before you ask "Is this a bug?", please read and re-read the
documentation to verify that you can really do whatever it is you are
trying. If it is not clear from the documentation whether you can do
something or not, please report that too; it's a bug in the documentation.
<para>
A program terminates with a fatal signal or an operating system
error message that would point to a problem in the program (a
- counterexample might be a <quote>disk full</quote> message,
+ counterexample might be a "disk full" message,
since that must be fixed outside of <productname>Postgres</productname>).
</para>
</listitem>
</listitem>
</itemizedlist>
- Here <quote>program</quote> refers to any executable, not only the backend server.
+ Here "<literal>program</literal>" refers to any executable, not only the backend server.
</para>
<para>
<para>
The most important thing to remember about bug reporting is to state all
the facts and only facts. Do not speculate what you think went wrong, what
- <quote>it seemed to do</quote>, or which part of the program has a fault.
+ "it seemed to do", or which part of the program has a fault.
If you are not familiar with the implementation you would probably guess
wrong and not help us a bit. And even if you are, educated explanations are
a great supplement to but no substitute for facts. If we are going to fix
Reporting the bare facts
is relatively straightforward (you can probably copy and paste them from the
screen) but all too often important details are left out because someone
- thought it doesn't matter or the report would <quote>ring a bell</quote>
+ thought it doesn't matter or the report would be understood
anyway.
</para>
please try to isolate the offending queries. We probably won't set up a
web server to reproduce your problem. In any case remember to provide
the exact input files, do not guess that the problem happens for
- <quote>large files</quote> or <quote>mid-size databases</quote>, etc.
+ "large files" or "mid-size databases", etc. since this
+ information is too inexact to be of use.
</para>
</listitem>
<listitem>
<para>
- The output you got. Please do not say that it <quote>didn't work</quote> or
- <quote>failed</quote>. If there is an error message,
+ The output you got. Please do not say that it "didn't work" or
+ "failed". If there is an error message,
show it, even if you don't understand it. If the program terminates with
an operating system error, say which. If nothing at all happens, say so.
Even if the result of your test case is a program crash or otherwise obvious
<listitem>
<para>
The output you expected is very important to state. If you just write
- <quote>This command gives me that output.</quote> or <quote>This is not
- what I expected.</quote>, we might run it ourselves, scan the output, and
+ "This command gives me that output." or "This is not
+ what I expected.", we might run it ourselves, scan the output, and
think it looks okay and is exactly what we expected. We shouldn't have to
spend the time to decode the exact semantics behind your commands.
- Especially refrain from merely saying that <quote>This is not what SQL says/Oracle
- does.</quote> Digging out the correct behavior from <acronym>SQL</acronym>
+ Especially refrain from merely saying that "This is not what SQL says/Oracle
+ does." Digging out the correct behavior from <acronym>SQL</acronym>
is not a fun undertaking, nor do we all know how all the other relational
databases out there behave. (If your problem is a program crash you can
obviously omit this item.)
<listitem>
<para>
- The PostgreSQL version. You can run the command
+ The <productname>PostgreSQL</productname> version. You can run the command
<literal>SELECT version();</literal> to
- find out. If this function does not exist, say so, then we know that
+ find out what version you are currently running.
+ If this function does not exist, say so, then we know that
your version is old enough. If you can't start up the server or a
client, look into the README file in the source directory or at the
name of your distribution file or package name. If your version is older
- than 6.5 we will almost certainly tell you to upgrade. There are tons
- of bugs in old versions, that's why we write new ones.
+ than 7.0 we will almost certainly tell you to upgrade. There are tons
+ of bug fixes in each new version, that's why we write them.
</para>
<para>
If you run a pre-packaged version, such as RPMs, say so, including any
Platform information. This includes the kernel name and version, C library,
processor, memory information. In most cases it is sufficient to report
the vendor and version, but do not assume everyone knows what exactly
- <quote>Debian</quote> contains or that everyone runs on Pentiums. If
+ "Debian" contains or that everyone runs on Pentiums. If
you have installation problems information about compilers, make, etc.
is also necessary.
</para>
<para>
When writing a bug report, please choose non-confusing terminology.
- The software package as such is called <quote>PostgreSQL</quote>,
- sometimes <quote>Postgres</quote> for short. (Sometimes
- the abbreviation <quote>Pgsql</quote> is used but don't do that.) When you
+ The software package as such is called "PostgreSQL",
+ sometimes "Postgres" for short. (Sometimes
+ the abbreviation "Pgsql" is used but don't do that.) When you
are specifically talking about the backend server, mention that, don't
- just say <quote>Postgres crashes</quote>. The interactive frontend is called
- <quote>psql</quote> and is for all intends and purposes completely separate
+ just say "Postgres crashes". The interactive frontend is called
+ "psql" and is for all intends and purposes completely separate
from the backend.
</para>
</sect2>
<title>Where to report bugs</title>
<para>
- invited to find a descriptive subject for your email message, perhaps parts
- of the error message.
+ In general, send bug reports to
+ mailing list</ulink>.
+ You are invited to find a descriptive subject for your email
+ message, perhaps parts of the error message.
</para>
<para>
Do not send bug reports to any of the user mailing lists, such as
- pgsql-sql or pgsql-general. These mailing lists are for answering
- user questions, their subscribers normally do not wish to receive
+
+ mailing list</ulink>
+ or
+ mailing list</ulink>.
+ These mailing lists are for answering
+ user questions and their subscribers normally do not wish to receive
bug reports. More importantly, they are unlikely to fix them.
</para>
<para>
Also, please do <emphasis>not</emphasis> send reports to
- development of <productname>PostgreSQL</productname>, it would be nice
- if we could keep the bug reports separate. We might choose take up a
+ mailing list</ulink>.
+ This list is for discussing the
+ development of <productname>PostgreSQL</productname> and it would be nice
+ if we could keep the bug reports separate. We might choose to take up a
discussion
about your bug report on it, if the bug needs more review.
</para>
<para>
If you have a problem with the documentation, send email to
+ mailing list</ulink>.
+ Mention the document, chapter, and sections in your problem report.
</para>
<para>
- If your bug is a portability problem on a non-supported platform, send
+ If your bug is a portability problem on a non-supported platform,
+ send mail to
+ so we (and you) can work on
porting <productname>PostgreSQL</productname> to your platform.
</para>
email addresses are closed mailing lists. That is, you need to be
subscribed to them in order to be allowed to post. If you simply
want to send mail but do not want to receive list traffic, you can
- subscribe to the special pgsql-loophole <quote>list</quote>, which
+ subscribe to the special pgsql-loophole mailing list, which
allows you to post to all <productname>PostgreSQL</productname>
mailing lists without receiving any messages. Send email to
+ to subscribe.
</para>
</note>
</sect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.25 2000/03/31 03:26:21 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.26 2000/05/02 20:01:52 thomas Exp $
Postgres Programmer's Guide.
-->
<!entity arch-dev SYSTEM "arch-dev.sgml">
<!entity biblio SYSTEM "biblio.sgml">
<!entity bki SYSTEM "bki.sgml">
+<!entity catalogs SYSTEM "catalogs.sgml">
<!entity compiler SYSTEM "compiler.sgml">
<!entity contacts SYSTEM "contacts.sgml">
<!entity cvs SYSTEM "cvs.sgml">
<title>PostgreSQL Programmer's Guide</title>
<bookinfo>
- <releaseinfo>Covering v6.5 for general release</releaseinfo>
+ <releaseinfo>Covering v7.0 for general release</releaseinfo>
<bookbiblio>
<authorgroup>
<corpauthor>The PostgreSQL Development Team</corpauthor>
<AuthorInitials>TGL</AuthorInitials>
-->
- <date>(last updated 1999-06-19)</date>
+ <date>(last updated 2000-05-01)</date>
</bookbiblio>
<legalnotice>
<para>
- <productname>PostgreSQL</productname> is Copyright © 1996-9
- by the Postgres Global Development Group.
+ <productname>PostgreSQL</productname> is Copyright © 1996-2000
+ by PostgreSQL Inc.
</para>
</legalnotice>
&func-ref;
-->
- &trigger;
- &spi;
- &lobj;
- &libpq;
- &libpqpp;
- &libpgtcl;
- &libpgeasy;
- &ecpg;
- &odbc;
- &jdbc;
- &lisp;
+ &trigger;
+ &spi;
+ &lobj;
+ &libpq;
+ &libpqpp;
+ &libpgtcl;
+ &libpgeasy;
+ &ecpg;
+ &odbc;
+ &jdbc;
+ &lisp;
<!-- development -->
- &sources;
- &arch-dev;
- &options;
- &geqo;
- &protocol;
- &signals;
- &compiler;
- &bki;
- &page;
+ &sources;
+ &arch-dev;
+ &options;
+ &geqo;
+<!--
+ This listing of Postgres catalogs is currently just a copy of the old
+ man page. It is not up to date and has not been marked up for SGML.
+ - thomas 2000-04-20
+ &catalogs;
+-->
+ &protocol;
+ &signals;
+ &compiler;
+ &bki;
+ &page;
<!-- appendices -->
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.13 2000/03/27 17:14:42 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.14 2000/05/02 20:02:03 thomas Exp $
Postgres documentation
-->
</varlistentry>
<varlistentry>
- <term><computeroutput>ERROR: Unable to create database directory 'xxx'.</computeroutput></term>
+ <term><computeroutput>ERROR: Unable to create database directory '<replaceable>path</replaceable>'.</computeroutput></term>
<term><computeroutput>ERROR: Could not initialize database directory.</computeroutput></term>
<listitem>
<para>
<para>
An alternate location can be specified in order to,
for example, store the database on a different disk.
- The path must have been prepared with the <xref
- linkend="APP-INITLOCATION" endterm="APP-INITLOCATION-title">
+ The path must have been prepared with the
+ <xref linkend="APP-INITLOCATION" endterm="APP-INITLOCATION-title">
command.
</para>
<para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.12 2000/04/23 02:08:33 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.13 2000/05/02 20:02:03 thomas Exp $
Postgres documentation
-->
access methods).
</para>
+ <para>
+ Use <xref linkend="sql-dropindex-title" endterm="sql-dropindex-title">
+ to remove an index.
+ </para>
+
<refsect2 id="R2-SQL-CREATEINDEX-3">
<refsect2info>
<date>1998-09-09</date>
</refsect2>
</refsect1>
- <para>
- Use <xref linkend="sql-dropindex-title" endterm="sql-dropindex-title">
- to remove an index.
- </para>
-
<refsect1 id="R1-SQL-CREATEINDEX-2">
<title>
Usage
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.28 2000/04/15 23:29:58 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.29 2000/05/02 20:02:03 thomas Exp $
Postgres documentation
-->
REFERENCES Constraint
</title>
<synopsis>
-[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES
-<replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ]
-[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
-[ ON DELETE <replaceable class="parameter">action</replaceable> ]
-[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
-[ [ NOT ] DEFERRABLE ]
-[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
+[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ]
+ [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
+ [ ON DELETE <replaceable class="parameter">action</replaceable> ]
+ [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
+ [ [ NOT ] DEFERRABLE ]
+ [ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
</synopsis>
<para>
The REFERENCES constraint specifies a rule that a column
REFERENCES Constraint
</title>
<synopsis>
-[ CONSTRAINT <replaceable class="parameter">name</replaceable> ]
-FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFERENCES
-<replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ...] ) ]
-[ MATCH <replaceable class="parameter">matchtype</replaceable> ]
-[ ON DELETE <replaceable class="parameter">action</replaceable> ]
-[ ON UPDATE <replaceable class="parameter">action</replaceable> ]
-[ [ NOT ] DEFERRABLE ]
-[ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
+[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] )
+ REFERENCES <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ...] ) ]
+ [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
+ [ ON DELETE <replaceable class="parameter">action</replaceable> ]
+ [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
+ [ [ NOT ] DEFERRABLE ]
+ [ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
</synopsis>
<para>
The REFERENCES constraint specifies a rule that a column value is
Table Constraint definition:
<synopsis>
-[ CONSTRAINT name ] UNIQUE ( column [, ...] )
+[ CONSTRAINT <replaceable>name</replaceable> ] UNIQUE ( <replaceable>column</replaceable> [, ...] )
[ { INITIALLY DEFERRED | INITIALLY IMMEDIATE } ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
Column Constraint definition:
<synopsis>
-[ CONSTRAINT name ] UNIQUE
+[ CONSTRAINT <replaceable>name</replaceable> ] UNIQUE
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
included for symmetry with the NOT NULL clause. Since it is the
default for any column, its presence is simply noise.
<synopsis>
-[ CONSTRAINT name ] NULL
+[ CONSTRAINT <replaceable>name</replaceable> ] NULL
</synopsis>
</para>
</refsect3>
SQL92 specifies some additional capabilities for NOT NULL:
<synopsis>
-[ CONSTRAINT name ] NOT NULL
+[ CONSTRAINT <replaceable>name</replaceable> ] NOT NULL
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
or a domain.
</para>
<synopsis>
- DEFAULT niladic USER function |
- niladic datetime function |
- NULL
+DEFAULT niladic_user_function | niladic_datetime_function | NULL
</synopsis>
</refsect3>
-->
as an alternate method for defining a constraint:
</para>
<synopsis>
-CREATE ASSERTION name CHECK ( condition )
+CREATE ASSERTION <replaceable>name</replaceable> CHECK ( <replaceable>condition</replaceable> )
</synopsis>
<para>
Domain constraint:
<synopsis>
-[ CONSTRAINT name ] CHECK constraint
+[ CONSTRAINT <replaceable>name</replaceable> ] CHECK <replaceable>constraint</replaceable>
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
Table constraint definition:
<synopsis>
-[ CONSTRAINT name ] { PRIMARY KEY ( <replaceable class="parameter">column</replaceable>, ... ) | FOREIGN KEY constraint | UNIQUE constraint | CHECK constraint }
+[ CONSTRAINT <replaceable>name</replaceable> ] { PRIMARY KEY ( <replaceable class="parameter">column</replaceable>, ... ) | FOREIGN KEY <replaceable>constraint</replaceable> | UNIQUE <replaceable>constraint</replaceable> | CHECK <replaceable>constraint</replaceable> }
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
Column constraint definition:
<synopsis>
-[ CONSTRAINT name ] { NOT NULL | PRIMARY KEY | FOREIGN KEY constraint | UNIQUE | CHECK constraint }
+[ CONSTRAINT <replaceable>name</replaceable> ] { NOT NULL | PRIMARY KEY | FOREIGN KEY <replaceable>constraint</replaceable> | UNIQUE | CHECK <replaceable>constraint</replaceable> }
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
<term>INITIALLY IMMEDIATE</term>
<listitem>
<para>
- Check constraint only at the end of the transaction. This
- is the default
+ Check constraint only at the end of the transaction. This
+ is the default
</para>
</listitem>
</varlistentry>
<term>INITIALLY DEFERRED</term>
<listitem>
<para>
- Check constraint after each statement.
+ Check constraint after each statement.
</para>
</listitem>
</varlistentry>
<para>
table constraint definition:
<synopsis>
-[ CONSTRAINT name ] CHECK ( VALUE condition )
+[ CONSTRAINT <replaceable>name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
<para>
column constraint definition:
<synopsis>
-[ CONSTRAINT name ] CHECK ( VALUE condition )
+[ CONSTRAINT <replaceable>name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
domain constraint definition:
</para>
<synopsis>
- [ CONSTRAINT name ]
+ [ CONSTRAINT name]
CHECK ( VALUE condition )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
<para>
Table Constraint definition:
<synopsis>
-[ CONSTRAINT name ] PRIMARY KEY ( column [, ...] )
+[ CONSTRAINT <replaceable>name</replaceable> ] PRIMARY KEY ( <replaceable>column</replaceable> [, ...] )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
<para>
Column Constraint definition:
<synopsis>
-[ CONSTRAINT name ] PRIMARY KEY
+[ CONSTRAINT <replaceable>name</replaceable> ] PRIMARY KEY
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.10 2000/03/27 17:14:43 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.11 2000/05/02 20:02:03 thomas Exp $
Postgres documentation
-->
</refsynopsisdivinfo>
<synopsis>
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
- [ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
- [ --pwprompt|-W ]
- [ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
- [ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
- [ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
+ [ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
+ [ --pwprompt|-W ]
+ [ --encoding|-E <replaceable class="parameter">encoding</replaceable> ]
+ [ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
+ [ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
</synopsis>
<refsect2 id="R2-APP-INITDB-1">