mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Added XXXARRAY imports to psycopg2.extenions
This commit is contained in:
parent
5a428642f8
commit
e664abb248
|
@ -26,6 +26,10 @@ This module holds all the extensions to the DBAPI-2.0 provided by psycopg.
|
|||
|
||||
from _psycopg import UNICODE, INTEGER, LONGINTEGER, BOOLEAN, FLOAT
|
||||
from _psycopg import TIME, DATE, INTERVAL
|
||||
from _psycopg import BINARYARRAY, BOOLEANARRAY, DATEARRAY, DATETIMEARRAY
|
||||
from _psycopg import DECIMALARRAY, FLOATARRAY, INTEGERARRAY, INTERVALARRAY
|
||||
from _psycopg import LONGINTEGERARRAY, ROWIDARRAY, STRINGARRAY, TIMEARRAY
|
||||
from _psycopg import UNICODEARRAY
|
||||
|
||||
from _psycopg import Boolean, QuotedString, AsIs
|
||||
try:
|
||||
|
|
|
@ -160,7 +160,6 @@ pq_raise(connectionObject *conn, cursorObject *curs, PGresult *pgres)
|
|||
|
||||
/* if the connection has somehow beed broken, we mark the connection
|
||||
object as closed but requiring cleanup */
|
||||
Dprintf("%d %d", PQtransactionStatus(conn->pgconn), PQstatus(conn->pgconn));
|
||||
if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD)
|
||||
conn->closed = 2;
|
||||
|
||||
|
|
|
@ -309,6 +309,7 @@ def registerTypes(encoding):
|
|||
psycopg2.extensions.register_type(INTERVAL)
|
||||
STRING = psycopg2.extensions.new_type((CHAR_OID, TEXT_OID, BPCHAR_OID, VARCHAR_OID), "ZSTRING", _get_string_conv(encoding))
|
||||
psycopg2.extensions.register_type(STRING)
|
||||
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
|
||||
|
||||
|
||||
dsn2option_mapping = {'host': 'host',
|
||||
|
|
Loading…
Reference in New Issue
Block a user