Re: BLOB support

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Radosław Smogura <rsmogura(at)softperience(dot)eu>, Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BLOB support
Date: 2011-06-06 15:48:42
Message-ID: 4DECF6DA.8090706@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.06.2011 17:13, Tom Lane wrote:
> =?UTF-8?Q?Rados=C5=82aw_Smogura?=<rsmogura(at)softperience(dot)eu> writes:
>> I think more about this with contrast to sent references, but I still
>> have in my mind construct
>> Blob myWeddingDvd = conn.createBlob(myWeddingStream, size); //A bit
>> outdated we have BlueRay
>> conn.prepareStatemnt("INSERT INTO someonetubevideos values (?)")
>> where 1st parameter is myWeddingDvd,
>
> Yes, if you insist upon designing the API like that, then you come to
> the conclusion that you need global LOB identifiers.

That's what the JDBC api looks like, but it doesn't mean you need global
LOB identifiers. When you create the Blob object (myWeddingDvd), the
driver can just keep a reference to the given stream (myWeddingStream)
to the Blob object. When you execute the INSERT statement, the driver
can read the stream and stream the data to the server.

The protocol changes I think Tom and I and others are envisioning would
work just fine with that.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-06-06 15:48:49 Re: Different execution time for same plan
Previous Message Alvaro Herrera 2011-06-06 15:45:08 Re: Postmaster holding unlinked files for pg_largeobject table