patches for jdbc1 (fwd)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема patches for jdbc1 (fwd)
Дата
Msg-id Pine.LNX.4.30.0103212032000.1694-100000@peter.localdomain
обсуждение исходный текст
Ответы Re: patches for jdbc1 (fwd)  (Peter T Mount <peter@retep.org.uk>)
Re: patches for jdbc1 (fwd)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-jdbc
Peter M., can you examine this patch?

--
Peter Eisentraut      peter_e@gmx.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;
      }




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: pg703: support for Large objects via JDBC PreparedStatement.setBi naryStream()
Следующее
От: Bart
Дата:
Сообщение: I can't connect