Re: BLOB support - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: BLOB support
Date
Msg-id 4DECF6DA.8090706@enterprisedb.com
Whole thread Raw
In response to Re: BLOB support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 06.06.2011 17:13, Tom Lane wrote:
> Radosław Smogura<rsmogura@softperience.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Postmaster holding unlinked files for pg_largeobject table
Next
From: "Kevin Grittner"
Date:
Subject: Re: Different execution time for same plan