From: | Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
---|---|
To: | PostgreSQL Mailing Lists-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: binary data storage |
Date: | 2002-04-04 12:07:45 |
Message-ID: | 20020404120747.7AA87FA1D@bugs.unl.edu.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jue 04 Abr 2002 06:42, you wrote:
> Hi Marin,
>
> On Thu, 4 Apr 2002, Marin Dimitrov wrote:
> > search for "large objects" in the Programmer's Guide (
> > http://www.ca.postgresql.org/users-lounge/docs/#7.2 )
> >
> > in your case Large Objects (chapter 2 from the Programmer's Guide) may be
> > more appropriate than binary strings (chapter 3.4 from the User's Guide)
>
> Thanks alot. Also searched php manual and wrote the following simple code:
>
> <?
> $conn = Pg_Connect (......);
> pg_exec ($conn, "begin");
> $oid = pg_locreate ($conn);
> echo ("$oid\n");
> $handle = pg_loopen ($conn, $oid, "w");
> echo ("$handle\n");
> pg_loimport ("/etc.tar.gz");
> pg_lowrite ($handle, "/etc.tar.gz");
This is something that confuses me:
What does pg_loimport do, and what does pg_lowrite do?
> pg_loclose ($handle);
> pg_exec ($conn, "commit");
> ?>
Another question I have about using PHP and PostgreSQL Large Objects, is that
in no place there is a reference to where the lo will be stored?
I mean, where will /etc.tar.gz be stored in the Database?
Saludos... :-)
--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués | mmarques(at)unl(dot)edu(dot)ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Heiko Klein | 2002-04-04 13:32:48 | Re: hex values |
Previous Message | TPCCUVA | 2002-04-04 10:31:14 | checkpoint log |