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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 17 02:01:26 2018 UTC