Re: "\d tablename" to get column name, and column type by

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: "\d tablename" to get column name, and column type by
Дата
Msg-id 87u0ugpupc.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на "\d tablename" to get column name, and column type by using JDBC  (Ying Lu <ying_lu@cs.concordia.ca>)
Ответы Re: "\d tablename" to get column name, and column type  (Ying Lu <ying_lu@cs.concordia.ca>)
Список pgsql-general
Ying Lu <ying_lu@cs.concordia.ca> writes:

> Hello,
>
> Under mysql, we have "desc tablename" to get the detail information
> about a table. My question is about to get column name, and column
> type for a specific table under PostgreSQL through JDBC.
>
> Assume we have a table named "test". Under PSQL, we can input "\d
> test" to see the details about table "test" successufully.  However,
> my main purpose is trying to get column name, column name of a table
> through JDBC.

The backslash commands are specific to 'psql'.  From Java you'll need
to query the INFORMATION_SCHEMA or the system catalogs.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

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

Предыдущее
От: "Leonardo Francalanci"
Дата:
Сообщение: R: "\d tablename" to get column name, and column type by using JDBC
Следующее
От: Ying Lu
Дата:
Сообщение: Re: "\d tablename" to get column name, and column type