On Jue 04 Abr 2002 13:08, Doug McNaught wrote:
> =?iso-8859-15?q?Mart=EDn=20Marqu=E9s?= <martin@bugs.unl.edu.ar> writes:
> > I still don't get it.
> > If I use pg_lo* to put my binary data in the database, where will it be,
> > always talking about the structure of the database.
> > Example:
> > A table with 5 fields, and one is of type oid, and I want to insert data
> > (a new row to the table) in which I have a binary file to put in the oid
> > field.
> >
> > And how about if I have more then one oid field?
> >
> > I see no specification on which field the binary object will be inserted.
>
> Here's the way it works:
>
> You create the LO with lo_create() or lo_import(). These give you an
> OID that is your "handle" for getting at the LO data. You then store
> the OID in a column of type 'oid' in one or more of your tables.
>
> To retrieve the LO data, fetch the OID from the table it lives in, and
> use lo_open() and lo_read() to fetch the actual data.
That's the problem, at least with PHP! I can't see any reference to the
column of type oid in the functions, so where is it storing the data, or
getting the data from?
Saludos... :-)
--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------