Обсуждение: primary key

Поиск
Список
Период
Сортировка

primary key

От
"Johnson, Shaunn"
Дата:

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

There is a table that has been built with a primary key,
but I don't know what columns were defined when
naming that key.  How can I tell what columns
were involved?

Thanks!

-X

Re: primary key

От
Martijn van Oosterhout
Дата:
On Thu, Oct 24, 2002 at 01:17:32PM -0400, Johnson, Shaunn wrote:
> Howdy:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> There is a table that has been built with a primary key,
> but I don't know what columns were defined when
> naming that key.  How can I tell what columns
> were involved?

\d tablename should list the indexes. \d indexname will tell you the fields
within the index.

Hope this helps.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

Вложения