Subject: postgres question

From: [email-masked] (Rex Jakobovits)
Date: Wed, 5 Aug 92 15:00:56 -0700

Hello,

  I'm a PhD student doing research for Dr. Linda Shapiro at the
University of Washington.  We have NSF support to design and build a
spatial database system based on a hierarchical relational data
structure.  We are interested in evaluating POSTGRES as a potential
framework for our project.

  We have installed POSTGRES at our site, and I've been experimenting
with the examples in the Manual.  One thing I have not been able to
figure out is: how do I list the classes and fields defined in a
database?  Suggestions would be greatly appreciated.

	Rex Jakobovits ([email-masked])
	Dept. of Computer Science
	University of Washington

---

From: [email-masked] (Alfredo Sanchez)
Date: Wed, 5 Aug 92 19:44:03 -0700

Rex Jakobovits ([email-masked]) writes:

> One thing I have not been able to

Someone answered this and I've used it now and then, so I repost:
> 
> You can query the system catalogs directly:
> 
> 	retrieve (pg_class.relname)
> 
> 	retrieve (pg_attribute.attname)
> 	where pg_attribute.attrelid = pg_class.oid
> 	and pg_class.relname = "foo"
> 
> The first query gives you all class names in the database and
> the second query gives you all attribute names for class foo
> (this includes both system and user defined attributes).
> 

Regards,

J Alfredo Sanchez H
-------------------
Hypermedia Research Lab
Texas A&M University