Re: binary data storage - Mailing list pgsql-general

From Martín Marqués
Subject Re: binary data storage
Date
Msg-id 20020405110107.7DFA0FDD7@bugs.unl.edu.ar
Whole thread Raw
In response to Re: binary data storage  (Doug McNaught <doug@wireboard.com>)
List pgsql-general
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
-----------------------------------------------------------------

pgsql-general by date:

Previous
From: "Marin Dimitrov"
Date:
Subject: Re: auto increment primary key
Next
From: Geoff Caplan
Date:
Subject: Porting from MySql - meta data issues