Merge pull request #10 from michaelwermeester/postgresql_077

Fix PostgreSQL problems.
Merge remote-tracking branch 'upstream/master'