Fixes bug 870092 - Added raised exception in postgres methods.
Merge pull request #1287 from AdrianGaudebert/870092-psycopg-exceptions

Fixes bug 870092 - Added raised exception in postgres methods.
[no bug] Cleaned up remaining output of unit tests.
Merge pull request #1288 from AdrianGaudebert/clean-tests-output

[no bug] Cleaned up remaining output of unit tests.