Work in progress: giving a structure to psycopg2.Error

The idea is to store the PGresult there and make the diag independent from the
cursor.

In practice, it's happily segfaulting.