Re: binary data storage

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: Denis Gasparin <denis(at)edistar(dot)com>, PostgreSQL Mailing Lists-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: binary data storage
Date: 2002-04-05 11:01:05
Message-ID: 20020405110107.7DFA0FDD7@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jue 04 Abr 2002 13:08, Doug McNaught wrote:
> =?iso-8859-15?q?Mart=EDn=20Marqu=E9s?= <martin(at)bugs(dot)unl(dot)edu(dot)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(at)unl(dot)edu(dot)ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Scherbaum 2002-04-05 13:40:18 Re: Porting from MySql - meta data issues
Previous Message Frank Joerdens 2002-04-05 10:30:39 Re: auto increment primary key