RE: [INTERFACES] JDBC primary keys

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Alex Verstak'" <averstak(at)vt(dot)edu>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: [INTERFACES] JDBC primary keys
Date: 2000-02-10 16:24:52
Message-ID: 1B3D5E532D18D311861A00600865478C70C1B3@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hmmm, the one in CVS is (it was destined for 6.5.3, but I screwed the
cvs tagging).

Anyhow, I thought I fixed this in 6.5.1?

Peter

-----Original Message-----
From: Alex Verstak [mailto:averstak(at)vt(dot)edu]
Sent: Thursday, February 10, 2000 3:56 PM
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] JDBC primary keys

postgresql.Driver:
MAJORVERSION = 6
MINORVERSION = 5

This is the one included with PostgreSQL 6.5.3. What/where is the
latest stable version of the JDBC driver?

Thank you,
Alex Verstak
Virginia Tech


Peter Mount wrote:
> What version of the driver are you using? Earlier versions had some
> problems and this one (returning `foo_pk' for all rows) looks like one
> of them.
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough
Council.
>
>
>
> -----Original Message-----
> From: Alex Verstak [mailto:averstak(at)vt(dot)edu]
> Sent: Wednesday, February 09, 2000 11:51 PM
> To: pgsql-interfaces(at)postgreSQL(dot)org
> Subject: [INTERFACES] JDBC primary keys
>
>
>
> Is there a way to determine all primary key columns in
> a given table? Example:
>
> CREATE TABLE foo (
> bar1 int4,
> bar2 text,
> bar3 float8,
> CONSTRAINT foo_pk PRIMARY KEY ( bar1, bar2 )
> )
>
> I want to obtain `bar1' and `bar2' given table name `foo'.
>
> DatabaseMetaData.getPrimaryKeys looks like the right
> function to use, but it returns `foo_pk' in COLUMN_NAME
> for all rows.
>
> Am I misinterpreting the JDBC specs? What SELECT query
> should I use to get the primary key columns?
>
> --
> Drive^H^Hnk safely!
> Alex Verstak averstak(at)vt(dot)edu
> 1078 Ambler Johnston East Virginia Tech
> Blacksburg, VA 24060-0022 Tel. (540) 232-1389
>
>
>
> ************

************

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-02-10 16:34:50 Re: [INTERFACES] The persistance of C functions
Previous Message Alex Verstak 2000-02-10 15:56:19 Re: [INTERFACES] JDBC primary keys