Re: Large objects

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: kalium(at)usa(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Large objects
Date: 2000-06-15 05:53:39
Message-ID: 20000615145339X.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi everyone, I have to insert a few PDF files into my database, and I
> am not able to do it ...
> I have to use PHP3, and all I could do was use the lo_import, but in
> this case, I am not able to insert any data because I am not an
> administrator. Is there any other way of doing it, using, let's say,
> pg_locreate, pg_loopen, or something like that ?
> Thanx in advance.

Of course you can. The essential part of the program should look like:

pg_exec($con,"begin");
$oid = pg_locreate($con);
$lobj = pg_loopen($con,$oid,"w");
/* read your PDF file contents into $img variable */
pg_lowrite($lobj,$img);
pg_loclose($lobj);
pg_exec($con,"end");
--
Tatsuo Ishii

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Teege 2000-06-15 07:35:23 group by problem
Previous Message Vipin Samtani 2000-06-15 04:52:49 Access Permission Denied