Subject: List the class and rule

From: [email-masked]
Date: Wed, 02 Dec 92 10:12:33 -0800

I have asked the above question a week ago but I did not received any
responses. I wonder if my question got posted.

My question is that:

"I have installed the Postgres 4.0.1 on our Sun Sparc 10 Machine. So
far so good. I want to know if there is any way to list/review the
classes and rules that we have already defined."

If you know the answer, please send me a e-mail. I will very appreciate it. Thanks.

------
Alan S. H. Lam
Department of Information Engineering, CUHK, Hong Kong
E-mail: [email-masked]
Tel: (852) 609 7975 Fax: (852) 603 5032

---

From: [email-masked]
Date: Thu, 03 Dec 92 11:39:05 -0800

> I am quite certain that there are many of us who would
> like to know the answer.  If someone *should* mail you a way to make
> these lists, it would probably be well for you to post it to the group.

1) To review the defined classes, try the following query:
 
  retrieve (r.relname, a.attnum, a.attname, t.typname)
	from r in pg_class, a in pg_attribute, t in pg_type
	where a.attnum > 0 
	and (r.relname < "pg" or r.relname > "ph")
	and a.attrelid = r.oid and a.atttypid = t.oid\g

2) To review the defined rules, try the following query:

	retrieve(pg_prs2rule.prs2text)\g

Here I would like to express my gratitude to the people who give me
the above hints. Thanks.

Alan S. H. Lam