# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: PostgreSQL.py,v 1.9 2006/11/08 22:43:02 mlhuang Exp $
+# $Id: PostgreSQL.py,v 1.10 2006/11/09 19:34:04 mlhuang Exp $
#
import psycopg2
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
+# UNICODEARRAY not exported yet
+psycopg2.extensions.register_type(psycopg2._psycopg.UNICODEARRAY)
import pgdb
from types import StringTypes, NoneType
{"FLOAT", typecast_FLOAT_types, typecast_FLOAT_cast, NULL},
{"DECIMAL", typecast_DECIMAL_types, typecast_DECIMAL_cast, NULL},
{"UNICODE", typecast_UNICODE_types, typecast_UNICODE_cast, NULL},
- /* XXX Unicode array elements are always cast to regular Python strings */
- /* {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL}, */
- {"STRING", typecast_STRING_types, typecast_UNICODE_cast, NULL},
+ {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL},
{"BOOLEAN", typecast_BOOLEAN_types, typecast_BOOLEAN_cast, NULL},
{"DATETIME", typecast_DATETIME_types, typecast_DATETIME_cast, NULL},
{"TIME", typecast_TIME_types, typecast_TIME_cast, NULL},