diff --git a/psycopg/connection_type.c b/psycopg/connection_type.c index f3a17f93..13c017e8 100644 --- a/psycopg/connection_type.c +++ b/psycopg/connection_type.c @@ -499,6 +499,12 @@ psyco_conn_set_transaction(connectionObject *self, PyObject *args, PyObject *kwa } } if (Py_None != deferrable) { + if (self->server_version < 90100) { + PyErr_SetString(ProgrammingError, + "the 'deferrable' setting is only available" + " from PostgreSQL 9.1"); + return NULL; + } if (!(c_deferrable = _psyco_conn_parse_onoff(deferrable))) { return NULL; }