pg2docbook is an application for converting PostgreSQL databases and comments to the DocBook format. In this way the database is documented together with the objects and can be converted to the readable formats DocBook supports.
See Chapter 2 for an example of how the documentation could look.