Re: strange system columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Colton A Smith <smith(at)cs(dot)utk(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: strange system columns
Date: 2006-01-12 05:11:16
Message-ID: 1325.1137042676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Colton A Smith <smith(at)cs(dot)utk(dot)edu> writes:
> SELECT attname, typname, attnum
> FROM pg_attribute INNER JOIN pg_type
> ON pg_attribute.atttypid = pg_type.typelem
> WHERE pg_attribute.attrelid = $oid (derived above)
> AND NOT attisdropped;

I think you meant to join to pg_type.oid, not pg_type.typelem.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Fuhr 2006-01-12 05:16:05 Re: strange system columns
Previous Message Tom Lane 2006-01-12 05:07:05 Re: Rule for updating ipaddress on insertion