1. 24 Jun, 2002 1 commit
  2. 13 Jun, 2002 2 commits
  3. 19 Nov, 2001 1 commit
  4. 14 Nov, 2001 1 commit
  5. 25 Oct, 2001 1 commit
  6. 23 Sep, 2001 1 commit
    • Bruce Momjian's avatar
      The attached patch is my first run-through of the JDBC test suite. A · b75814ae
      Bruce Momjian authored
      summary of changes:
      
       . removal of the tablename property from build.xml
      
       . addition of a dropTable method in JDBC2Tests and cleanups of many
      methods in the same
      
       . all tests now use non-deprecated assertXYZ methods instead of the
      deprecated assert method
      
       . failure in TimestampTest (testSetTimestamp) fixed. The failure is
      because testSetTimestamp was inserting a timestamp with hour 7 but
      checkTimeTest was expecting a timestamp with hour 8. AFAICS, there are
      no issues wrt daylight savings time and timestamps being pushed in and
      pulled out (but more explicit tests should be added in the future)
      
       . failure in TimeTest (testGetTime) fixed. Times to be inserted were
      interpreted in the localtime zone but checking was done with the
      assumption that the insertion was done in GMT.
      
       . formatting changes in a few of the source files (because I found
      it convenient to have consistent formatting while working on them). The
      formatting is consistent with the new format for java source files in
      PostgreSQL.
      
      Liam Stewart
      b75814ae
  7. 07 Sep, 2001 1 commit
    • Bruce Momjian's avatar
      Attached is a patch that fixes 2 test cases of the JDBC test · b6385efb
      Bruce Momjian authored
      suite. This reduces the number of failures from 9 to 7.
      
      Both ConnectionTest and JBuilderTest did not create their own
      tables, which caused these test cases to fail with "relation ...
      does not exist". It appears these test cases relied on tables
      created by the example code elsewhere in the source tree. I've
      added the necessary "create table" and "drop table" statements
      to the test cases, using the column definitions from the example
      code.
      
      While working on that I modified the helper method createTable
      in JDBC2Tests.java to take a table parameter, rather than using
      table names passed via the properties in build.xml. I'm not sure
      what that was good for, and in fact, except for the default
      table name "jdbctest", this functionality wasn't used at all.
      
      Ren? Pijlman
      b6385efb
  8. 06 Sep, 2001 1 commit
    • Bruce Momjian's avatar
      Attached is a patch for current CVS, consisting of a cvs diff -c · d99794e6
      Bruce Momjian authored
      for the changed files and a few new files:
      - test/jdbc2/BatchExecuteTest.java
      - util/MessageTranslator.java
      - jdbc2/PBatchUpdateException.java
      
      As an aside, is this the best way to submit a patch consisting
      of both changed and new files? Or is there a smarter cvs command
      which gets them all in one patch file?
      
      This patch fixes batch processing in the JDBC driver to be
      JDBC-2 compliant. Specifically, the changes introduced by this
      patch are:
      
      1) Statement.executeBatch() no longer commits or rolls back a
      transaction, as this is not prescribed by the JDBC spec. Its up
      to the application to disable autocommit and to commit or
      rollback the transaction. Where JDBC talks about "executing the
      statements as a unit", it means executing the statements in one
      round trip to the backend for better performance, it does not
      mean executing the statements in a transaction.
      
      2) Statement.executeBatch() now throws a BatchUpdateException()
      as required by the JDBC spec. The significance of this is that
      the receiver of the exception gets the updateCounts of the
      commands that succeeded before the error occurred. In order for
      the messages to be translatable, java.sql.BatchUpdateException
      is extended by org.postgresql.jdbc2.PBatchUpdateException() and
      the localization code is factored out from
      org.postgresql.util.PSQLException to a separate singleton class
      org.postgresql.util.MessageTranslator.
      
      3) When there is no batch or there are 0 statements in the batch
      when Statement.executeBatch() is called, do not throw an
      SQLException, but silently do nothing and return an update count
      array of length 0. The JDBC spec says "Throws an SQLException if
      the driver does not support batch statements", which is clearly
      not the case. See testExecuteEmptyBatch() in
      BatchExecuteTest.java for an example. The message
      postgresql.stat.batch.empty is removed from the language
      specific properties files.
      
      4) When Statement.executeBatch() is performed, reset the
      statement's list of batch commands to empty. The JDBC spec isn't
      100% clear about this. This behaviour is only documented in the
      Java tutorial
      (http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/batchupdates.html).
      Note that the Oracle JDBC driver also resets the statement's
      list in executeBatch(), and this seems the most reasonable
      interpretation.
      
      5) A new test case is added to the JDBC test suite which tests
      various aspects of batch processing. See the new file
      BatchExecuteTest.java.
      
      Regards,
      Ren? Pijlman
      d99794e6
  9. 21 Jul, 2001 1 commit
    • Bruce Momjian's avatar
      JDBC encoding additions. · ff21a8e5
      Bruce Momjian authored
      Here's a patch against the current CVS. The changes from the previous
      patch are mostly related to the changed interface for PG_Stream.
      
      Anders Bengtsson
      ff21a8e5
  10. 14 Feb, 2001 1 commit
    • Peter Mount's avatar
      Web Feb 14 17:29:00 GMT 2001 peter@retep.org.uk · bb7b7182
      Peter Mount authored
              - Fixed bug in LargeObject & BlobOutputStream where the stream's output
                was not flushed when either the stream or the blob were closed.
              - Fixed PreparedStatement.setBinaryStream() where it ignored the length
      bb7b7182
  11. 13 Feb, 2001 1 commit
    • Peter Mount's avatar
      Some more including the patch to DatabaseMetaData backed out by Bruce. · 3d21bf82
      Peter Mount authored
      Tue Feb 13 16:33:00 GMT 2001 peter@retep.org.uk
              - More TestCases implemented. Refined the test suite api's.
              - Removed need for SimpleDateFormat in ResultSet.getDate() improving
                performance.
              - Rewrote ResultSet.getTime() so that it uses JDK api's better.
      
      Tue Feb 13 10:25:00 GMT 2001 peter@retep.org.uk
              - Added MiscTest to hold reported problems from users.
              - Fixed PGMoney.
              - JBuilder4/JDBCExplorer now works with Money fields. Patched Field &
                ResultSet (lots of methods) for this one. Also changed cash/money to
                return type DOUBLE not DECIMAL. This broke JBuilder as zero scale
                BigDecimal's can't have decimal places!
              - When a Statement is reused, the previous ResultSet is now closed.
              - Removed deprecated call in ResultSet.getTime()
      
      Thu Feb 08 18:53:00 GMT 2001 peter@retep.org.uk
              - Changed a couple of settings in DatabaseMetaData where 7.1 now
                supports those features
              - Implemented the DatabaseMetaData TestCase.
      
      Wed Feb 07 18:06:00 GMT 2001 peter@retep.org.uk
              - Added comment to Connection.isClosed() explaining why we deviate from
                the JDBC2 specification.
              - Fixed bug where the Isolation Level is lost while in autocommit mode.
              - Fixed bug where several calls to getTransactionIsolationLevel()
                returned the first call's result.
      3d21bf82
  12. 07 Feb, 2001 1 commit