Skip to content

PostgreSQL autodoc — 自动根据数据库生成文档和数据库model diagram

PostgreSQL autodoc只能针对PostgreSQL的数据库,在linux下使用。Debian系统可以直接

sudo apt-get install postgresql-autodoc

安装。安装成功之后,只要运行

postgresql_autodoc -d DATABASE_NAME -u USERNAME -h DB_SERVER -p PORT

就能自动在当前目录生成数据库的model diagram, XML文件和类似API文档的html文件。非常方便。

其中model diagram分为.dot文件和dia文件,dia文件可以在DIA中打开进行再编辑。dot的话,可以通过

dot -Tpng -o output.png FILENAME.dot

来生成png图片。

是为记。

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*