Re: [SQL] Help with displaying data types.

2000-11-23 Thread Tom Lane
"Rob Burne" <[EMAIL PROTECTED]> writes: > 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

[SQL] Help with displaying data types.

2000-11-23 Thread Rob Burne
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