X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 712FBD1B215 for ; Sun, 23 May 2004 19:26:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 60377-05 for ; Sun, 23 May 2004 19:25:56 -0300 (ADT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id BF41DD1B1F7 for ; Sun, 23 May 2004 19:25:52 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BS1Pl-0002fb-00; Mon, 24 May 2004 10:25:53 +1200 Message-ID: <40B124EF.1040000@opencloud.com> Date: Mon, 24 May 2004 10:25:51 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: "pgsql-jdbc@postgresql.org" Subject: Re: patch: streaming of bytea parameter values References: <4085F25A.8060009@opencloud.com> <40AF1DDE.90206@opencloud.com> <40AFEF74.6080904@opencloud.com> <40B07890.6090906@opencloud.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/163 X-Sequence-Number: 10173 Kris Jurka wrote: >>Being user-friendly when dealing with application errors is nice >>behaviour to have, but it *is* a separate issue.. > > > Separate from what, correctness? Yes. > We both agree that a short stream or > IOException is an error, but I'm not advocating the JDBC equivalent of > System.exit() as a viable solution. What makes it OK for this > particular error to destroy a Connection while no other application level > error can? The implementation of SQLState (or connectionErrorOccurred) across different drivers is quite patchy. When writing portable applications (or even driver-specific applications, to a lesser extent) you have to assume that any SQLException you don't specifically recognize means your connection is toast. I don't see that tearing down the connection for a certain class of hard-to-handle errors makes this situation any worse. -O