JDBC primary keys

Поиск
Список
Период
Сортировка
От Alex Verstak
Тема JDBC primary keys
Дата
Msg-id 200002092350.SAA92912@averstak.campus.vt.edu
обсуждение исходный текст
Список pgsql-interfaces
Is there a way to determine all primary key columns in a given table?  Example:  CREATE TABLE foo (   bar1 int4,
bar2text,   bar3 float8,   CONSTRAINT foo_pk PRIMARY KEY ( bar1, bar2 ) )  I want to obtain `bar1' and `bar2' given
tablename `foo'.  DatabaseMetaData.getPrimaryKeys looks like the right function to use, but it returns `foo_pk' in
COLUMN_NAMEfor 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




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Bryan White"
Дата:
Сообщение: Re: [INTERFACES] The persistance of C functions
Следующее
От: "Bryan White"
Дата:
Сообщение: How to get remote ip address is stored proceedure