aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc
Commit message (Collapse)AuthorAge
* Attached are patches for two fixes to reduce memory usage by the JDBCBruce Momjian2000-12-28
| | | | | | | | | | | | | | | | | | | | | | | | 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
* In looking at the 7.1beta1 code for JDBC, I noticed that support wasBruce Momjian2000-12-22
| | | | | | | | | | | | | | | added to support character set encodings. However I noticed that the encoding that is used isn't obtained from the DB. Since Java uses unicode UCS2 internally the character set encoding is used to translate strings from/to the DB encoding. So it seems logical that the code would get the encoding from the DB instead of the current method of requiring the user pass it as a parameter. Attached is a patch that gets the DB encoding from the DB in the same manner as is done in libpq/fe-connect.c. The patch is created off of the latest CVS sources (Connection.java version 1.10). Barry Lind
* Finished build.xml and updated Driver.java.in and buildDriver to match how ↵Peter Mount2000-12-20
| | | | Makefile and ANT operate.
* Finally created ant build.xml filePeter Mount2000-12-19
|
* Allow jdbc to return proper server version numberBruce Momjian2000-11-25
| | | | Anders Bengtsson
* Encoding patch to Connection by wrobell@posexperts.com.plPeter Mount2000-11-20
|
* the bug was not fixed in the snapshot of November 5th. Also the enterpriseBruce Momjian2000-11-10
| | | | | | | | | 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
* Fixed minor bug in ResultSet for jdbc2 reported by Matthew Denner that ↵Peter Mount2000-11-01
| | | | absolute doesnt handle negative row numbers correctly.
* Some more getTimestamp() fixesPeter Mount2000-10-17
|
* Major update part I involving delayed patches, reworked Makefile, and howPeter Mount2000-10-12
| | | | the versioning works. There's also a new utils directory used by Makefile
* Back out Gunnar R|nning jdbc changes.Bruce Momjian2000-10-09
|
* Okay, I have some new code in place that hopefully should work better. IBruce Momjian2000-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | couldn't produce a full patch using cvs diff -c this time since I have created new files and anonymous cvs usage doesn't allow you to adds. I'm supplying the modified src/interfaces/jdbc as a tarball at : http://www.candleweb.no/~gunnar/projects/pgsql/postgres-jdbc-2000-10-05.tgz The new files that should be added are : ? org/postgresql/PGStatement.java ? org/postgresql/ObjectPool.java ? org/postgresql/ObjectPoolFactory.java There is now a global static pool of free byte arrays and used byte arrays connected to a statement object. This is the role of the new PGStatement class. Access to the global free array is synchronized, while we rely on the PG_Stream synchronization for the used array. My measurements show that the perfomance boost on this code is not quite as big as my last shot, but it is still an improvement. Maybe some of the difference is due to the new synchronization on the global array. I think I will look into choosing between on a connection level and global level. I have also started experimented with improving the performance of the various conversions. The problem here is ofcourse related handle the various encodings. One thing I found to speed up ResultSet.getInt() a lot was to do custom conversion on the byte array into int instead of going through the getString() to do the conversion. But I'm unsure if this is portable, can we assume that a digit never can be represented by more than one byte ? It works fine in my iso-latin-8859-1 environment, but what about other environments ? Maybe we could provide different ResultSet implementations depending on the encoding used or delegate some methods of the result set to an "converter class". Check the org/postgresql/jdbc2/FastResultSet.java in the tarball above to see the modified getInt() method. Regards, Gunnar
* As if my JDBC patch hasn't already caused enough grief, there is now aBruce Momjian2000-09-12
| | | | | | | | | | | | | | one-line change necessary. Due to the Mark Holloman "New Relkind for Views" patch, my support for views in the driver will need to be updated to match. The change to DatabaseMetaData.getTableTypes[][] is as follows: - {"VIEW", "(relkind='r' and relhasrules='t' and relname !~ '^pg_' and relname !~ '^xinv')"}, + {"VIEW", "(relkind='v' and relname !~ '^pg_' and relname !~ '^xinv')"}, Christopher Cain
* Attached is a patch that prevents a NullPointerException in the JDBCBruce Momjian2000-09-12
| | | | | | | | | | | | driver if the translations files have not been properly installed. (We carefully avoided installing the translations file in a controlled environment here specifically to test for such a bug. :-) See attached description for more details. William -- William Webber william@peopleweb.net.au
* This patch implements the following command:Bruce Momjian2000-09-12
| | | | | | | | | | ALTER TABLE <tablename> OWNER TO <username> Only a superuser may execute the command. -- Mark Hollomon mhh@mindspring.com
* Attached are a patch to allow the charset encoding used by the JDBCBruce Momjian2000-09-12
| | | | | | | | | 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
* Applied to jdbc1 and jdbc2.Bruce Momjian2000-09-12
| | | | | | | | | | | This is a patch which lets the DatabaseMetaData return the object type when getTables(....) is called. It does not really fix any bug, but it fills in some functionality that should be there anyway. The diff included here is off of the CVS as of just now :) ---------------------------------------------------------------- Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer ----------------------------------------------------------------
* This patch for the 7.0.2 JDBC interface addresses four issues IBruce Momjian2000-09-12
| | | | | | | | | | | | | | | | | | | | | | | encountered while getting my reporting tool up and running with the driver. All changes are in the DatabaseMetaData class. Problem: The getDatabaseProductVersion() method was returning "6.5.2" Resolution: Changed it to return "7.0.2" Problem: A call to getTables() with an unsupported table type (in the String array) resulted in a malformed SQL statement and subsequent parsing error Resolution: Unsupported table types are now ignored without error Problem: In a getTables() call, tables and views were both returned by the "TABLE" table type, and the "VIEW" table type was unsupported Resolution: Changed the "TABLE" type to return only physical tables and added support for the "VIEW" table type (returning only views) Problem: The getIdentifierQuoteString() method was returning null Resolution: This method now returns a double-quote Christopher Cain
* Fixed DatabaseMetaData.getTableTypes()Peter Mount2000-07-20
|
* Brand 7.1 release. Also update jdbc version in release branch.Bruce Momjian2000-06-12
|
* This patch fixes the 0-based/1-based result set indexing problem forBruce Momjian2000-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Here is a patch for interfaces/jdbc/org/postgresql/jdbc2/ResultSet.javaBruce Momjian2000-06-07
| | | | | | | | | | | | | | | | | | | | | | | | 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 ----------------------------------------------------------------
* Added org/postgresql/DriverClass.java to the list of files removed by make ↵Peter Mount2000-06-06
| | | | | | | 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
* Added some missing org.'s that prevented the use of the geometric typesPeter Mount2000-06-06
|
* Removed hardwired 8k limit on queriesPeter Mount2000-06-06
|
* Removed timezone in ResultSet.getTimestamp()Peter Mount2000-06-01
|
* Fixed the message Makefile produces after compiling. It still saidPeter Mount2000-05-15
| | | | | about the old Driver class, not the new package. Spotted by Joseph Shraibman <jks@p1.selectacast.net>
* Fix the off by one errors in ResultSet from 6.5.3, and more.Bruce Momjian2000-05-12
| | | | | | | | | 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
* ImageViewer transaction fixesPeter Mount2000-05-05
|
* Minor fixes ready for 7.0Peter Mount2000-05-03
|
* Remove DriverClass.java. It is generated by the compile.Bruce Momjian2000-04-26
|
* Add res clear to exampleBruce Momjian2000-04-26
|
* Install Peter's Makefile.Bruce Momjian2000-04-26
|
* Attempt IIIPeter Mount2000-04-26
|
* Another attemptPeter Mount2000-04-26
|
* Another attempt at 7.0Peter Mount2000-04-17
|
* > The snprintf stuff in interfaces/ecpg/preproc/Makefile.in is broken.Bruce Momjian2000-03-14
| | | | | | | | | Please > apply the attached patch. > > Andreas Kardos > >
* I've made a diff against the 7.0beta1 tree that accomplishes several things:Bruce Momjian2000-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) adds NetBSD shared lib support on both ELF and a.out platforms 2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in Makefile.global. This makes it much easier to build stuff in the source tree after you've already installed the libraries. 3) adds TEMPLATEDIR in Makefile.global that indicates where the database templates are stored. This separates the template files from real libraries that are installed in $(LIBDIR). 4) changes include order of <readline/readline.h> and <readline.h>. The latest GNU readline installs its headers under a readline subdirectory. In addition to applying the patch below the following files need to be copied: backend/port/dynloader: bsd.h -> netbsd.h bsd.c -> netbsd.c include/port: bsd.h -> netbsd.h makefiles: Makefile.bsd -> Makefile.netbsd It would be great to see this incorporated into the source tree before the 7.0 release is cut. Thanks! -- Johnny C. Lam <lamj@stat.cmu.edu>
* jdbc2real rule was in there twice. One of them should have been jdbc1realPeter Mount1999-09-15
|
* Jens Glaser found that getPrimaryKeys() had a table called test hardwiredPeter Mount1999-09-15
| | | | into it.
* Some late patches from Jens Glaser (jens@jens.de). These upgrade the protocolPeter Mount1999-09-15
| | | | to version 2, and fixes ResultSetMetaData.getColumnDisplaySize().
* An abstract declaration for the close() method was missed out of the previousPeter Mount1999-09-14
| | | | commit to CVS.
* Patches for 6.5.2Peter Mount1999-09-14
|
* Some minor bug fixesPeter Mount1999-06-27
|
* Some fixes supplied by Jon Nielsen jonfn@image.dkPeter Mount1999-06-23
|
* Forgot the CHANGELOGPeter Mount1999-05-18
|
* Internationalisation of error messagesPeter Mount1999-05-18
|
* Transactions in ImageViewerPeter Mount1999-05-18
|
* Fixed Internationalization of error messages.Peter Mount1999-05-17
|
* Minor bug fixes. Replaced DateStyle support with ISO.Peter Mount1999-05-17
|