Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eANFlhA62681 for ; Thu, 23 Nov 2000 10:47:43 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from hotmail.com (f76.law8.hotmail.com [216.33.241.76]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAGNQrs01088 for ; Thu, 16 Nov 2000 18:26:53 -0500 (EST) (envelope-from robburne@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 16 Nov 2000 15:25:22 -0800 Received: from 194.112.61.186 by lw8fd.law8.hotmail.msn.com with HTTP; Thu, 16 Nov 2000 23:25:22 GMT X-Originating-IP: [194.112.61.186] From: "Rob Burne" To: pgsql-sql@postgresql.org Subject: Help with displaying data types. Date: Thu, 16 Nov 2000 23:25:22 GMT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 16 Nov 2000 23:25:22.0516 (UTC) FILETIME=[7DC01940:01C05024] X-Archive-Number: 200011/195 X-Sequence-Number: 226 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.