Thread: Re: [QUESTIONS] the JDBC Driver

Re: [QUESTIONS] the JDBC Driver

From
Peter T Mount
Date:
[PM: I've CC'd the postgresql-interfaces list, as JDBC related stuff
should go there]

On Thu, 8 Jan 1998, Zed A. Shaw wrote:

> I just downloaded the PostgreSQL JDBC driver (at least, the guys who
> wrote it claim it is the official one).  Now, as usual, there are no
> instructions with this piece of software, and I really need to have it
> working quickly.  So I'm hoping some kind soul out there has already got
> it running and can help me.

Where did you download it?

> First, I installed it my class path (specifically in
> /usr/local/jdk1.1.1/lib/) and told my system that it was one of the
> drivers to load (via Class.forName).  This works fine, where I have the
> problem is that there is no documentation on what the proper URL is for
> connecting to the database.  Does anyone know?

If it was ours, there should be a README file that contains how to install
and the url.

To install, you place the jar file into a directory in your class path (it
can be /usr/local/jdk1.1.1/lib).

Loading can be done via Class.forName("postgresql.Driver") or by the
jdbc.drivers=postgresql.Driver property setting.

As for the URL:
    jdbc:postgresql://host:port/database?arg1=val1&arg2=val2...

eg:

    jdbc:postgresql:test?auth=password

would connect you to the database test using password authentication

> My second and final question is whether this driver supports the
> setMaxRows method of the JDBC specification.  It is in the documentation
> on the web site, but that doesn't mean much.  So if anyone knows, I'd
> appreciate it.

Currently (pre V6.3), setMaxRows and getMaxRows do work, but the value is
ignored and all rows are returned.

This has been fixed ready for 6.3

> Also, if anyone has run into any problems with this thing, I'd
> appreciate your advice.  Thanks in advance.

The driver is under continual development.

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone..gov.uk Work EMail: peter@maidstone.gov.uk


Re: [QUESTIONS] the JDBC Driver

From
Bryan Mann
Date:
On Fri, 9 Jan 1998, Peter T Mount wrote:

> [PM: I've CC'd the postgresql-interfaces list, as JDBC related stuff
> should go there]
>
> On Thu, 8 Jan 1998, Zed A. Shaw wrote:
>
> > I just downloaded the PostgreSQL JDBC driver (at least, the guys who
>
> > Also, if anyone has run into any problems with this thing, I'd
> > appreciate your advice.  Thanks in advance.
>
> The driver is under continual development.
>
First thanks for the driver.  Very nice.

Perhaps you could add a .SUFFIXES line to your Makefile.

.SUFFIXES:  .java .class

For FreeBSD this is required till the system makefiles change to
support .java and .class.

Also the postgresql.jar rule barfs when trying to expand $^.
Perhaps there is a more general way of doing this by just listing
the directory 'postgresql'?

Bryan.
----------------------------------------------------------------------
mailto:bmann@whistle.com -*-  http://www.whistle.com/ -*- 415-577-7000
-----------------PC Computing '97 MVP Network Hardware----------------
http://www.zdnet.com/pccomp/features/excl0198/mvp97/storage/whistle_interjet.html


Re: [QUESTIONS] the JDBC Driver

From
Peter T Mount
Date:
On Fri, 9 Jan 1998, Bryan Mann wrote:

> On Fri, 9 Jan 1998, Peter T Mount wrote:
>
> > [PM: I've CC'd the postgresql-interfaces list, as JDBC related stuff
> > should go there]
> >
> > On Thu, 8 Jan 1998, Zed A. Shaw wrote:
> >
> > > I just downloaded the PostgreSQL JDBC driver (at least, the guys who
> >
> > > Also, if anyone has run into any problems with this thing, I'd
> > > appreciate your advice.  Thanks in advance.
> >
> > The driver is under continual development.
> >
> First thanks for the driver.  Very nice.
>
> Perhaps you could add a .SUFFIXES line to your Makefile.
>
> .SUFFIXES:  .java .class

True. I'll add it.

> For FreeBSD this is required till the system makefiles change to
> support .java and .class.

> Also the postgresql.jar rule barfs when trying to expand $^.
> Perhaps there is a more general way of doing this by just listing
> the directory 'postgresql'?

The main thing is for the jar file to include all of the class files under
that directory. I'll look into this. We've got to be careful, because
there's some subdirectories under postresql now.

> Bryan.
> ----------------------------------------------------------------------
> mailto:bmann@whistle.com -*-  http://www.whistle.com/ -*- 415-577-7000
> -----------------PC Computing '97 MVP Network Hardware----------------
> http://www.zdnet.com/pccomp/features/excl0198/mvp97/storage/whistle_interjet.html

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Re: [INTERFACES] Re: [QUESTIONS] the JDBC Driver

From
Peter T Mount
Date:
On Fri, 9 Jan 1998, Bryan Mann wrote:
> Perhaps you could add a .SUFFIXES line to your Makefile.
>
> .SUFFIXES:  .java .class

I've just checked, and I'd already had that in there.

> For FreeBSD this is required till the system makefiles change to
> support .java and .class.

Same for GNUMake.

> Also the postgresql.jar rule barfs when trying to expand $^.
> Perhaps there is a more general way of doing this by just listing
> the directory 'postgresql'?

I've changed it so it uses find to get the classes. It's better this way
as there are more than 1 directory to the driver now.

Anyhow, I'm uploading the new driver now.

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk