pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: j.random.programmer <javadesigner@yahoo.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in 7.4_213 driver: returns VARCHAR instead of
Date: Fri, 30 Jul 2004 12:03:25 +1200
Message-ID: <4109904D.3090807@opencloud.com> (raw)
In-Reply-To: <20040729225720.15045.qmail@web14207.mail.yahoo.com>
References: <20040729225720.15045.qmail@web14207.mail.yahoo.com>

j.random.programmer wrote:

> Why are the getXXXStream methods "rarely the correct
> thing" ?
> Ignoring current implementation artifacts (if any),
> they
> are almost always the _right_ thing for large amounts
> of
> data.

The point is that it *is* all about current implementation artifacts. 
There's no way to stream a text value from the server on demand using 
the current protocol. So if you use getXXXStream() with the current 
driver, you always end up wrapping data that's completely on-heap anyway 
with an unnecessary stream interface. Note that this is more of a 
client/server protocol issue than a driver issue (and it's not obvious 
how to solve it at the protocol level anyway).

As Barry said, returning LONGVARCHAR implies the preferred access method 
is via getXXXStream() (see the jdbc type mapping tables), but those 
aren't the best methods for accessing text columns in our current 
implementation. And the metadata should reflect the characteristics of 
the driver implementation actually used, surely..

-O



view thread (6+ messages)

Message-ID: <4109904D.3090807@opencloud.com>
Permalink:  ../4109904D.3090807@opencloud.com/
Also on:    postgresql.org/message-id/4109904D.3090807@opencloud.com

 · 

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: oliver@opencloud.com, javadesigner@yahoo.com, books@ejurka.com
  Subject: Re: Bug in 7.4_213 driver: returns VARCHAR instead of
  In-Reply-To: <4109904D.3090807@opencloud.com>
  References: <20040729225720.15045.qmail@web14207.mail.yahoo.com> <4109904D.3090807@opencloud.com>

* 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