44

Please provide a step-by-step answer on how to build a basic Entity-Relationship Diagram (ERD) using the admin tool that comes with postgres (pgAdmin) with the the database designer that comes with postgres.

Note that the general question on what is the best way to generate a diagram from postgres, is addressed in this softwarerecs.stackexchange question

ntg
  • 12,950
  • 7
  • 74
  • 95
vdegenne
  • 12,272
  • 14
  • 80
  • 106
  • 1
    pgAdmin does not support creating ER-Diagrams. It's for managing the datatabase and running queries. –  Mar 13 '12 at 22:08
  • @a_horse_with_no_name consider my second note – vdegenne Mar 13 '12 at 22:19
  • any decent ER Tool should be able to import the table definitions from the database. I don't understand what role you think pgAdmin is playing during the design phase. –  Mar 13 '12 at 22:25
  • @Oddant did the Erwin Brandstetter Answer made your task complete – 09Q71AO534 Oct 15 '13 at 09:17
  • Sorry about the necro, but it looks like the v5 release from 2021-02-25 has a beta release of an ERD tool. Dropping this here since this is Google's top hit. – Matthew Allen Feb 25 '21 at 13:45

2 Answers2

16

Update

Sadly, the database designer is not released with the main release of pgAdmin after all. (At least the case for version 1.16 through 1.22.)

See discussion here and here and finally:

You need to use --enable-databasedesigner with ./configure to enable it. By default, it's disabled.

There are too many bugs and rough edges and not enough people interested to work on it.


pgAdmin had a GSoC project in 2011, in the course of which Luis Ochoa designed the new database designer - which can also reverse engineer ER diagrams from existing dbs. Unfortunately it wasn't ready for release with pgAdmin 1.14 (the current version). But it's in the repository for version 1.16 that will probably accompany the release of PostgreSQL 9.2.

See a video here.
Screenshot.
Blog post announcing it.

There are still some rough edges, but Luis Ochoa recently announced he is working on it.

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
  • 2
    It's now about 18 months since @09Q71AO534's comment, so I thought it worth re-iterating. Whether or not this is an addin or a core feature, it's totally brilliant... but how do we get it? I've got PostgreSQL 9.3.5, PostGIS 2.1.3, and pgAdmin III v1.18.1, and no sign of the icon that 09Q71AO534's comment indicates. To reframe this into a context that the /b/-aware will grok: ZOMFG SO WANT. – GT. Apr 19 '15 at 06:29
  • 4
    Up. Is this out ? I have the 1.18 pgAdmin but I can't find the feature. – rllola Oct 26 '15 at 15:17
  • It is still not available in 1.22.1 (March 2016), did I miss something? – jangorecki Apr 15 '16 at 21:43
  • 1
    @jangorecki: You didn't miss anything. The database developer was removed from the main release. I added an update above. – Erwin Brandstetter Apr 16 '16 at 00:36
2

If you are running Linux, you could use pgDesigner: http://sourceforge.net/projects/pgdesigner/

tmikulcek
  • 550
  • 5
  • 17