X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BEA60D1B1D9 for ; Tue, 6 Jul 2004 22:29:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83838-03 for ; Wed, 7 Jul 2004 01:29:36 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 8A979D1B20D for ; Tue, 6 Jul 2004 22:29:31 -0300 (ADT) Received: (qmail 13645 invoked from network); 7 Jul 2004 01:29:32 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 7 Jul 2004 01:29:32 -0000 Subject: Re: getXXX methods From: Dave Cramer Reply-To: pg@fastcrypt.com To: Oliver Jowett Cc: Kris Jurka , "pgsql-jdbc@postgresql.org" In-Reply-To: <40EB4D85.6080100@opencloud.com> References: <1088795907.1536.118.camel@localhost.localdomain> <1089145387.1506.65.camel@localhost.localdomain> <1089154614.1508.70.camel@localhost.localdomain> <40EB385F.9030704@opencloud.com> <1089162095.1508.173.camel@localhost.localdomain> <40EB4D85.6080100@opencloud.com> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1089163786.1506.180.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 06 Jul 2004 21:29:46 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/46 X-Sequence-Number: 10430 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