Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W89p0-0000Xy-19 for pgsql-jdbc@arkaria.postgresql.org; Tue, 28 Jan 2014 14:39:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W89oz-0003Yq-Fj for pgsql-jdbc@arkaria.postgresql.org; Tue, 28 Jan 2014 14:39:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W89ox-0003XM-Uq for pgsql-jdbc@postgresql.org; Tue, 28 Jan 2014 14:39:24 +0000 Received: from prod2.officenet.no ([195.159.87.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W89ou-0005pF-Vo for pgsql-jdbc@postgresql.org; Tue, 28 Jan 2014 14:39:23 +0000 Received: from localhost ([127.0.0.1] helo=prod2) by prod2.officenet.no with esmtp (Exim 4.76) (envelope-from ) id 1W89ms-0008U1-Dp for pgsql-jdbc@postgresql.org; Tue, 28 Jan 2014 15:37:14 +0100 Date: Tue, 28 Jan 2014 15:37:14 +0100 (CET) From: Andreas Joseph Krogh To: pgsql-jdbc@postgresql.org Message-ID: In-Reply-To: Subject: Re: Will Connection.createBlob be implemented any time soon? MIME-Version: 1.0 X-Mailer: OfficeNet Mail 1.9.0-SNAPSHOT X-Pg-Spam-Score: -2.4 (--) Content-Type: multipart/alternative; boundary="----=_Part_82_1827778.1390919834256" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org ------=_Part_80_1428500632.1390919834245 Content-Type: multipart/related; boundary="----=_Part_81_2090432211.1390919834245" ------=_Part_81_2090432211.1390919834245 Content-Type: multipart/alternative; boundary="----=_Part_82_1827778.1390919834256" ------=_Part_82_1827778.1390919834256 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 tirsdag 28. januar 2014 kl. 15:31:20, skrev Dave Cramer >: =C2=A0 On Tue, Jan 28, 2014 at 4:29 AM, Andreas= Joseph=20 Krogh> wrote: P=C3=A5 ti= rsdag 28.=20 januar 2014 kl. 10:21:34, skrev Florian Weimer >: On 01/28/2014 09:09 AM, Andreas Joseph Krogh= =20 wrote: > I need streaming yes, that's why I use Blobs. The PostgreSQL wire protocol does not support streaming BYTEA parameters and result data. =C2=A0 Why do you assume I use BYTEA? I use OID for myu b= lobs. =C2=A0 =C2=A0 =C2=A0 Your initial example does not actually use streaming in an essential way, so I'm not sure what you're trying to achieve. =C2=A0= Read it=20 again, it does use streaming. It copies the "is" stream out to the "os" str= eam,=20 backed by the Blob. Using EclipseLink with the pgjdbc-ng driver it works=20 perfectly using Connection.createBlob, streaming etc. I've tried streaming = >=20 200GB stuff with a Blob field in a JPA-object and it works. =C2=A0 What pus= sles me=20 is why the "official" driver doesn't implement createBlob as I thought it= =20 should be a quit common use-case to want to stream large data-chunks in the= db=20 (for tx-purposes). =C2=A0 =C2=A0 Apparently it isn't a common use-case as t= he driver has=20 never had it.=C2=A0 =C2=A0 Apparently not common in pg-land. =C2=A0 -- Andreas Joseph Krogh =C2=A0 =C2=A0 =C2=A0 mob: +47 9= 09 56 963 Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no Public key: http://home.officenet.no/~andreak/public_key.asc =C2=A0 ------=_Part_82_1827778.1390919834256 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 tirsdag 28. januar 2014 kl. 15:31:20, skrev Dave Cramer <pg@fastcrypt.com>= ;:
=C2=A0
On Tue, Jan 28, 2014 at 4:29 AM, Andreas Joseph = Krogh <andreak@officenet.no> wrote:
P=C3=A5 tirsdag 28. januar 2014 kl. 10:21:34, skrev Florian Weimer <= ;fweimer@redhat.com= >:
On 01/28= /2014 09:09 AM, Andreas Joseph Krogh wrote:

> I need streaming yes, that's why I use Blobs.

The PostgreSQL wire protocol does not support streaming BYTEA parameters and result data.
=C2=A0
Why do y= ou assume I use BYTEA? I use OID for myu blobs.
=C2=A0
=C2=A0
=C2=A0 Y= our initial example does not actually use streaming
in an essential way, so I'm not sure what you're trying to achieve.
=C2=A0
Read it again, it does use streaming. It copies the "is" str= eam out to the "os" stream, backed by the Blob.
Using EclipseLink with the pgjdbc-ng driver it works perfectly using C= onnection.createBlob, streaming etc. I've tried streaming > 200GB stuff = with a Blob field in a JPA-object and it works.
=C2=A0
What pussles me is why the "official" driver doesn't impleme= nt createBlob as I thought it should be a quit common use-case to want to s= tream large data-chunks in the db (for tx-purposes).
=C2=A0
=C2=A0
Apparently it isn't a common use-case as the driver has never had it.= =C2=A0
=C2=A0
Apparently not common in pg-land.
=C2=A0
--
Andreas Joseph Krogh <andreak@officenet.no>=C2=A0 =C2=A0 =C2=A0 mob: = +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no Public key: http://home.officenet.no/~andreak/public_key.asc
=C2=A0
------=_Part_82_1827778.1390919834256-- ------=_Part_81_2090432211.1390919834245-- ------=_Part_80_1428500632.1390919834245--