new structure applied and constants added

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@91142 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Friedhelm Betz 2002-08-07 10:01:28 +00:00
parent 9f728c93cc
commit 7ac01b9dc8
2 changed files with 319 additions and 64 deletions

View file

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="pgsql.constants">
&reftitle.constants;
&extension.constants;
<variablelist>
<varlistentry>
<term>
<constant>PGSQL_ASSOC</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_NUM</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_BOTH</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_CONNECTION_BAD</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_CONNECTION_OK</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_SEEK_SET</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_SEEK_CUR</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_SEEK_END</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_ESCAPE_STRING</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_ESCAPE_BYTEA</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_EMPTY_QUERY</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_COMMAND_OK</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_TUPLES_OK</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_COPY_OUT</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_COPY_IN</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_BAD_RESPONSE</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_NONFATAL_ERROR</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_FATAL_ERROR</constant>
(<link linkend="language.types.integer">integer</link>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,51 +1,72 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<reference id="ref.pgsql">
<title>PostgreSQL functions</title>
<titleabbrev>PostgreSQL</titleabbrev>
<partintro>
<para>
Postgres, 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/SQL99 language support, transaction integrity and type
extensibility. PostgreSQL is an open source descendant of this
original Berkeley code.
</para>
<para>
PostgreSQL database is Open Source product and available without
cost. To use PostgreSQL support, you need PostgreSQL 6.5 or
later. PostgreSQL 7.0 or later to enable all PostgreSQL module
feature. PostgreSQL supports many character encoding including
multibyte character encoding. The current version and more
information about PostgreSQL is available at <ulink
url="&url.pgsql;">&url.pgsql;</ulink>.
</para>
<para>
In order to enable PostgreSQL support,
<option role="configure">--with-pgsql[=DIR]</option> is required when you compile
PHP. If shared object module is available, PostgreSQL module may
be loaded using <link linkend="ini.extension">extension</link>
directive in &php.ini; or <function>dl</function>
function. Supported ini directives are described in
<filename>php.ini-dist</filename> which comes with source distribution.
</para>
<warning>
<section id="pgsql.intro">
&reftitle.intro;
<para>
Using the PostgreSQL module with PHP 4.0.6 is not recommended due to
a bug in the notice message handling code. Use 4.1.0 or later.
PostgreSQL database is Open Source product and available without
cost. Postgres, 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/SQL99 language support, transaction integrity and type
extensibility. PostgreSQL is an open source descendant of this
original Berkeley code.
</para>
</warning>
<warning>
</section>
<section id="pgsql.requirenments">
&reftitle.required;
<para>
PostgreSQL function names will be changed in 4.2.0 release to
confirm to current coding standards. Most of new names will have
additional underscores, e.g. pg_lo_open(). Some functions are
renamed to different name for consistency. e.g. pg_exec() to
pg_query(). Older names can be used in 4.2.0 and a few releases
from 4.2.0, but they may be deleted in the future.
To use PostgreSQL support, you need PostgreSQL 6.5 or
later, PostgreSQL 7.0 or later to enable all PostgreSQL module
features. PostgreSQL supports many character encoding including
multibyte character encoding. The current version and more
information about PostgreSQL is available at <ulink
url="&url.pgsql;">&url.pgsql;</ulink>.
</para>
</section>
<section id="pgsql.installation">
&reftitle.install;
<para>
In order to enable PostgreSQL support,
<option role="configure">--with-pgsql[=DIR]</option> is required when you compile
PHP. If shared object module is available, PostgreSQL module may
be loaded using <link linkend="ini.extension">extension</link>
directive in &php.ini; or <function>dl</function>
function.
</para>
</section>
<section id="pgsql.configuration">
&reftitle.runtime;
<para>
Supported ini directives are described in
<filename>php.ini-dist</filename> which comes with source distribution.
</para>
</section>
<section id="pgsql.using">
<title>How to use and hints</title>
<warning>
<para>
Using the PostgreSQL module with PHP 4.0.6 is not recommended due to
a bug in the notice message handling code. Use 4.1.0 or later.
</para>
</warning>
<warning>
<para>
PostgreSQL function names will be changed in 4.2.0 release to
confirm to current coding standards. Most of new names will have
additional underscores, e.g. pg_lo_open(). Some functions are
renamed to different name for consistency. e.g. pg_exec() to
pg_query(). Older names can be used in 4.2.0 and a few releases
from 4.2.0, but they may be deleted in the future.
</para>
<table>
<title>Function names changed</title>
<tgroup cols="2">
@ -174,9 +195,9 @@
<tgroup cols="3">
<thead>
<row>
<entry>Postmaster</entry>
<entry>PHP</entry>
<entry>Status</entry>
<entry>Postmaster</entry>
<entry>PHP</entry>
<entry>Status</entry>
</row>
</thead>
<tbody>
@ -251,24 +272,30 @@ PGCLIENTENCODING=EUC-JP
export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD PGDATESTYLE PGTZ PGCLIENTENCODING
]]>
</programlisting>
</example>
<para>
Starting with PostgreSQL 7.1.0, you can store up to 1GB into a
field of type text. In older versions, this was limited to the block
size (default was 8KB, maximum was 32KB, defined at compile time)
</para>
<para>
To use the large object (lo) interface, it is required to enclose
large object functions within a transaction block. A transaction
block starts with a SQL statement <command>BEGIN</command> and if
the transaction was valid ends with <command>COMMIT</command> or
<command>END</command>. If the transaction fails the transaction
should be closed with <command>ROLLBACK</command> or
<command>ABORT</command>.
<example>
<title>Using Large Objects</title>
<programlisting role="php">
</programlisting>
</example>
</section>
&reference.pgsql.constants;
<section id="pgsql.examples">
&reftitle.examples;
<para>
Starting with PostgreSQL 7.1.0, you can store up to 1GB into a
field of type text. In older versions, this was limited to the block
size (default was 8KB, maximum was 32KB, defined at compile time)
</para>
<para>
To use the large object (lo) interface, it is required to enclose
large object functions within a transaction block. A transaction
block starts with a SQL statement <command>BEGIN</command> and if
the transaction was valid ends with <command>COMMIT</command> or
<command>END</command>. If the transaction fails the transaction
should be closed with <command>ROLLBACK</command> or
<command>ABORT</command>.
<example>
<title>Using Large Objects</title>
<programlisting role="php">
<![CDATA[
<?php
$database = pg_connect ("dbname=jacarta");
@ -282,11 +309,12 @@ export PGHOST PGPORT PGDATABASE PGUSER PGPASSWORD PGDATESTYLE PGTZ PGCLIENTENCOD
pg_query ($database, "commit");
?>
]]>
</programlisting>
</example>
You should not close the connection to the PostgreSQL server
before closing the large object.
</para>
</programlisting>
</example>
You should not close the connection to the PostgreSQL server
before closing the large object.
</para>
</section>
</partintro>
&reference.pgsql.functions;