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

From Turbo Fredriksson
Subject Re: 'Following' the Primary key
Date
Msg-id 87ofhrgpnv.fsf@papadoc.bayour.com
Whole thread Raw
In response to 'Following' the Primary key  (Turbo Fredriksson <turbo@bayour.com>)
List pgsql-hackers
Quoting Oliver Elphick <olly@lfix.co.uk>:

> On Thu, 2002-03-14 at 13:28, Turbo Fredriksson wrote:
> >     Oliver> Just do \d again on the key index name:
> > 
> >     Oliver> bray=# \d org_contact
> >     Oliver> bray=# \d org_contact_pkey
> > 
> > Cool. Works fine in 7.2, but not 7.1.3 (which we're running on our
> > production systems)...
> > 
> > Any idea how to do this on 7.1.3?
> 
> psql -E tells me that the queries include this:

I thought it was '-e', and that didn't give any output,
so I never figured out this my self...

>  SELECT a.attname, format_type(a.atttypid, a.atttypmod),
>         a.attnotnull, a.atthasdef, a.attnum
>  FROM pg_class c, pg_attribute a
>  WHERE c.relname = 'org_contact_pkey'
>    AND a.attnum > 0 AND a.attrelid = c.oid
>  ORDER BY a.attnum;

Works like a charm, thanx!!
-- 
$400 million in gold bullion Soviet Saddam Hussein supercomputer Waco,
Texas Iran munitions PLO explosion Cuba congress Semtex BATF Treasury
NSA
[See http://www.aclu.org/echelonwatch/index.html for more about this]


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: insert statements
Next
From: Tom Lane
Date:
Subject: Re: about BufferPoolBlowaway()