pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: getXXX methods
Date: Tue, 06 Jul 2004 21:29:46 -0400
Message-ID: <1089163786.1506.180.camel@localhost.localdomain> (raw)
In-Reply-To: <40EB4D85.6080100@opencloud.com>
References: <1088795907.1536.118.camel@localhost.localdomain>
	<Pine.BSO.4.56.0407061336560.12042@leary.csoft.net>
	<1089145387.1506.65.camel@localhost.localdomain>
	<Pine.BSO.4.56.0407061559110.373@leary.csoft.net>
	<1089154614.1508.70.camel@localhost.localdomain>
	<40EB385F.9030704@opencloud.com>
	<1089162095.1508.173.camel@localhost.localdomain>
	<40EB4D85.6080100@opencloud.com>

hmmm... Ok, just read it.

Presumably the warning would be added to the result set object?

I doubt this was the intended use as the table infers that using any of
the non-preferred methods will cast to the requested type.  I do see
this as a good thing assuming the programmer is aware of the warnings,
and is handling them.

I do have one concern however: Lets suppose that the user gets a very
large result set and starts scrolling through it, we keep adding
warnings to it and we run out of memory?

Dave
On Tue, 2004-07-06 at 21:10, Oliver Jowett wrote:
> Dave Cramer wrote:
> > Oliver,
> > 
> > Well as Kris pointed out the javadoc is next to useless here. I see no
> > harm in truncating the data, my assumption being that the user knows
> > what they are doing.
> 
> If the application really wants silent truncation without warning can't 
> they do it directly in the query?
> 
> I think generating DataTruncation (nb: as a *warning*, not throwing an 
> exception) is still a good idea. Then at least the application gets some 
> sort of notification.
> 
> Have you read the DataTruncation javadoc & spec section?
> 
> -O
> 
> 
> 
> !DSPAM:40eb4d8f105802968417614!
> 
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561




view thread (17+ messages)  latest in thread

Message-ID: <1089163786.1506.180.camel@localhost.localdomain>
Permalink:  ../1089163786.1506.180.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1089163786.1506.180.camel@localhost.localdomain

 · 

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: pg@fastcrypt.com, oliver@opencloud.com, books@ejurka.com
  Subject: Re: getXXX methods
  In-Reply-To: <1089163786.1506.180.camel@localhost.localdomain>
  References: <1088795907.1536.118.camel@localhost.localdomain> <Pine.BSO.4.56.0407061336560.12042@leary.csoft.net> <1089145387.1506.65.camel@localhost.localdomain> <Pine.BSO.4.56.0407061559110.373@leary.csoft.net> <1089154614.1508.70.camel@localhost.localdomain> <40EB385F.9030704@opencloud.com> <1089162095.1508.173.camel@localhost.localdomain> <40EB4D85.6080100@opencloud.com> <1089163786.1506.180.camel@localhost.localdomain>

* 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