Help with displaying data types.

From: "Rob Burne" <robburne(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Help with displaying data types.
Date: 2000-11-16 23:25:22
Message-ID: F76OeIiGXix4A2DreBB0000154f@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am trying to perform a query that will:

1. Return all user defined attributes from a relation.

2. Also return the datatypes of each relation.

So far I can only achieve part 1 with the following:

select attname from pg_class,pg_attribute
where relname=relation_name and
attrelid = pg_class.oid and
atttypid != 26 and
atttypid != 27 and
atttypid != 28 and
atttypid != 29;

But what do I need to add to return the datatype of each attribute. Any
suggestions please?

Regards,

Rob.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Farmer 2000-11-17 00:02:32 RE: SELECT FROM t1 WHERE id IN (SELECT id FROM t2 UNION SELECT id FROM t3)
Previous Message turing2000 2000-11-16 16:27:59