Re: 'Following' the Primary key - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: 'Following' the Primary key
Date
Msg-id 1016111959.18213.51.camel@linda
Whole thread Raw
In response to 'Following' the Primary key  (Turbo Fredriksson <turbo@bayour.com>)
Responses Re: 'Following' the Primary key
List 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 by date:

Previous
From: Turbo Fredriksson
Date:
Subject: 'Following' the Primary key
Next
From: Turbo Fredriksson
Date:
Subject: Re: 'Following' the Primary key