From: Lew <noone@lewscanon.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: PSQLException: The column name <col> was not found in this ResultSet.
Date: Fri, 12 Nov 2010 00:24:20 -0500
Message-ID: <ibij1o$kgv$1@news.albasani.net> (raw)
In-Reply-To: <AANLkTimKWEdBdJS2gRFLYrHcAHNiA-Hx8=KGA7ucu3HH@mail.gmail.com>
References: <270369.52816.qm@web113412.mail.gq1.yahoo.com>
<alpine.BSO.2.00.1011091909160.7107@leary.csoft.net>
<AANLkTimb4b+hv-8M+VwEUw_91y6Bw75u+i26sVZCD=kF@mail.gmail.com>
<ibi7js$71l$1@news.albasani.net>
<AANLkTimKWEdBdJS2gRFLYrHcAHNiA-Hx8=KGA7ucu3HH@mail.gmail.com>
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<E>' is a "thread-safe variant of
ArrayList".
Thread safety lives or dies only in the implementation.
--
Lew
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: noone@lewscanon.com
Subject: Re: PSQLException: The column name <col> was not found in this ResultSet.
In-Reply-To: <ibij1o$kgv$1@news.albasani.net>
References: <270369.52816.qm@web113412.mail.gq1.yahoo.com> <alpine.BSO.2.00.1011091909160.7107@leary.csoft.net> <AANLkTimb4b+hv-8M+VwEUw_91y6Bw75u+i26sVZCD=kF@mail.gmail.com> <ibi7js$71l$1@news.albasani.net> <AANLkTimKWEdBdJS2gRFLYrHcAHNiA-Hx8=KGA7ucu3HH@mail.gmail.com> <ibij1o$kgv$1@news.albasani.net>
* 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