Re: jdbc ResultSetMetaData::isWritable()
От | Bruce Momjian |
---|---|
Тема | Re: jdbc ResultSetMetaData::isWritable() |
Дата | |
Msg-id | 200109061826.f86IQnl10236@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: jdbc ResultSetMetaData::isWritable() (Rene Pijlman <rene@lab.applinet.nl>) |
Ответы |
Re: jdbc ResultSetMetaData::isWritable()
|
Список | pgsql-jdbc |
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 > >{ > > if (isReadOnly(column)) > > return true; > > else > > return false; > >} > > The author probably intended: > > public boolean isWritable(int column) throws SQLException > { > return !isReadOnly(column); > } > > And if he would have coded it this way he wouldn't have made > this mistake :-) > > >hence, isWritable() will always return false. this is something > >of a problem :) > > Why exactly? In a way, true is just as incorrect as false, and > perhaps it should throw "not implemented". But I guess that > would be too non-backwardly-compatible. > > >let me know if i can provide further information. > > Will you submit a patch? > > Regards, > Ren? Pijlman <rene@lab.applinet.nl> > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java,v retrieving revision 1.3 diff -c -r1.3 ResultSetMetaData.java *** src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java 2001/08/24 16:50:16 1.3 --- src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java 2001/09/06 18:25:56 *************** *** 419,428 **** */ public boolean isWritable(int column) throws SQLException { ! if (isReadOnly(column)) ! return true; ! else ! return false; } /** --- 419,425 ---- */ public boolean isWritable(int column) throws SQLException { ! return !isReadOnly(column); } /** Index: src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java,v retrieving revision 1.3 diff -c -r1.3 ResultSetMetaData.java *** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java 2001/08/24 16:50:18 1.3 --- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java 2001/09/06 18:25:56 *************** *** 414,423 **** */ public boolean isWritable(int column) throws SQLException { ! if (isReadOnly(column)) ! return true; ! else ! return false; } /** --- 414,420 ---- */ public boolean isWritable(int column) throws SQLException { ! return !isReadOnly(column); } /**
В списке pgsql-jdbc по дате отправления:
Следующее
От: Tom LaneДата:
Сообщение: Re: JDBC patch procedures (Re: [PATCHES] Patch for jdbc2 ResultSet.java)