Reverse Engineering - Mailing list pgsql-hackers

From Peter Harvey
Subject Reverse Engineering
Date
Msg-id 3B856F58.62B2AAC4@codebydesign.com
Whole thread Raw
List 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





pgsql-hackers by date:

Previous
From: "Magnus Naeslund\(f\)"
Date:
Subject: [PATCH] Win32 errno a little bit safer
Next
From: Tom Lane
Date:
Subject: Re: Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]