Subject: How to query for a class definition?

From: "Jim O'Connor" <[email-masked]>
Date: Tue, 25 Jan 94 12:30:40 -0800

The answer to this is probably trivial, but what is the
query to get the definition of a user-defined class?
I would like to get back a list of field names and the type of
each field.

Thanks.

Jim O'Connor			
MasPar Computer Corporation
[email-masked]

---

From: [email-masked] (Jean Anderson)
Date: Tue, 25 Jan 94 12:56:47 PST

> I would like to get back a list of field names and the type of

try
     retrieve (r.relname, a.attnum, a.attname, t.typname)
     from    a in pg_attribute, t in pg_type, r in pg_class
     where   a.attrelid = r.oid
     and     a.atttypid = t.oid
     and     r.relname = "student"   /* your class name goes here */
     and     a.attnum > 0            /* system attributes are attnum=0 */
     sort by attnum
     \g

 -jean