Reverse Engineering

From: Peter Harvey <pharvey(at)codebydesign(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Reverse Engineering
Date: 2001-08-23 21:02:16
Message-ID: 3B856F58.62B2AAC4@codebydesign.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There seem to be several ways to get at just about anything in the
Catalog Tables. The ODBC driver, psql, and pg_dump typically use
slightly diff sql and you guys have suggested even better ways. Forgive
me as I ask for more.

How do I determine the foriegn keys in a table?

I see pg_class.relfkeys and pg_class.relrefs. I am not sure what the
diff is between the two. In anycase; where can I go to find the
table/column(s) for each fk?

Having this info will allow me to accurately connect the tables in the
reverse engineered ERD. Very cool.

Peter

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Naeslund(f) 2001-08-23 21:22:14 [PATCH] Win32 errno a little bit safer
Previous Message Bruce Momjian 2001-08-23 20:45:09 Re: User locks code