Re: patches for jdbc1 (fwd)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org, Peter T Mount <peter(at)retep(dot)org(dot)uk>
Subject: Re: patches for jdbc1 (fwd)
Date: 2001-05-16 16:19:12
Message-ID: 200105161619.f4GGJCf11829@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Patch applied. Seems it backpatches jdbc2 fixes into jdbc1, plus ANT
fixes. Thanks.

> Peter M., can you examine this patch?
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
>
> Index: contrib/retep/build.xml
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/contrib/retep/build.xml,v
> retrieving revision 1.4
> diff -c -r1.4 build.xml
> *** contrib/retep/build.xml 2001/03/11 11:06:59 1.4
> --- contrib/retep/build.xml 2001/03/20 21:26:48
> ***************
> *** 22,27 ****
> --- 22,32 ----
> <available property="xml" classname="org.xml.sax.Parser" />
> </target>
>
> + <target name="warning" depends="checks" unless="jdk1.2+">
> + <echo message="WARNING -- contributed retep tools need jdk1.2 or later -- compilation NOT done." />
> + </target>
> +
> +
> <!-- Prepares the build by creating a directory to place the class files -->
> <target name="prepare">
> <mkdir dir="${dest}" />
> ***************
> *** 35,41 ****
> </target>
>
> <!-- Builds the XML Tools -->
> ! <target name="compile" depends="checks,prepare">
> <javac srcdir="${src}" destdir="${dest}">
> <include name="${package}/**" />
> </javac>
> --- 40,46 ----
> </target>
>
> <!-- Builds the XML Tools -->
> ! <target name="compile" depends="checks,prepare,warning" if="jdk1.2+">
> <javac srcdir="${src}" destdir="${dest}">
> <include name="${package}/**" />
> </javac>
> Index: src/interfaces/jdbc/build.xml
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/build.xml,v
> retrieving revision 1.8
> diff -c -r1.8 build.xml
> *** src/interfaces/jdbc/build.xml 2001/03/11 11:07:00 1.8
> --- src/interfaces/jdbc/build.xml 2001/03/20 21:26:59
> ***************
> *** 120,125 ****
> --- 120,126 ----
> <javac srcdir="${src}" destdir="${dest}">
> <include name="example/**" />
> <exclude name="example/corba/**"/>
> + <exclude name="example/blobtest.java" unless="jdk1.2+" />
> </javac>
> </target>
>
> Index: src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java,v
> retrieving revision 1.9
> diff -c -r1.9 ResultSet.java
> *** src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java 2001/01/24 23:41:04 1.9
> --- src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java 2001/03/20 21:27:04
> ***************
> *** 227,233 ****
> */
> public short getShort(int columnIndex) throws SQLException
> {
> ! String s = getString(columnIndex);
>
> if (s != null)
> {
> --- 227,233 ----
> */
> public short getShort(int columnIndex) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
>
> if (s != null)
> {
> ***************
> *** 250,256 ****
> */
> public int getInt(int columnIndex) throws SQLException
> {
> ! String s = getString(columnIndex);
>
> if (s != null)
> {
> --- 250,256 ----
> */
> public int getInt(int columnIndex) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
>
> if (s != null)
> {
> ***************
> *** 273,279 ****
> */
> public long getLong(int columnIndex) throws SQLException
> {
> ! String s = getString(columnIndex);
>
> if (s != null)
> {
> --- 273,279 ----
> */
> public long getLong(int columnIndex) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
>
> if (s != null)
> {
> ***************
> *** 296,302 ****
> */
> public float getFloat(int columnIndex) throws SQLException
> {
> ! String s = getString(columnIndex);
>
> if (s != null)
> {
> --- 296,302 ----
> */
> public float getFloat(int columnIndex) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
>
> if (s != null)
> {
> ***************
> *** 319,325 ****
> */
> public double getDouble(int columnIndex) throws SQLException
> {
> ! String s = getString(columnIndex);
>
> if (s != null)
> {
> --- 319,325 ----
> */
> public double getDouble(int columnIndex) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
>
> if (s != null)
> {
> ***************
> *** 344,350 ****
> */
> public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
> {
> ! String s = getString(columnIndex);
> BigDecimal val;
>
> if (s != null)
> --- 344,350 ----
> */
> public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
> {
> ! String s = getFixedString(columnIndex);
> BigDecimal val;
>
> if (s != null)
> ***************
> *** 412,425 ****
> String s = getString(columnIndex);
> if(s==null)
> return null;
> ! SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
> ! try {
> ! return new java.sql.Date(df.parse(s).getTime());
> ! } catch (ParseException e) {
> ! throw new PSQLException("postgresql.res.baddate",new Integer(e.getErrorOffset()),s);
> ! }
> }
> !
> /**
> * Get the value of a column in the current row as a java.sql.Time
> * object
> --- 412,422 ----
> String s = getString(columnIndex);
> if(s==null)
> return null;
> !
> ! return java.sql.Date.valueOf(s);
> }
> !
> !
> /**
> * Get the value of a column in the current row as a java.sql.Time
> * object
> Index: src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java,v
> retrieving revision 1.7
> diff -c -r1.7 Statement.java
> *** src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java 2001/01/31 09:23:45 1.7
> --- src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java 2001/03/20 21:27:05
> ***************
> *** 22,28 ****
> * @see java.sql.Statement
> * @see ResultSet
> */
> ! public class Statement implements java.sql.Statement
> {
> Connection connection; // The connection who created us
> java.sql.ResultSet result = null; // The current results
> --- 22,28 ----
> * @see java.sql.Statement
> * @see ResultSet
> */
> ! public class Statement extends org.postgresql.Statement implements java.sql.Statement
> {
> Connection connection; // The connection who created us
> java.sql.ResultSet result = null; // The current results
> ***************
> *** 288,294 ****
> */
> public java.sql.ResultSet getResultSet() throws SQLException
> {
> ! if (result != null) && ((org.postgresql.ResultSet)result.reallyResultSet())
> return result;
> return null;
> }
> --- 288,294 ----
> */
> public java.sql.ResultSet getResultSet() throws SQLException
> {
> ! if ((result != null) && ((org.postgresql.ResultSet)result).reallyResultSet())
> return result;
> return null;
> }
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
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 Bruce Momjian 2001-05-16 16:31:26 Re: A Bug Fix - Is this a real bug? Has this already been fixed?
Previous Message Laurent Duperval 2001-05-16 15:21:48 Re: Writing portable SQL code in Java