information about primary key from sys tabs

From: Ulf Mehlig <umehlig(at)uni-bremen(dot)de>
To: pgsql-general(at)postgreSQL(dot)org
Subject: information about primary key from sys tabs
Date: 1999-03-04 08:56:17
Message-ID: 199903040856.JAA02279@uni-bremen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)zmt(dot)uni-bremen(dot)de>
Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------

Browse pgsql-general by date

  From Date Subject
Next Message David R. Favor 1999-03-04 11:26:43 PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error
Previous Message Jim Mercer 1999-03-04 04:40:40 inet and cidr type problems