pg8000 passing test/sql

Also a PEP8 tidy commit.