Date: 07/11/00
- Next message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions url.xml"
- Previous message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions xml.xml"
- Next in thread: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions pgsql.xml"
- Maybe reply: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions pgsql.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
perugini Tue Jul 11 17:10:39 2000 EDT
Modified files:
/phpdoc/it/functions pgsql.xml
Log:
Updated from english tree
Index: phpdoc/it/functions/pgsql.xml
diff -u phpdoc/it/functions/pgsql.xml:1.3 phpdoc/it/functions/pgsql.xml:1.4
--- phpdoc/it/functions/pgsql.xml:1.3 Sat Jun 24 00:38:44 2000
+++ phpdoc/it/functions/pgsql.xml Tue Jul 11 17:10:39 2000
@@ -34,17 +34,17 @@
</thead>
<tbody>
<row>
- <entry>postmaster &</entry>
+ <entry>postmaster &</entry>
<entry>pg_connect("", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
<row>
- <entry>postmaster -i &</entry>
+ <entry>postmaster -i &</entry>
<entry>pg_connect("", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
<row>
- <entry>postmaster &</entry>
+ <entry>postmaster &</entry>
<entry>pg_connect("localhost", "", "", "", "dbname");</entry>
<entry>
Unable to connect to PostgreSQL server: connectDB() failed:
@@ -54,7 +54,7 @@
</entry>
</row>
<row>
- <entry>postmaster -i &</entry>
+ <entry>postmaster -i &</entry>
<entry>pg_connect("localhost", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
@@ -71,24 +71,23 @@
To use the large object (lo) interface, it is necessary to enclose
it within a transaction block. A transaction block starts with a
<command>begin</command> and if the transaction was valid ends
- with <command>commit</command> and <command>end</command>. If the
+ with <command>commit</command> or <command>end</command>. If the
transaction fails the transaction should be closed with
- <command>abort</command> and <command>rollback</command>.
+ <command>rollback</command> or <command>abort</command>.
<example>
<title>Using Large Objects</title>
<programlisting role="php">
<?php
-$database = pg_Connect ("", "", "", "", "jacarta");
-pg_exec ($database, "begin");
+ $database = pg_Connect ("", "", "", "", "jacarta");
+ pg_exec ($database, "begin");
$oid = pg_locreate ($database);
echo ("$oid\n");
$handle = pg_loopen ($database, $oid, "w");
echo ("$handle\n");
pg_lowrite ($handle, "gaga");
pg_loclose ($handle);
-pg_exec ($database, "commit")
-pg_exec ($database, "end")
+ pg_exec ($database, "commit");
?>
</programlisting>
</example>
@@ -139,7 +138,7 @@
<?php
$result = pg_exec($conn, "INSERT INTO verlag VALUES ('Autor')");
$cmdtuples = pg_cmdtuples($result);
-echo $cmdtuples . " <- cmdtuples affected.";
+echo $cmdtuples . " <- cmdtuples affected.";
?>
</programlisting>
</example>
@@ -331,10 +330,10 @@
}
$arr = pg_fetch_array ($result, 0);
-echo $arr[0] . " <- array\n";
+echo $arr[0] . " <- array\n";
$arr = pg_fetch_array ($result, 1);
-echo $arr["author"] . " <- array\n";
+echo $arr["author"] . " <- array\n";
?>
</programlisting>
</example>
@@ -484,13 +483,13 @@
}
$row = pg_fetch_row ($result, 0);
-echo $row[0] . " <- row\n";
+echo $row[0] . " <- row\n";
$row = pg_fetch_row ($result, 1);
-echo $row[0] . " <- row\n";
+echo $row[0] . " <- row\n";
$row = pg_fetch_row ($result, 2);
-echo $row[1] . " <- row\n";
+echo $row[1] . " <- row\n";
?>
</programlisting>
</example>
@@ -757,6 +756,65 @@
</refsect1>
</refentry>
+ <refentry id="function.pg-loexport">
+ <refnamediv>
+ <refname>pg_loexport</refname>
+ <refpurpose>export a large object to file</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>bool <function>pg_loexport</function></funcdef>
+ <paramdef>int
+ <parameter>oid</parameter>
+ </paramdef>
+ <paramdef>int
+ <parameter>file</parameter>
+ </paramdef>
+ <paramdef>int
+ <parameter><optional>connection_id</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ The <parameter>oid</parameter> argument specifies the object id
+ of the large object to export and the <parameter>filename</parameter>
+ argument specifies the pathname of the file. Returns FALSE if an error
+ occurred, TRUE otherwise. Remember that handling large objects in
+ PostgreSQL must happen inside a transaction.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="function.pg-loimport">
+ <refnamediv>
+ <refname>pg_loimport</refname>
+ <refpurpose>import a large object from file</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>int <function>pg_loimport</function></funcdef>
+ <paramdef>int
+ <parameter>file</parameter>
+ </paramdef>
+ <paramdef>int
+ <parameter><optional>connection_id</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ The <parameter>filename</parameter> argument specifies the pathname
+ of the file to be imported as a large object. Returns FALSE if an error
+ occurred, object id of the just created large object otherwise. Remember
+ that handling large objects in PostgreSQL must happen inside
+ a transaction.
+ </para>
+ </refsect1>
+ </refentry>
+
<refentry id="function.pg-loopen">
<refnamediv>
<refname>pg_loopen</refname>
@@ -1035,6 +1093,52 @@
</refsect1>
</refentry>
+ <refentry id="function.pg-trace">
+ <refnamediv>
+ <refname>pg_trace</refname>
+ <refpurpose>Trace a connection to PostgreSQL server</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>bool <function>pg_trace</function></funcdef>
+ <paramdef>string
+ <parameter>filename</parameter>
+ </paramdef>
+ <paramdef>string
+ <parameter><optional>mode</optional></parameter>
+ </paramdef>
+ <paramdef>int
+ <parameter><optional>connection</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Enables tracing of the PostgreSQL frontend/backend communication
+ to a debugging file. To fully understand the results one needs to be
+ familiar with the internals of PostgreSQL communication protocol.
+ For those who are not, it can still be useful for tracing errors in
+ queries sent to the server, you could do for example
+ 'grep '^To backend' trace.log' and see what queriew actually were sent
+ to the PostgreSQL server.
+ </para>
+ <para>
+ <parameter>filename</parameter> and <parameter>mode</parameter> are the
+ same as in <function>fopen</function> (<parameter>mode</parameter> defaults
+ to 'w'), <parameter>connection</parameter> specifies the connection to
+ trace and defaults to the last one opened.
+ </para>
+ <para>
+ Returns TRUE if <parameter>filename</parameter> could be opened for
+ logging, FALSE otherwise.
+ </para>
+ <para>
+ See also <function>fopen</function> and <function>pg_untrace</function>.
+ </para>
+ </refsect1>
+ </refentry>
+
<refentry id="function.pg-tty">
<refnamediv>
<refname>pg_tty</refname>
@@ -1052,6 +1156,35 @@
<function>pg_tty</function> will return the tty name that server
side debugging output is sent to on the given PostgreSQL
connection identifier.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="function.pg-untrace">
+ <refnamediv>
+ <refname>pg_untrace</refname>
+ <refpurpose>Stop tracing a connection to PostgreSQL server</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>bool <function>pg_untrace</function></funcdef>
+ <paramdef>int
+ <parameter><optional>connection</optional></parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Stop tracing started by <function>pg_trace</function>.
+ <parameter>connection</parameter> specifies the connection that was
+ traced and defaults to the last one opened.
+ </para>
+ <para>
+ Returns always TRUE.
+ </para>
+ <para>
+ See also <function>pg_trace</function>.
</para>
</refsect1>
</refentry>
- Next message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions url.xml"
- Previous message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions xml.xml"
- Next in thread: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions pgsql.xml"
- Maybe reply: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions pgsql.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

