Re: jdbc ResultSetMetaData::isWritable()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
Cc: ian(at)labfire(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: jdbc ResultSetMetaData::isWritable()
Date: 2001-09-06 20:43:51
Message-ID: 200109062043.f86Khpq21728@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Change applied. Thanks.

> On Thu, 6 Sep 2001 14:26:49 -0400 (EDT), you wrote:
> >Well, if it is that easy, I can do it. Patch attached and applied.
> >
> >> On Mon, 3 Sep 2001 22:01:17 -0500, you wrote:
> >> public boolean isWritable(int column) throws SQLException
> >> {
> >> return !isReadOnly(column);
> >> }
>
> Actually, I think this change has a consequence for this method
> in the same class:
>
> public boolean isDefinitelyWritable(int column)
> throws SQLException
> {
> return isWritable(column);
> }
>
> This is from the JDBC spec
> (http://java.sun.com/j2se/1.3/docs/api/java/sql/ResultSetMetaData.html):
>
> isReadOnly() - Indicates whether the designated column is
> definitely not writable.
>
> isWritable() - Indicates whether it is possible for a write on
> the designated column to succeed.
>
> isDefinitelyWritable() - Indicates whether a write on the
> designated column will definitely succeed.
>
> At this time we don't really implement the fine semantics of
> these methods. I would suggest the following defaults:
>
> isReadOnly() false
> isWritable() true
> isDefinitelyWritable() false
>
> And that would mean that your patch is correct, but
> isDefinitelyWritable() would need to be patched accordingly:
>
> public boolean isDefinitelyWritable(int column)
> throws SQLException
> {
> return false;
> }
>
> Again, both in jdbc1 and jdbc2.
>
> Regards,
> Ren? Pijlman <rene(at)lab(dot)applinet(dot)nl>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Joseph Shraibman 2001-09-06 20:44:22 Re: Patch for jdbc2 ResultSet.java
Previous Message Rene Pijlman 2001-09-06 20:36:55 Re: jdbc ResultSetMetaData::isWritable()