php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #380 Using large objects
Submitted: 1998-05-16 18:46 UTC Modified: 1998-05-18 03:43 UTC
From: avernet at scdi dot org Assigned: eschmid (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 3.0 Release Candidate 4 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: avernet at scdi dot org
New email:
PHP Version: OS:

 

 [1998-05-16 18:46 UTC] avernet at scdi dot org
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");
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-18 03:43 UTC] eschmid
Example added to the manual. It' s now in the CVS repository at the end 
of the partintro to the pgsql functions

Thanks to Alessandro and Jouni.

-Egon
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 12:01:27 2025 UTC