pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Thomas Hallgren <thhal@mailblocks.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: BLOBs etc
Date: Fri, 7 Jan 2005 04:09:41 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0501070358040.5420@leary.csoft.net> (raw)
In-Reply-To: <thhal-039q5AjP7cS42CBhfGQRJSbsD5gGska@mailblocks.com>
References: <crkrbc$t8c$1@sea.gmane.org>
	<Pine.BSO.4.56.0501062135090.10098@leary.csoft.net>
	<41DDFC46.1080807@upb.de>
	<Pine.BSO.4.56.0501062211370.25172@leary.csoft.net>
	<41DE0680.4030103@upb.de>
	<Pine.BSO.4.56.0501062258280.6327@leary.csoft.net>
	<41DE0D9B.7050104@upb.de>
	<Pine.BSO.4.56.0501062328590.14356@leary.csoft.net>
	<41DE1C70.604@upb.de>
	<Pine.BSO.4.56.0501070029280.743@leary.csoft.net>
	<41DE425C.9090601@mailblocks.com>
	<thhal-039q5AjP7cS42CBhfGQRJSbsD5gGska@mailblocks.com>



On Fri, 7 Jan 2005, Thomas Hallgren wrote:

> Kris Jurka wrote:
> > That would work, but it's not going to happen.  Setting up and using a
> > large object is completely different than just stashing data in a bytea
> > field.  Convincing the server to do simple conversions is difficult
> > enough, getting it to do something of this magnitude is out of the
> > question.
> > 
> Why? After all, both types represent a sequence of bytes so it's not 
> really doing a conversion. It's just allowing multiple ways of accessing it.
> 
> I'm not sure it would be that much work to actaully make the server 
> accept both "by value" and "by stream" semantics for both types. 
> Implemented correctly, all clients (not just JDBC) could benefit.
> 

I'm not clear what your advocating in concrete terms.  A new pseudo type 
"binary data" that could be used until it needs to convert it into a 
concrete type?  When does this conversion have to happen?  Consider cases 
like:

SELECT ? = ?;

SELECT myfunc(?);

INSERT INTO mytab SELECT * FROM (SELECT 1 UNION SELECT 2) t1(a) LEFT 
JOIN (SELECT 1, ?) t2(a) on (t1.a = t2.a);


In the abstract, sure they're both just streams of bytes, but I think when 
you have to actually handle this in the server you'll find they are not so 
similar.

Note also that when streaming a large object to the server, you are
streaming it directly into permanent storage a chunk at a time so not much
memory is used.  If you don't know where it is going you can't stream it
to it's destination and you've got to either put it into a temporary disk
location or keep it in memory.

Kris Jurka



view thread (23+ messages)  latest in thread

Message-ID: <Pine.BSO.4.56.0501070358040.5420@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0501070358040.5420@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0501070358040.5420@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, thhal@mailblocks.com
  Subject: Re: BLOBs etc
  In-Reply-To: <Pine.BSO.4.56.0501070358040.5420@leary.csoft.net>
  References: <crkrbc$t8c$1@sea.gmane.org> <Pine.BSO.4.56.0501062135090.10098@leary.csoft.net> <41DDFC46.1080807@upb.de> <Pine.BSO.4.56.0501062211370.25172@leary.csoft.net> <41DE0680.4030103@upb.de> <Pine.BSO.4.56.0501062258280.6327@leary.csoft.net> <41DE0D9B.7050104@upb.de> <Pine.BSO.4.56.0501062328590.14356@leary.csoft.net> <41DE1C70.604@upb.de> <Pine.BSO.4.56.0501070029280.743@leary.csoft.net> <41DE425C.9090601@mailblocks.com> <thhal-039q5AjP7cS42CBhfGQRJSbsD5gGska@mailblocks.com> <Pine.BSO.4.56.0501070358040.5420@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox