mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
MFB: Upgrade to the new-reference-structure
- Split reference.xml into book.xml, setup.xml, and examples.xml - Moved from reference.xml to book.xml: - The intro text (partintro), and link to various pages - Moved from reference.xml to setup.xml: - The rest: requirements, installation, configuration, and resources - Changed the constants section to be an <appendix> - Changed the intro ID from <extname>.intro to intro.<extname> git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248799 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
721fe0a937
commit
173f0bdc2e
5 changed files with 186 additions and 89 deletions
51
reference/pgsql/book.xml
Normal file
51
reference/pgsql/book.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- Purpose: database.vendors -->
|
||||
<!-- Membership: bundled, external -->
|
||||
|
||||
<book xml:id="book.pgsql" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>PostgreSQL</title>
|
||||
|
||||
<!-- {{{ preface -->
|
||||
<preface xml:id="intro.pgsql">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
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, transactions, referential integrity,
|
||||
stored procedures and type extensibility. PostgreSQL is an open source
|
||||
descendant of this original Berkeley code.
|
||||
</para>
|
||||
</preface>
|
||||
<!-- }}} -->
|
||||
|
||||
&reference.pgsql.setup;
|
||||
&reference.pgsql.constants;
|
||||
&reference.pgsql.examples;
|
||||
&reference.pgsql.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<section xml:id="pgsql.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<appendix xml:id="pgsql.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
|
||||
|
@ -537,7 +537,7 @@
|
|||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
67
reference/pgsql/examples.xml
Normal file
67
reference/pgsql/examples.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<chapter xml:id="pgsql.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<section xml:id="pgsql.examples-basic">
|
||||
<para>
|
||||
This simple example shows how to connect, execute a query, print
|
||||
resulting rows and disconnect from a PostgreSQL database.
|
||||
<example>
|
||||
<title>PostgreSQL extension overview example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Connecting, selecting database
|
||||
$dbconn = pg_connect("host=localhost dbname=publishing user=www password=foo")
|
||||
or die('Could not connect: ' . pg_last_error());
|
||||
|
||||
// Performing SQL query
|
||||
$query = 'SELECT * FROM authors';
|
||||
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
|
||||
|
||||
// Printing results in HTML
|
||||
echo "<table>\n";
|
||||
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
|
||||
echo "\t<tr>\n";
|
||||
foreach ($line as $col_value) {
|
||||
echo "\t\t<td>$col_value</td>\n";
|
||||
}
|
||||
echo "\t</tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
// Free resultset
|
||||
pg_free_result($result);
|
||||
|
||||
// Closing connection
|
||||
pg_close($dbconn);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
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
|
||||
-->
|
||||
|
|
@ -1,54 +1,11 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.31 $ -->
|
||||
<!-- Purpose: database.vendors -->
|
||||
<!-- Membership: bundled, external -->
|
||||
<!-- $Revision: 1.32 $ -->
|
||||
|
||||
<reference xml:id="ref.pgsql" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>PostgreSQL Functions</title>
|
||||
<title>PostgreSQL &Functions;</title>
|
||||
<titleabbrev>PostgreSQL</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section xml:id="pgsql.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
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, transactions, referential integrity,
|
||||
stored procedures and type extensibility. PostgreSQL is an open source
|
||||
descendant of this original Berkeley code.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="pgsql.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
To use PostgreSQL support, you need PostgreSQL 6.5 or
|
||||
later, PostgreSQL 8.0 or later to enable all PostgreSQL module
|
||||
features. PostgreSQL supports many character encodings including
|
||||
multibyte character encoding. The current version and more
|
||||
information about PostgreSQL is available at
|
||||
<link xlink:href="&url.pgsql;">&url.pgsql;</link> and
|
||||
the <link xlink:href="&url.pgsql.manual;">PostgreSQL Documentation</link>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
&reference.pgsql.configure;
|
||||
|
||||
&reference.pgsql.ini;
|
||||
|
||||
<section xml:id="pgsql.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There are two resource types used in the PostgreSQL module. The first one
|
||||
is the link identifier for a database connection, the second a resource
|
||||
which holds the result of a query.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
&reference.pgsql.constants;
|
||||
|
||||
<section xml:id="pgsql.notes">
|
||||
&reftitle.notes;
|
||||
<note>
|
||||
|
@ -86,47 +43,6 @@
|
|||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="pgsql.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
This simple example shows how to connect, execute a query, print
|
||||
resulting rows and disconnect from a PostgreSQL database.
|
||||
<example>
|
||||
<title>PostgreSQL extension overview example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Connecting, selecting database
|
||||
$dbconn = pg_connect("host=localhost dbname=publishing user=www password=foo")
|
||||
or die('Could not connect: ' . pg_last_error());
|
||||
|
||||
// Performing SQL query
|
||||
$query = 'SELECT * FROM authors';
|
||||
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
|
||||
|
||||
// Printing results in HTML
|
||||
echo "<table>\n";
|
||||
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
|
||||
echo "\t<tr>\n";
|
||||
foreach ($line as $col_value) {
|
||||
echo "\t\t<td>$col_value</td>\n";
|
||||
}
|
||||
echo "\t</tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
// Free resultset
|
||||
pg_free_result($result);
|
||||
|
||||
// Closing connection
|
||||
pg_close($dbconn);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</partintro>
|
||||
|
||||
&reference.pgsql.entities.functions;
|
||||
|
|
63
reference/pgsql/setup.xml
Normal file
63
reference/pgsql/setup.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<chapter xml:id="pgsql.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<!-- {{{ Requirements -->
|
||||
<section xml:id="pgsql.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
To use PostgreSQL support, you need PostgreSQL 6.5 or
|
||||
later, PostgreSQL 8.0 or later to enable all PostgreSQL module
|
||||
features. PostgreSQL supports many character encodings including
|
||||
multibyte character encoding. The current version and more
|
||||
information about PostgreSQL is available at
|
||||
<link xlink:href="&url.pgsql;">&url.pgsql;</link> and
|
||||
the <link xlink:href="&url.pgsql.manual;">PostgreSQL Documentation</link>.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Installation -->
|
||||
&reference.pgsql.configure;
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Configuration -->
|
||||
&reference.pgsql.ini;
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Resources -->
|
||||
<section xml:id="pgsql.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There are two resource types used in the PostgreSQL module. The first one
|
||||
is the link identifier for a database connection, the second a resource
|
||||
which holds the result of a query.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
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
|
||||
-->
|
||||
|
Loading…
Reference in a new issue