Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Please suggest a tool to reverse engineer a PostgreSQL DB into an entity-relationship-diagram (ERD) or equivalent ??

Ideally, I'm looking for a simple ERD or UML class diagram in a format that is easy to work with (SVG, PDF or any common UML file format).

So far, I founded only software for MySQL and it's for Windows, but that's not solution.

share|improve this question
See: stackoverflow.com/questions/2937723/… The accepted answer runs on Linux: dbschema.com/download.html –  FrustratedWithFormsDesigner Jun 19 '12 at 13:36
I will try, thanks .... –  tasmaniski Jun 19 '12 at 13:53
Quite often people have Visio pro just lying around, and it's got a passably good DB reverse engineering function. May or may not be relevant to the OP but it's a good standby in many cases. –  ConcernedOfTunbridgeWells Jun 19 '12 at 15:55
visual-paradigm has postgresql port too. www.visual-paradigm.com free version also does. –  sftsz Nov 27 '12 at 12:06

2 Answers 2

pg_autodoc is what I have used. It converts to dia UML diagrams. Seems to work ok. http://www.rbt.ca/autodoc/

share|improve this answer
does this work on newer version of PostgreSQL? 8.x and above? –  Phill Pafford Oct 12 '12 at 14:20
I have used it on 7.x through 9.x. –  Chris Travers Oct 12 '12 at 14:28
That creates a table diagram. Getting from there to an entity-relationship diagram is another step. –  Peter Eisentraut Jan 2 '13 at 15:45

Have a look at at (the order of the items implies my personal choices)

  • DbSchema (not free, but not expensive: http://dbschema.com/)
  • SchemaSpy (http://schemaspy.sourceforge.net/)
  • Power*Architect (http://code.google.com/p/power-architect/) although development seems to have stopped)

All of them work with PostgreSQL (and other DBMS)

(Note: I have nothing to do with DbSchema. I just think it's a pretty good tool)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.