Re: How to get a table's constraints

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: How to get a table's constraints
Дата
Msg-id Pine.LNX.4.33.0402050947230.22209-100000@leary.csoft.net
обсуждение исходный текст
Ответ на How to get a table's constraints  (Carlos Correia <carlos@m16e.com>)
Ответы Re: How to get a table's constraints
Список pgsql-jdbc

On 5 Feb 2004, Carlos Correia wrote:

> Is there any way of obtaining a list of the constraints (table
> constraints and column constraints) of a table? I mean, other then the
> foreign key's description (getImportedKeys and getExportedKeys)?
>

You get retrive NOT NULL constraints by checking the NULLABLE column in
DatabaseMetaData.getColumns().  If you are referring to check constraints
the only way to retrieve that is by manually querying the system catalogs,
although 7.4 has a view information_schema.check_constraints which makes
this easy.  JDBC doesn't have any concept of theses constraints because
there is no portable way of representing them.

Kris Jurka


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

Предыдущее
От: Carlos Correia
Дата:
Сообщение: How to get a table's constraints
Следующее
От: Nadeem Bitar
Дата:
Сообщение: unpredictable behavior