JDBC problem with Postgres 7.0.3

Поиск
Список
Период
Сортировка
От Santosh Rau
Тема JDBC problem with Postgres 7.0.3
Дата
Msg-id 3A92C9C6.F894CABD@pumatech.com
обсуждение исходный текст
Список pgsql-general
Hello,

I am using the postgres driver for my Java code (JDK 1.2.2) which came
with the  Postgres 7.0.3 tar file. I am trying get the name of a column
which is essentially the primary key in this table. Unfortunately, the
result set returned does not have any records(as shown below). This code

works fine on Oracle. I also tried jdbc7.0-1.2.jar but the same problem
occurs.

---- Code ----
  public String getUniqueRowName() throws SQLException{
    DatabaseMetaData dma = m_Connection.getMetaData();
    ResultSet rs = dma.getIndexInfo("", "", "<table name>", true,
false);
    if(rs == null){
      return null;
    }
    rs.next(); ============================No records here
    String sIndex = rs.getString("COLUMN_NAME");
    return sIndex;
  }

Any help is appreciated.

Thanks in advance for your time

Santosh Rau






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

Предыдущее
От: Robert Kernell
Дата:
Сообщение: copying tables
Следующее
От: Rini Dutta
Дата:
Сообщение: handling of database size exceeding physical disk space