Skip site navigation (1) Skip section navigation (2)

Re: streaming access to bytea data

From: Kris Jurka <books(at)ejurka(dot)com>
To: David Durham <ddurham(at)vailsys(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: streaming access to bytea data
Date: 2006-03-18 00:21:57
Message-ID: Pine.BSO.4.63.0603171918240.22748@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Fri, 17 Mar 2006, David Durham wrote:

> 1 - Does Postgres server load the entire bytea column before sending to 
> clients?

Yes.

> Might not be the right list for the previous question, but I thought someone 
> might know.
>
> 2 - Does the current postgres jdbc driver support streaming reads/writes of 
> bytea columns?  I saw in the archives that someone submitted a patch for 
> streaming writes, but I didn't see anything regarding reads.

The JDBC driver can stream the write to the server, but the server will 
still read the entire stream before writing it to disk, so it's a client 
only streaming.

> If the jdbc driver doesn't currently support streaming reads, are there any 
> plans to add this feature?  Any particular technical hurdles?
>

The JDBC driver doesn't support streaming reads, nor does any other client 
interface.  You would need to extend the frontend/backend protocol to 
return some sort of pointer to the bytea reference rather than the whole 
thing.  This will still require the server to store the whole bytea result 
somewhere to allow it to be pointed to.

Perhaps you should think about using large objects instead of bytea?

Kris Jurka


In response to

Responses

pgsql-jdbc by date

Next:From: David DurhamDate: 2006-03-18 00:27:10
Subject: Re: streaming access to bytea data
Previous:From: David DurhamDate: 2006-03-17 23:51:42
Subject: streaming access to bytea data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group