Help with displaying data types. - Mailing list pgsql-sql

From Rob Burne
Subject Help with displaying data types.
Date
Msg-id F76OeIiGXix4A2DreBB0000154f@hotmail.com
Whole thread Raw
Responses Re: Help with displaying data types.
List 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.



pgsql-sql by date:

Previous
From: Yves Martin
Date:
Subject: Statement too long
Next
From: "Tomasz Gralewski"
Date:
Subject: Create tables in one query