information about primary key from sys tabs

Поиск
Список
Период
Сортировка
От Ulf Mehlig
Тема information about primary key from sys tabs
Дата
Msg-id 199903040856.JAA02279@uni-bremen.de
обсуждение исходный текст
Список pgsql-general
Hello out there,

am I wrong in assuming that you can't find out the attributes of a
relation which were defined as it's 'primary key' when executing
'create table'?  If I'm not misinterpreting the docs, 'primary key' is
changed to 'create unique index ...', and accordingly the columns
concerned with primary keys in the system tables 'pg_class' and
'pg_index' are generally set to 'false'. So you can find out which
attributes of a certain table form a unique index, but not, which of
these have been defined as primary key. Correct? If it is, will this
be changed in near future releases? Of course, if a naming convention
is consequently applied (the relation containing the attributes of
table xxx's primary key is called "xxx_pkey" etc.), I *can*
distinguish between 'primary key' and other unique indexes.

Thank you for your help,
Ulf

--
======================================================================
Ulf Mehlig    <umehlig@zmt.uni-bremen.de>
              Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------

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

Предыдущее
От: jim@reptiles.org (Jim Mercer)
Дата:
Сообщение: inet and cidr type problems
Следующее
От: "David R. Favor"
Дата:
Сообщение: PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error