Deriving/generating specs from DB Schema

Do we have a nice way to generate specs for DB Tables, e.g. Postgres based on table DDLs? Maybe someone has written libraries and such?