Commit Graph

68 Commits

Author SHA1 Message Date
Peter Mount 9eddc7519d Fixed DatabaseMetaData.getTableTypes() 2000-07-20 15:30:05 +00:00
Bruce Momjian 6cb6d05456 Brand 7.1 release. Also update jdbc version in release branch. 2000-06-12 22:36:19 +00:00
Bruce Momjian d3ef753686 This patch fixes the 0-based/1-based result set indexing problem for
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
2000-06-09 17:27:57 +00:00
Bruce Momjian d42f9b59e9 Here is a patch for interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
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
----------------------------------------------------------------
2000-06-07 20:01:20 +00:00
Peter Mount e3cc370d15 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
2000-06-06 11:06:09 +00:00
Peter Mount 0e38f0a1d1 Added some missing org.'s that prevented the use of the geometric types 2000-06-06 07:45:07 +00:00
Peter Mount d7dbba2659 Removed hardwired 8k limit on queries 2000-06-06 07:24:06 +00:00
Peter Mount 228a5e708c Removed timezone in ResultSet.getTimestamp() 2000-06-01 06:33:01 +00:00
Peter Mount 33bb1aee91 Fixed the message Makefile produces after compiling. It still said
about the old Driver class, not the new package. Spotted by
Joseph Shraibman <jks@p1.selectacast.net>
2000-05-15 21:32:51 +00:00
Bruce Momjian 2cfb14e8ea Fix the off by one errors in ResultSet from 6.5.3, and more.
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
2000-05-12 20:54:22 +00:00
Peter Mount 02faee5eaa ImageViewer transaction fixes 2000-05-05 07:35:29 +00:00
Peter Mount 86b8bd0748 Minor fixes ready for 7.0 2000-05-03 15:58:09 +00:00
Bruce Momjian f839762e0b Remove DriverClass.java. It is generated by the compile. 2000-04-26 17:54:28 +00:00
Bruce Momjian 0b65e1436e Add res clear to example 2000-04-26 17:51:03 +00:00
Bruce Momjian 3c0685e423 Install Peter's Makefile. 2000-04-26 14:19:29 +00:00
Peter Mount 4fc3690238 Attempt III 2000-04-26 05:39:32 +00:00
Peter Mount 39116bfbfc Another attempt 2000-04-26 05:32:01 +00:00
Peter Mount 25dadc8514 Another attempt at 7.0 2000-04-17 20:07:56 +00:00
Bruce Momjian ab9b4d8086 > The snprintf stuff in interfaces/ecpg/preproc/Makefile.in is broken.
Please
> apply the attached patch.
>
> Andreas Kardos
>
>
2000-03-14 15:55:17 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
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>
2000-03-08 01:58:46 +00:00
Peter Mount f2fa38ded5 jdbc2real rule was in there twice. One of them should have been jdbc1real 1999-09-15 21:56:16 +00:00
Peter Mount 8363e137aa Jens Glaser found that getPrimaryKeys() had a table called test hardwired
into it.
1999-09-15 21:12:34 +00:00
Peter Mount cd68ecfef6 Some late patches from Jens Glaser (jens@jens.de). These upgrade the protocol
to version 2, and fixes ResultSetMetaData.getColumnDisplaySize().
1999-09-15 20:40:02 +00:00
Peter Mount 3f68139373 An abstract declaration for the close() method was missed out of the previous
commit to CVS.
1999-09-14 22:43:38 +00:00
Peter Mount 24c82830cf Patches for 6.5.2 1999-09-14 05:50:44 +00:00
Peter Mount e70b4831d7 Some minor bug fixes 1999-06-27 11:05:38 +00:00
Peter Mount dc88d74af3 Some fixes supplied by Jon Nielsen jonfn@image.dk 1999-06-23 05:56:20 +00:00
Peter Mount 2d7ec4785f Forgot the CHANGELOG 1999-05-18 23:22:08 +00:00
Peter Mount 4c63b257fd Internationalisation of error messages 1999-05-18 23:17:46 +00:00
Peter Mount d261a5ec86 Transactions in ImageViewer 1999-05-18 06:07:25 +00:00
Peter Mount 20f0cfc322 Fixed Internationalization of error messages. 1999-05-17 22:58:19 +00:00
Peter Mount 3f59cc0831 Minor bug fixes. Replaced DateStyle support with ISO. 1999-05-17 22:43:30 +00:00
Peter Mount ded46bd522 Implement UpdateCount 1999-04-11 18:03:00 +00:00
Bruce Momjian 983fc97672 The isWritable method in ResultSetMetaData returns the logically
incorrect result. This bug goes back to at least 6.3.

Alvin
1999-03-14 05:18:00 +00:00
Bruce Momjian fd80c102fa There are errors in the PGmoney class in the conversion routines over
the handling of negative numbers and commas. The attached path attempts
to fix these.
However the getValue method does not yet insert commas into the
generated string.
Also in getValue there is an incorrect assumption that the currency
symbol is '$', it should of course be '£'!. I have no idea on how to go
about fixing this one.

Alvin
1999-03-14 05:12:45 +00:00
Marc G. Fournier 2ee522954d 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 ;-)
1999-01-25 21:22:06 +00:00
Bruce Momjian 298682d9e0 As the email posted to the announce and interfaces list, attached is a tar
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
1999-01-17 04:51:59 +00:00
Marc G. Fournier 46fb81636c Remove various files that were moved to various subdirectories...
Requested by: Peter T Mount peter@retep.org.uk
1998-11-01 16:55:02 +00:00
Bruce Momjian 03ab5f0174 This patch updates the ImageViewer example to use Multiple Threading.
When importing an image into the database, the example now fires off a
new
Thread, which imports the image in the background. This also means that
the application doesn't freeze on the user, and they can still browse
the
images in the database, while the upload is running.

This now makes the ImageViewer a true example on how to use Threads (the
threadtest class is just that - a test).

Peter
1998-10-12 02:45:45 +00:00
Bruce Momjian ba0a1ae721 Add changelog. 1998-10-08 00:41:36 +00:00
Bruce Momjian 25b5faa7cd Just a quick patch. This makes the JDBC driver thread safe, which is an
important step towards making the driver compliant, and means that for
some Java applications and servlets, only a single database connection
is
needed, so in a sence this is a nice little show stopper for 6.4 (and
should still be backward compatible to 6.3.2).

Peter
1998-10-08 00:38:21 +00:00
Bruce Momjian bcb51fc916 rename java file for Peter. 1998-09-12 17:26:04 +00:00
Bruce Momjian 35a945f2b5 New stuff from Peter Mount for jdbc. 1998-09-03 02:31:38 +00:00
Bruce Momjian c37adac74e New stuff for 6.4 jdbc.
Peter mount
1998-09-03 02:29:45 +00:00
Bruce Momjian d6e0ee6bcb Added missing file. 1998-06-16 06:57:27 +00:00
Marc G. Fournier 85f91d0e8e From: Peter T Mount <patches@maidast.demon.co.uk>
Bug fixes:

        PreparedStatement.setObject didn't handle short's

        ResultSet.getDate() now handles null dates (returns null rather
        than a NullPointerException)

        ResultSetMetaData.getPrecision() now returns 0 for VARCHAR

New features:

        Field now caches the typename->oid in a Hashtable to speed things
        up. It removes the need for some unnecessary queries to the
        backend.

        PreparedStatement.toString() now returns the sql statement that
        it will send to the backend. Before it did nothing.

        DatabaseMetaData.getTypeInfo() now does something.
1998-06-03 19:43:29 +00:00
Marc G. Fournier 9142e54e73 From: Peter T Mount <patches@maidast.demon.co.uk>
Bug fixes:

        PreparedStatement.setObject didn't handle short's

        ResultSet.getDate() now handles null dates (returns null rather
        than a NullPointerException)

        ResultSetMetaData.getPrecision() now returns 0 for VARCHAR

New features:

        Field now caches the typename->oid in a Hashtable to speed things
        up. It removes the need for some unnecessary queries to the
        backend.

        PreparedStatement.toString() now returns the sql statement that
        it will send to the backend. Before it did nothing.

        DatabaseMetaData.getTypeInfo() now does something.
1998-06-03 18:56:09 +00:00
Marc G. Fournier b542fa1a6e From: Peter T Mount <patches@maidast.demon.co.uk>
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>)
1998-04-18 18:32:44 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian 2b3bb341fe This patch fixes a couple of minor bugs:
1) DatabaseMetaData.getPrimaryKeys() would fail saying that there
is no
   table t.

2) PreparedStatement.getObject() was missing some break statements,
which
   was causing updates not to work with JBuilder (supplied by Aaron
   Dunlop).


jdbc fixes from Peter.
1998-03-20 22:03:55 +00:00