diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-16 11:04:02 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-16 12:46:35 +0000 |
commit | d50ed488074a3b809bf98fb1e6971bc295ba31c3 (patch) | |
tree | 333d66d7ddf85b5704ccd64a99283862aebbc9f8 /psycopg/connection_int.c | |
parent | b5d80b609d6f1b0922ed51d6182ff137f1b3ba3e (diff) | |
download | psycopg2-d50ed488074a3b809bf98fb1e6971bc295ba31c3.tar.gz |
Added readonly and deferrable attributes
Diffstat (limited to 'psycopg/connection_int.c')
-rw-r--r-- | psycopg/connection_int.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index e6906eb..49daae5 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -568,19 +568,6 @@ exit: } -RAISES_NEG int -conn_get_isolation_level(connectionObject *self) -{ - /* this may get called by async connections too: here's your result */ - if (self->autocommit) { - return ISOLATION_LEVEL_AUTOCOMMIT; - } - else { - return self->isolevel; - } -} - - int conn_get_protocol_version(PGconn *pgconn) { @@ -697,6 +684,9 @@ conn_setup(connectionObject *self, PGconn *pgconn) /* for reset */ self->autocommit = 0; + self->isolevel = ISOLATION_LEVEL_DEFAULT; + self->readonly = STATE_DEFAULT; + self->deferrable = STATE_DEFAULT; /* success */ rv = 0; |