Get rid of custom exceptions, use ones from psycopg2 library