|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-05-18 03:43 UTC] eschmid
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
To use PostgreSQL large objects from PHP3, you must include your code in a transaction. This not explained in the PHP documentation (ok, this a PostgreSQL related problem but it still would be nice to add a short description of this issue in the PHP documentation). Here is a valid PHP code to create a large object in a PostgreSQL database: <? $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"); ?>