Applied patches written by Nigel Metheringham. His notes follow.
---
The postgres producer uses a hash as both a single level and a 2 level
symbol table for ensuring names are unique which causes some interesting
failures when a database has constraint names which match table names.
I've replaced the code with effectively the same code as the mysql
producer uses, massaged very slightly so as in the most cases to
produce the same name remapping as the old code but without the
extra explosions when it attempts to deref a scalar as a hash.
---
When a table has more than one index, all but the last CREATE INDEX
commands produced have a doubled semi-colon at the end of them.
This causes the parser for postgresql to explode :-)
One line bug fix appears to sort it.