Skip site navigation (1) Skip section navigation (2)

patches for jdbc1 (fwd)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Cc: Peter T Mount <peter(at)retep(dot)org(dot)uk>
Subject: patches for jdbc1 (fwd)
Date: 2001-03-21 19:33:25
Message-ID: Pine.LNX.4.30.0103212032000.1694-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-jdbc
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;
  	}




Responses

pgsql-jdbc by date

Next:From: BartDate: 2001-03-21 20:00:45
Subject: I can't connect
Previous:From: Peter T MountDate: 2001-03-21 14:26:56
Subject: Re: pg703: support for Large objects via JDBC PreparedStatement.setBi naryStream()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group