jeroen Fri Aug 3 15:24:40 2001 EDT
Modified files:
/phpdoc/en/functionspgsql.xml
Log:
Resurrected pgsql, hopefully not reserved anymore
Index: phpdoc/en/functions/pgsql.xml
diff -u /dev/null phpdoc/en/functions/pgsql.xml:1.42
--- /dev/null Fri Aug 3 15:24:40 2001
+++ phpdoc/en/functions/pgsql.xml Fri Aug 3 15:24:40 2001
@@ -0,0 +1,1458 @@
+!-- $Revision: 1.42 $ --
+ reference id=ref.pgsql
+ titlePostgreSQL functions/title
+ titleabbrevPostgreSQL/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/SQL3 language support, transaction integrity, and type
+extensibility. PostgreSQL is an open source descendant of this
+original Berkeley code.
+ /para
+ para
+PostgreSQL is available without cost. The current version is
+available at ulink url=url.pgsql;www.PostgreSQL.org/ulink.
+ /para
+ para
+Since version 6.3 (03/02/1998) PostgreSQL uses unix domain sockets.
+A table is shown below describing these new connection possibilities.
+This socket will be found in filename/tmp/.s.PGSQL.5432/filename.
+This option can be enabled with the '-i' flag to commandpostmaster
+/command and it's meaning is: listen on TCP/IP sockets as well as
+Unix domain sockets.
+table
+ titlePostmaster and PHP/title
+ tgroup cols=3
+ thead
+ row
+ entryPostmaster/entry
+ entryPHP/entry
+ entryStatus/entry
+ /row
+ /thead
+ tbody
+ row
+ entrypostmaster amp;/entry
+ entrypg_connect(dbname=MyDbName);/entry
+ entryOK/entry
+ /row
+ row
+ entrypostmaster -i amp;/entry
+!-- entrypg_connect(, , , , dbname);/entry --
+ entrypg_connect(dbname=MyDbName);/entry
+ entryOK/entry
+ /row
+ row
+ entrypostmaster amp;/entry
+ entrypg_connect(host=localhost dbname=MyDbName);/entry
+ entry
+Unable to connect to PostgreSQL server: connectDB() failed:
+Is the postmaster running and accepting TCP/IP (with -i)
+connection at 'localhost' on port '5432'? in
+/path/to/file.php3 on line 20.
+ /entry
+ /row
+ row
+ entrypostmaster -i amp;/entry
+ entrypg_connect(host=localhost dbname=MyDbName);/entry
+ entryOK/entry
+ /row
+ /tbody
+ /tgroup
+/table
+ /para
+ para
+One can establish a connection with the following value pairs
+set in the command string:
+command$conn = pg_Connect(host=myHost port=myPort tty=myTTY
+options=myOptions dbname=myDB user=myUser password=myPassword );
+/command
+ /para
+ para
+The previous syntax of:
+command$conn = pg_connect (host, port, options, tty,
+dbname)
+/command
+has been deprecated.
+ /para
+ para
+To use the large object (lo) interface, it is necessary to enclose
+it within a transaction block. A transaction block starts with a
+commandbegin/command and if the transaction was valid ends
+with commandcommit/command or commandend/command. If the
+transaction fails the transaction should be closed with
+commandrollback/command or commandabort/command.
+example
+ titleUsing Large Objects/title
+ programlisting role=php
+lt;?php
+$database = pg_Connect (dbname=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);
+?
+ /programlisting
+/example
+ /para
+ /partintro
+
+ refentry id=function.pg-close
+ refnamediv
+refnamepg_close/refname
+refpurposeClose a PostgreSQL connection/refpurpose
+ /refnamediv
+ refsect1
+titleDescription/title
+funcsynopsis
+ funcprototype
+ funcdefbool functionpg_close/function/funcdef
+ paramdefint parameterconnection/parameter/paramdef
+ /funcprototype
+/funcsynopsis
+para
+ Returns false; if connection is not a valid connection index, true;
+ otherwise. Closes down the connection to a PostgreSQL database
+ associated with the given connection index.
+/para
+notepara
+ This isn't usually necessary, as non-persistent open
+ links are automatically closed at the end of the script's
+ execution.
+/para/note
+para
+ functionpg_close/function will not close persistent links
+ generated by functionpg_pconnect/function.
+/para
+ /refsect1
+ /refentry
+
+ refentry id=function.pg-cmdtuples
+ refnamediv
+refnamepg_cmdtuples/refname
+refpurposeReturns number of affected tuples/refpurpose
+ /refnamediv
+ refsect1
+titleDescription/title
+