BUG #4488: jdbc : DatabaseMetaData.getPrimaryKeys no result
The following bug has been logged online:
Bug reference: 4488
Logged by: Marcel Petavy
Email address: petavy@gmx.net
PostgreSQL version: 8.2.4
Operating system: Windows XP
Description: jdbc : DatabaseMetaData.getPrimaryKeys no result
Details:
Hi.
If I try to query the primary key via JDBC driver
"postgresql-8.3-603.jdbc4.jar" DatabaseMetaData.getPrimaryKeys I get not
result.
create table test (id integer not null primary key(id))
ResultSet rs = connection.getMetaData(null,null,"test");
rs gives no rows.
All other known JDBC drivers (jtds MS-SQL, ojdbc16 Oracle) reporting the
primary key "id".
Cya - Marcel
On Tue, 21 Oct 2008, Marcel Petavy wrote:
Bug reference: 4488
PostgreSQL version: 8.2.4
Operating system: Windows XP
Description: jdbc : DatabaseMetaData.getPrimaryKeys no result
Details:If I try to query the primary key via JDBC driver
"postgresql-8.3-603.jdbc4.jar" DatabaseMetaData.getPrimaryKeys I get not
result.create table test (id integer not null primary key(id))
ResultSet rs = connection.getMetaData(null,null,"test");
rs gives no rows.
It definitely does work, perhaps your table is really "TEST" instead of
"test"? If you still believe it's a driver problem, please post a
complete test case that shows the exact create table command and java code
calling getPrimaryKeys.
Kris Jurka
Kris,
I get the same error. I've verified the table name and the primary key. The
interesting part is, it seems to work in cases where the primary key is a
serial.
Thanks,
Dave Armstrong
Kris Jurka wrote:
On Tue, 21 Oct 2008, Marcel Petavy wrote:
Bug reference: 4488
PostgreSQL version: 8.2.4
Operating system: Windows XP
Description: jdbc : DatabaseMetaData.getPrimaryKeys no result
Details:If I try to query the primary key via JDBC driver
"postgresql-8.3-603.jdbc4.jar" DatabaseMetaData.getPrimaryKeys I get not
result.create table test (id integer not null primary key(id))
ResultSet rs = connection.getMetaData(null,null,"test");
rs gives no rows.
It definitely does work, perhaps your table is really "TEST" instead of
"test"? If you still believe it's a driver problem, please post a
complete test case that shows the exact create table command and java code
calling getPrimaryKeys.Kris Jurka
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
--
View this message in context: http://www.nabble.com/BUG--4488%3A-jdbc-%3A-DatabaseMetaData.getPrimaryKeys-no-result-tp20098673p21201506.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
On Mon, 29 Dec 2008, davidsarmstrong wrote:
I get the same error. I've verified the table name and the primary key. The
interesting part is, it seems to work in cases where the primary key is a
serial.
All I can say is the same as before, it works for me. If you can post a
complete test case I'd be happy to look at it, but there's not much else I
can do.
Kris Jurka
Hi Kris,
Thanks for responding. After further testing I realized that it was working,
but that I was looking at the wrong database :wistle:. I did send an email
but I should have responded to the post.
Happy New Year!
Dave
Kris Jurka wrote:
On Mon, 29 Dec 2008, davidsarmstrong wrote:
I get the same error. I've verified the table name and the primary key.
The
interesting part is, it seems to work in cases where the primary key is a
serial.All I can say is the same as before, it works for me. If you can post a
complete test case I'd be happy to look at it, but there's not much else I
can do.Kris Jurka
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
--
View this message in context: http://www.nabble.com/BUG--4488%3A-jdbc-%3A-DatabaseMetaData.getPrimaryKeys-no-result-tp20098673p21239580.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.