Re: 'Following' the Primary key

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: 'Following' the Primary key
Дата
Msg-id 1016111959.18213.51.camel@linda
обсуждение исходный текст
Ответ на 'Following' the Primary key  (Turbo Fredriksson <turbo@bayour.com>)
Ответы Re: 'Following' the Primary key  (Turbo Fredriksson <turbo@bayour.com>)
Список pgsql-hackers
On Thu, 2002-03-14 at 13:00, Turbo Fredriksson wrote:
> With '\d table' I get the columns, types and modifiers. Also
> the Primary key, Indexes etc are shown.
> 
> But if I want to know WHAT the primary key 'is pointing to',
> how would I do that (ie, what is the primary key)?

Just do \d again on the key index name:

bray=# \d org_contact            Table "org_contact"Column  |         Type          | Modifiers 
---------+-----------------------+-----------org     | character varying(10) | not nullcontact | character varying(10)
|not nullrole    | text                  | not nulladdress | integer               | 
 
Primary key: org_contact_pkey
Triggers: RI_ConstraintTrigger_6933120,         RI_ConstraintTrigger_6933114,         RI_ConstraintTrigger_6933108

bray=# \d org_contact_pkey   Index "org_contact_pkey"Column  |         Type          
---------+-----------------------org     | character varying(10)contact | character varying(10)
unique btree (primary key)



-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
    "Let your light so shine before men, that they may see      your good works, and glorify your Father which is in
 heaven."         Matthew 5:16 
 



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

Предыдущее
От: Turbo Fredriksson
Дата:
Сообщение: 'Following' the Primary key
Следующее
От: Turbo Fredriksson
Дата:
Сообщение: Re: 'Following' the Primary key