Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA29860; Thu, 11 Jun 92 13:56:44 -0700
Message-Id: <9206112056.AA29860@postgres.Berkeley.EDU>
From: <mao@postgres.berkeley.edu>
Subject: Re: retrieving class attributes
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Thu, 11 Jun 92 15:47:07 MDT.
             <92Jun11.154719cdt.46218@nic.rtc.atk.com> 
Date: Thu, 11 Jun 92 13:56:48 PDT

In message <92Jun11.154719cdt.46218@nic.rtc.atk.com> you write:

> I want to retrieve (find) what the attributes (name, type) are of a class.

either
	retrieve (foo.all) where 1=0
or
	retrieve (a.attname, t.typname) from a in pg_attribute,
	t in pg_type, r in pg_class where a.attrelid = r.oid
	and a.attypid = t.oid and r.relname = "foo"

will give you schema info for 'foo'.  the longer query shows all
atts, system as well as user, and shows type names.  the former is
faster.
					mike
