Re: How does one determine which columns are constrained PRIMARY KEY?

Поиск
Список
Период
Сортировка
От Damon Fasching
Тема Re: How does one determine which columns are constrained PRIMARY KEY?
Дата
Msg-id Pine.SOL.3.96.1020228113630.6654A-100000@design.lbl.gov
обсуждение исходный текст
Ответ на Re: How does one determine which columns are  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-novice
On Thu, 28 Feb 2002, Josh Berkus wrote:

> Damon,
>
> > Is it possible to determine which column(s), if any, are constrained
> > with PRIMARY KEY?
>
> From psql, use:
>
> \d table_name
>
> You will get a list of table characteristics, including any
>  constraints.
>
> -Josh
>

Thanks...but is there a way to check PRIMARY KEY (and do other useful
things like get a listing of databases) from within an SQL query?  I can't
embed psql '\' commands in my application.

Damon

---------

May the lights in The Land of Plenty
  shine on the Truth some day        L Cohen



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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Migrate an Oracle Table with CLOB datatype
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ElseIF in PLPGSQL