pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC primary keys
5+ messages / 2 participants
[nested] [flat]
* JDBC primary keys
@ 2000-02-09 23:50 Alex Verstak <averstak@vt.edu>
0 siblings, 0 replies; 5+ messages in thread
From: Alex Verstak @ 2000-02-09 23:50 UTC (permalink / raw)
To: pgsql-interfaces
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@vt.edu
1078 Ambler Johnston East Virginia Tech
Blacksburg, VA 24060-0022 Tel. (540) 232-1389
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: [INTERFACES] JDBC primary keys
@ 2000-02-10 08:46 Peter Mount <petermount@it.maidstone.gov.uk>
2000-02-10 15:56 ` Re: [INTERFACES] JDBC primary keys Alex Verstak <averstak@vt.edu>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Mount @ 2000-02-10 08:46 UTC (permalink / raw)
To: 'Alex Verstak' <averstak@vt.edu>; pgsql-interfaces
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@vt.edu]
Sent: Wednesday, February 09, 2000 11:51 PM
To: pgsql-interfaces@postgreSQL.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@vt.edu
1078 Ambler Johnston East Virginia Tech
Blacksburg, VA 24060-0022 Tel. (540) 232-1389
************
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [INTERFACES] JDBC primary keys
2000-02-10 08:46 RE: [INTERFACES] JDBC primary keys Peter Mount <petermount@it.maidstone.gov.uk>
@ 2000-02-10 15:56 ` Alex Verstak <averstak@vt.edu>
0 siblings, 0 replies; 5+ messages in thread
From: Alex Verstak @ 2000-02-10 15:56 UTC (permalink / raw)
To: pgsql-interfaces
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@vt.edu]
> Sent: Wednesday, February 09, 2000 11:51 PM
> To: pgsql-interfaces@postgreSQL.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@vt.edu
> 1078 Ambler Johnston East Virginia Tech
> Blacksburg, VA 24060-0022 Tel. (540) 232-1389
>
>
>
> ************
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: [INTERFACES] JDBC primary keys
@ 2000-02-10 16:24 Peter Mount <petermount@it.maidstone.gov.uk>
2000-02-11 07:12 ` Re: [INTERFACES] JDBC primary keys Alex Verstak <averstak@vt.edu>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Mount @ 2000-02-10 16:24 UTC (permalink / raw)
To: 'Alex Verstak' <averstak@vt.edu>; 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@vt.edu]
Sent: Thursday, February 10, 2000 3:56 PM
To: pgsql-interfaces@postgreSQL.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@vt.edu]
> Sent: Wednesday, February 09, 2000 11:51 PM
> To: pgsql-interfaces@postgreSQL.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@vt.edu
> 1078 Ambler Johnston East Virginia Tech
> Blacksburg, VA 24060-0022 Tel. (540) 232-1389
>
>
>
> ************
************
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [INTERFACES] JDBC primary keys
2000-02-10 16:24 RE: [INTERFACES] JDBC primary keys Peter Mount <petermount@it.maidstone.gov.uk>
@ 2000-02-11 07:12 ` Alex Verstak <averstak@vt.edu>
0 siblings, 0 replies; 5+ messages in thread
From: Alex Verstak @ 2000-02-11 07:12 UTC (permalink / raw)
To: pgsql-interfaces
Apparently, it was fixed in version 6.5.3 of the driver.
PostgreSQL 6.5.3 has version 6.5.2 of the driver. The 6.5.3
driver is the one in CVS.
Thank you,
Alex Verstak
Virginia Tech
Peter Mount wrote:
> 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@vt.edu]
> Sent: Thursday, February 10, 2000 3:56 PM
> To: pgsql-interfaces@postgreSQL.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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2000-02-11 07:12 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-02-09 23:50 JDBC primary keys Alex Verstak <averstak@vt.edu>
2000-02-10 08:46 RE: [INTERFACES] JDBC primary keys Peter Mount <petermount@it.maidstone.gov.uk>
2000-02-10 15:56 ` Alex Verstak <averstak@vt.edu>
2000-02-10 16:24 RE: [INTERFACES] JDBC primary keys Peter Mount <petermount@it.maidstone.gov.uk>
2000-02-11 07:12 ` Alex Verstak <averstak@vt.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox