postgresqlerdschemaspy

Generate ER diagram from postgresql database [SchemaSpy]


Anyone use this tool? I wanted to generate a ER diagram from my database. I run SchemaSpy like this:

java -jar schemaSpy_5.0.0.jar -t pgsql -db mydb -host localhost -dp /home/katie/downloads/postgresql-8.0-312.jdbc3.jar -noschema -u postgres -o .

and then, I got errors:

Using database properties:
  [schemaSpy_5.0.0.

    jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
    Gathering schema details..........................................................java.sql.SQLException: ERROR: function information_schema._pg_keypositions() does not exist
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221)
        at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedExportedKeys(AbstractJdbc2DatabaseMetaData.java:3237)
        at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedKeys(AbstractJdbc2DatabaseMetaData.java:3533)
        at net.sourceforge.schemaspy.model.Table.connectForeignKeys(Table.java:106)
        at net.sourceforge.schemaspy.model.Database.connectTables(Database.java:984)
        at net.sourceforge.schemaspy.model.Database.<init>(Database.java:83)
        at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:211)
        at net.sourceforge.schemaspy.Main.main(Main.java:42)

I use PostgreSQL 9.1 on Xubuntu 12.04.


Solution

  • Issues were resolved by: