Subject: retrieving class attributes

From: <[email-masked]>
Date: Thu, 11 Jun 1992 15:47:07 -0500

I want to retrieve (find) what the attributes (name, type) are of a class.
I have compiled the example in the libpq documentation and that works fine
except that you need to perform a query selecting "all" of the fields, which
in turn returns all of the data. All I really want is the attribute information
without the data.

Is this possible.?

Thanks in advance.

 ____________________________________________________________________________
|                           |                            ________            |
|     Randy S Johnston      | Alliant Techsystems, Inc. |        |           |
| Senior Research Scientist | Research and Technology   |        |           |
|   [email-masked]    | Mail Stop MN11-1610       | ALLIANT|TECHSYSTEMS|
|   Voice: (612) 931-6084   | 600 2nd St., NE           |        |           |
|    Fax: (612) 931-6165    | Hopkins, MN 55343         |________|           |
|___________________________|________________________________________________|

---

From: <[email-masked]>
Date: Thu, 11 Jun 92 13:56:48 PDT

> 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