- Jan 18, 2001
-
-
Peter Mount authored
- These methods in org.postgresql.jdbc2.ResultSet are now implemented: getBigDecimal(int) ie: without a scale (why did this get missed?) getBlob(int) getCharacterStream(int) getConcurrency() getDate(int,Calendar) getFetchDirection() getFetchSize() getTime(int,Calendar) getTimestamp(int,Calendar) getType() NB: Where int represents the column name, the associated version taking a String were already implemented by calling the int version. - These methods no longer throw the not implemented but the new noupdate error. This is in preparation for the Updateable ResultSet support which will overide these methods by extending the existing class to implement that functionality, but needed to show something other than notimplemented: cancelRowUpdates() deleteRow() - Added new error message into errors.properties "postgresql.noupdate" This is used by jdbc2.ResultSet when an update method is called and the ResultSet is not updateable. A new method notUpdateable() has been added to that class to throw this exception, keeping the binary size down. - Added new error message into errors.properties "postgresql.psqlnotimp" This is used instead of unimplemented when it's a feature in the backend that is preventing this method from being implemented. - Removed getKeysetSize() as its not part of the ResultSet API Thu Jan 18 09:46:00 GMT 2001 peter@retep.org.uk - Applied modified patch from Richard Bullington-McGuire <rbulling@microstate.com>. I had to modify it as some of the code patched now exists in different classes, and some of it actually patched obsolete code. Wed Jan 17 10:19:00 GMT 2001 peter@retep.org.uk - Updated Implementation to include both ANT & JBuilder - Updated README to reflect the changes since 7.0 - Created jdbc.jpr file which allows JBuilder to be used to edit the source. JBuilder _CAN_NOT_ be used to compile. You must use ANT for that. It's only to allow JBuilders syntax checking to improve the drivers source. Refer to Implementation for more details
-
- Jan 13, 2001
-
-
Bruce Momjian authored
--------------------------------------------------------------------------- Attached is a set of patches for a couple of bugs dealing with timestamps in JDBC. Bug#1) Incorrect timestamp stored in DB if client timezone different than DB.
-
Bruce Momjian authored
timestamps in JDBC. Bug#1) Incorrect timestamp stored in DB if client timezone different than DB. The buggy implementation of setTimestamp() in PreparedStatement simply used the toString() method of the java.sql.Timestamp object to convert to a string to send to the database. The format of this is yyyy-MM-dd hh:mm:ss.SSS which doesn't include any timezone information. Therefore the DB assumes its timezone since none is specified. That is OK if the timezone of the client and server are the same, however if they are different the wrong timestamp is received by the server. For example if the client is running in timezone GMT and wants to send the timestamp for noon to a server running in PST (GMT-8 hours), then the server will receive 2000-01-12 12:00:00.0 and interprete it as 2000-01-12 12:00:00-08 which is 2000-01-12 04:00:00 in GMT. The fix is to send a format to the server that includes the timezone offset. For simplicity sake the fix uses a SimpleDateFormat object with its timezone set to GMT so that '+00' can be used as the timezone for postgresql. This is done as SimpleDateFormat doesn't support formating timezones in the way postgresql expects. Bug#2) Incorrect handling of partial seconds in getting timestamps from the DB When the SimpleDateFormat object parses a string with a format like yyyy-MM-dd hh:mm:ss.SS it expects the fractional seconds to be three decimal places (time precision in java is miliseconds = three decimal places). This seems like a bug in java to me, but it is unlikely to be fixed anytime soon, so the postgresql code needed modification to support the java behaviour. So for example a string of '2000-01-12 12:00:00.12-08' coming from the database was being converted to a timestamp object with a value of 2000-01-12 12:00:00.012GMT-08:00. The fix was to check for a '.' in the string and if one is found append on an extra zero to the fractional seconds part. Bug#3) Performance problems In fixing the above two bugs, I noticed some things that could be improved. In PreparedStatement.setTimestamp(), PreparedStatement.setDate(), ResultSet.getTimestamp(), and ResultSet.getDate() these methods were creating a new SimpleDateFormat object everytime they were called. To avoid this unnecessary object creation overhead, I changed the code to use static variables for keeping a single instance of the needed formating objects. Also the code used the + operator for string concatenation. As everyone should know this is very inefficient and the use of StringBuffers is prefered. I also did some cleanup in ResultSet.getTimestamp(). This method has had multiple patches applied some of which resulted in code that was no longer needed. For example the ISO timestamp format that postgresql uses specifies the timezone as an offset like '-08'. Code was added at one point to convert the postgresql format to the java one which is GMT-08:00, however the old code was left around which did nothing. So there was code that looked for yyyy-MM-dd hh:mm:sszzzzzzzzz and yyyy-MM-dd hh:mm:sszzz. This second format would never be encountered because zzz (i.e. -08) would be converted into the former (also note that the SimpleDateFormat object treats zzzzzzzzz and zzz the same, the number of z's does not matter). There was another problem/fix mentioned on the email lists today by mcannon@internet.com which is also fixed by this patch: Bug#4) Fractional seconds lost when getting timestamp from the DB A patch by Jan Thomea handled the case of yyyy-MM-dd hh:mm:sszzzzzzzzz but not the fractional seconds version yyyy-MM-dd hh:mm:ss.SSzzzzzzzzz. The code is fixed to handle this case as well. Barry Lind
-
- Dec 29, 2000
-
-
Bruce Momjian authored
drivers. The first fix fixes the PreparedStatement object to not allocate unnecessary objects when converting native types to Stings. The old code used the following format: (new Integer(x)).toString() whereas this can more efficiently be occompilshed by: Integer.toString(x); avoiding the unnecessary object creation. The second fix is to release some resources on the close() of a ResultSet. Currently the close() method on ResultSet is a noop. The purpose of the close() method is to release resources when the ResultSet is no longer needed. The fix is to free the tuples cached by the ResultSet when it is closed (by clearing out the Vector object that stores the tuples). This is important for my application, as I have a cache of Statement objects that I reuse. Since the Statement object maintains a reference to the ResultSet and the ResultSet kept references to the old tuples, my cache was holding on to a lot of memory. Barry Lind
-
- Nov 10, 2000
-
-
Bruce Momjian authored
edition of the driver did not compile. I have fixed both issues again. I have attached the modified files to this email, maybe you can check them into the repository. (Fixes are marked with //FIXME). Enterprise edition driver now compiles and seems to work. Jan Thomae
-
- Nov 01, 2000
-
-
Peter Mount authored
Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that absolute doesnt handle negative row numbers correctly.
-
- Oct 17, 2000
-
-
Peter Mount authored
-
- Oct 12, 2000
-
-
Peter Mount authored
the versioning works. There's also a new utils directory used by Makefile
-
- Sep 12, 2000
-
-
Bruce Momjian authored
driver to be set, and a description of said patch. Please refer to the latter for more information. William -- William Webber william@peopleweb.net.au
-
- Jun 09, 2000
-
-
Bruce Momjian authored
absolute. It also makes it more compliant with the interface specification in Sun's documentation; 1. absolute(0) should throw an exception. 2. absolute(>num-records) should set the current row to after the last record in addition to returning false. 3. absolute(<num-records) should set the current row to before the first record in addition to returning false. These operations in the existing code just return false and don't change current_row. These changes required a minor change to relative(int) since it calls absolute(int) The attached patch is against the cvs repository tree as of this morning. Also, who is in charge of maintaining the jdbc driver? I'm working on getArray for the jdbc2 driver, but it's going to require three more classes to be added to the driver, and thus three more source files in the repository. Is there someone I can contact directly to ask about this? Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
-
- Jun 07, 2000
-
-
Bruce Momjian authored
It addresses three issues: 1. The problem with ResultSet's interface specifying 1-based indexing was not quite fixed in 7.0.2. absolute would stop the user form moving to the first record (record 0 internally). 2. Absolute did not set current_row 3. For field.mod=-1, GetObject would try to return numeric values with a precision of around 65000. Now GetObject detects when field.mod==-1, and passes that as the scale to getBigDecimal. getBigDecimal detects when a -1 is passed and simply does not scale the value returned. You still get the correct value back, it simply does not tweak the precision. I'm working off of a source tree I just checked out from the repository. The diff is based on what was in the repository about ten minutes ago. ---------------------------------------------------------------- Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer ----------------------------------------------------------------
-
- Jun 06, 2000
-
-
Peter Mount authored
Added org/postgresql/DriverClass.java to the list of files removed by make clean (it's dynamically built) Fixed Statement, so that the update count is valid when an SQL DELETE operation is done. While fixing the update count, made it easier to get the OID of the last insert as well. Example is in example/basic.java
-
- Jun 01, 2000
-
-
Peter Mount authored
-
- May 12, 2000
-
-
Bruce Momjian authored
I'm including a diff of postgresql-7.0/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java. I've clearly marked all the fixes I did. Would *someone* who has access to the cvs please put this in? Joseph Shraibman
-
- May 03, 2000
-
-
Peter Mount authored
-
- Apr 17, 2000
-
-
Peter Mount authored
-
- Sep 15, 1999
-
-
Peter Mount authored
to version 2, and fixes ResultSetMetaData.getColumnDisplaySize().
-
- Jun 27, 1999
-
-
Peter Mount authored
-
- May 19, 1999
-
-
Peter Mount authored
-
- May 18, 1999
-
-
Peter Mount authored
-
- Jan 25, 1999
-
-
Marc G. Fournier authored
From: Peter T Mount <peter@retep.org.uk> This implements some of the JDBC2 methods, fixes a bug introduced into the JDBC1 portion of the driver, and introduces a new example, showing how to use the CORBA ORB thats in Java2 with JDBC. The Tar file contains the new files, the diff the changes to the others. CHANGELOG is separate as I forgot to make a .orig ;-)
-
- Jan 17, 1999
-
-
Bruce Momjian authored
file containing the latest version of the JDBC driver, allowing it to be compiled and used under JDK 1.2 and later. NB: None (well almost none) of the new methods actually do anything. This release only handles getting it to compile and run. Now this is done, I'll start working on implementing the new stuff. Now this tar file replaces everything under src/interfaces/jdbc. I had to do it this way, rather than diffs, because most of the classes under the postgresql subdirectory have moved to a new directory under that one, to enable the support of the two JDBC standards. Here's a list of files in the tar file. Any file not listed here (in the postgresql directory) will have to be deleted, otherwise it could cause the driver to fail: Peter Mount
-
- Sep 03, 1998
-
-
Bruce Momjian authored
-
- Apr 18, 1998
-
-
Marc G. Fournier authored
This fixes a problem in ResultSet.getDate() when the column is NULL (reported by Vincent Partington <Vincent.Partington@nmg.nl>) And fixes a problem with Field's (ResultSet.getObject() was proving to be slow as it repetedly send queries for oid -> name mapping - fixed by creating a cache. (reported by Mario Ellebrecht <ellebrec@nads.de>)
-
- Jan 11, 1998
-
-
Marc G. Fournier authored
see README_6.3 for list of changes
-
- Nov 07, 1997
-
-
Bruce Momjian authored
-
- Oct 30, 1997
-
-
Bruce Momjian authored
-
- Aug 31, 1997
-
-
Marc G. Fournier authored
-
- Aug 16, 1997
-
-
Marc G. Fournier authored
-