PostgreSQL Database Modeler source-code repo
Pull request Compare This branch is 2367 commits behind pgmodeler:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

PostgreSQL Database Modeler - pgModeler

PostgreSQL Database Modeler, or simply, pgModeler is an open source tool for modeling databases that merges the classical concepts of entity-relationship diagrams with specific features that only PostgreSQL implements. The pgModeler translates the models created by the user to SQL code and apply them onto database clusters from version 8.0 to 9.1.

Please, let me know how the pgModeler is working on your system! Help to improve this project, give your feedback about the software or report any bug at Issues page. Additionaly, follow the pgModeler profile on Facebook or Twitter and be up-to-date with new features, fixes and releases.


This software is licensed under GNU General Public License 2.0. See LICENSE for details.


For details about compilation and installation process see for details.


Although this is a major upgrade version of pgModeler it is recommended NOT EXPORT the models created directly to production environments. Not all possible code generation were tested in this way, is its your own risk export the models into environments that are not intended for testing. The project's author is not responsible for any possible loss of data due the inappropriate use of this tool.

Known bugs

  • Broken compilation process on MacOSX. (issue#10)
  • PgModeler crashes when trying to make a relationship between tables were some of them have special trigger/index. (issue#8)
  • PgModeler, when compiled on Qt 4.7.x, crashes after activating the print dialog. (issue#1)

Change History

[ v0.3.2 ]

  • [Change]: The default extension for the models now stands for ".dbm" (issue#9)
  • [Change]: Tables and sequences now can be used as function return type as well parameter type. This is valid for other objects that make use of base types (except for table columns).
  • [Change]: The relationship conversion command now need to be confirmed by the user.
  • [Fix]: Compilation process now works correctly on Windows system.
  • [Fix]: Adjusted the size of some forms to show their fields properly.
  • [Fix]: The "make distclean" command now make the correct cleanup on build/ directory.
  • [Fix]: Startup scripts "start-pgmodeler.(sh|bat)" where adjusted. To prevent errors pgModeler need to be started through these scripts.
  • [Fix]: Corrected the reference to the plugins directory. (issue#7)
  • [Fix]: The action "New Object -> Tablespace" now is displayed properly.

[ v0.3.1 ]

  • [New]: Relationships generates column suffixes automaticaly. This behavior can be changed on the relationship editing form.
  • [New]: Added two samples to pgModeler.
  • [Change]: Tables are now created with "With OIDs" attribute by default.
  • [Change] The graphical update method on overview widget has improved preventing unecessary processing.
  • [Fix]: Class CenaObjetos now doesn't delete objects twice.
  • [Fix]: Eliminated bug that caused crashing on pgModeler when closing a model.

[ v0.3.0 ]

  • [New]: Added a model overview widget.
  • [New]: Added export feature that generates PNG image of the models.
  • [Fix]: Corrected the naming of columns generated by many-to-many relationships.
  • [Fix]: Corrected generation of XML/SQL code by the model.

[ v0.2.0 ]

  • [New]: Added an interface to implement third party plugins. Check for details.
  • [New]: Added a short cut to easily control the zoom on the model. Use Crtl + Mouse wheel up (zoom up) or Crtl + Mouse wheel down (zoom down).
  • [Change]: Due to the plugin interface the compilation method changed back to the form of shared libraries + executable.
  • [Fix]: No more crashes when removing an primary-key of a table which has relationship with other tables. (issue#2)
  • [Fix]: Adjusted the semantics of one-to-one relationships.

[ v0.1.2 ]

  • [New]: Added a functionality to save modified models before closing the software.
  • [Change]: Updated the en_US dictionary with the texts of the above functionality.
  • [Fix]: Dockwidgets no longer disappear unexpectedly when the main window is minimized.
  • [Fix]: Operations performed before creating a table object (column, constraint, trigger, index, rule) are no longer removed when any exception is thrown in the creation of these object.
  • [Fix]: Fixed bug that caused user-defined types had wrong SQL/XML code generated by the model.
  • [Fix]: Functions and Types received an own range of id in order to create these objects in a correct way.
  • [Fix]: Eliminated segmentation faults caused by the destruction of relationships which possessed attributes/constraints.
  • [Fix]: Adjusted the translation to SQL code of one-to-one relationships.
  • [Fix]: Eliminated segmentation fault when editing relationships and/or undoing an operation involving a relationship.
  • [Fix]: Identifiers relationships now correctly display the thick line beside the weak entity.

[ v0.1.1 ]

  • [Fix]: Correction of the actions for inserting graphic objects (table, text box, vision and relationship) in Windows environment.
  • [Fix]: Correction on the display of the maximize button in the window decoration in Windows environment.
  • [Fix]: Adjust on the position and spacing of widgets in editing forms.
  • [Fix]: The XML parser can now correctly read DTD files in Windows environment.
  • [Fix]: The compilation method is no longer in the form of shared libraries + executable and passed to be as standalone executable only.

Older Releases/Code

The older code and releases of pgModeler can be found at