Added XXXARRAY imports to psycopg2.extenions

This commit is contained in:
Federico Di Gregorio 2008-05-30 00:39:50 +02:00
parent 5a428642f8
commit e664abb248
3 changed files with 5 additions and 1 deletions

View File

@ -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 UNICODE, INTEGER, LONGINTEGER, BOOLEAN, FLOAT
from _psycopg import TIME, DATE, INTERVAL 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 from _psycopg import Boolean, QuotedString, AsIs
try: try:

View File

@ -160,7 +160,6 @@ pq_raise(connectionObject *conn, cursorObject *curs, PGresult *pgres)
/* if the connection has somehow beed broken, we mark the connection /* if the connection has somehow beed broken, we mark the connection
object as closed but requiring cleanup */ object as closed but requiring cleanup */
Dprintf("%d %d", PQtransactionStatus(conn->pgconn), PQstatus(conn->pgconn));
if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD) if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD)
conn->closed = 2; conn->closed = 2;

View File

@ -309,6 +309,7 @@ def registerTypes(encoding):
psycopg2.extensions.register_type(INTERVAL) psycopg2.extensions.register_type(INTERVAL)
STRING = psycopg2.extensions.new_type((CHAR_OID, TEXT_OID, BPCHAR_OID, VARCHAR_OID), "ZSTRING", _get_string_conv(encoding)) 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(STRING)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
dsn2option_mapping = {'host': 'host', dsn2option_mapping = {'host': 'host',