Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 515121337B8C for ; Fri, 12 Nov 2010 01:24:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08115-03-3 for ; Fri, 12 Nov 2010 05:24:44 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 562E61337BD2 for ; Fri, 12 Nov 2010 01:24:39 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id oAC5Ocs1044052 for ; Fri, 12 Nov 2010 01:24:38 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id oAC5O8Bb043865 for pgsql-jdbc@postgresql.org; Fri, 12 Nov 2010 01:24:08 -0400 (AST) (envelope-from news) From: Lew X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: PSQLException: The column name was not found in this ResultSet. Date: Fri, 12 Nov 2010 00:24:20 -0500 Organization: albasani.net Lines: 43 Message-ID: References: <270369.52816.qm@web113412.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: Cancel-Lock: sha1:ozLFg9h8teKjQglcvIRY0Taw3uc= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.14) Gecko/20101006 Thunderbird/3.0.9 Injection-Info: news.albasani.net; logging-data="El5nsHXxwN3k0N3ciMoYROOyNVBexKVFaSUrx5UOvKPwajGMsbxlWKWsFxcLveGQwtrj/ixDdVP9FNlSYHjaUhF3uTZ8X/0iQiRDYpID4Auu+gKRKUwcDOA8VVcs5Xqv"; mail-complaints-to="abuse@albasani.net" To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_40=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/28 X-Sequence-Number: 21149 Samuel Gendler wrote: >>> Code which utilizes a >>> ResultSet should do so in a thread safe manner, rather than attempting >>> to make the resultset implementation thread-safe - unless my assumptions >>> about the intent of the interface designers is incorrect. Lew wrote: >> It is meaningless to talk about thread safety with respect to interfaces. Maciek Sakrejda wrote: > I think Samuel was talking about the thread-safety guarantees of the > interface contract. E.g., the List interface does not guarantee It is meaningless to talk about thread safety with respect to interfaces. Thread safety is an implementation guarantee (or lack thereof), not discernible nor enforceable by an interface. > thread-safety, so if you want to call add() on multiple Lists from > multiple threads, synchronization is your responsibility. If the If you want to call 'add()' on multiple 'List's from multiple threads, even if you are using thread-safe implementations, if the actions among the several list instances needs to be coordinated then synchronization is your responsibility. > interface contract of ResultSet does not guarantee thread safety, I Because interfaces cannot guarantee thread safety. > don't see why the driver should bother to offer it there. Hashtable, > Vector, and StringBuffer took that route, and look at them now. Those are not interfaces. It is impossible for ResultSet to guarantee thread safety. It is also impossible for List to guarantee thread safety, yet 'java.util.concurrent.CopyOnWriteArrayList' is a "thread-safe variant of ArrayList". Thread safety lives or dies only in the implementation. -- Lew