From: SourceForge.net <no...@so...> - 2006-06-02 13:37:15
|
Bugs item #1016005, was opened at 2004-08-25 16:20 Message generated for change (Comment added) made by ghaering You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1016005&group_id=16528 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: PgSQL Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Laurent Mignon (mignonlm) Assigned to: Nobody/Anonymous (nobody) Summary: _quote function enhancement Initial Comment: _quote function does not support unicode type as value and don't format list and tuple with postgrsql specific keyword 'ARRAY...' def _quote(value): if value is None: return 'NULL' elif hasattr(value, '_quote'): return value._quote() elif type(value) is DateTimeType: return "'%s'" % value elif type(value) is DateTimeDeltaType: return "'%s'" % dateTimeDelta2Interval(value) elif isinstance(value, (UnicodeType,StringType)): #Value - Add UnicodeType return PgQuoteString(value) elif isinstance(value, LongType): return str(value) elif type(value) in [ListType, TupleType]: # List - Added part n = len(value) if n == 0: return "NULL" s = '' for i in value: if s: s = s + ', ' s = s + _quote(i) return "ARRAY[" + s + "]" # List- end else: return repr(value) ---------------------------------------------------------------------- >Comment By: Gerhard Häring (ghaering) Date: 2006-06-02 15:37 Message: Logged In: YES user_id=163326 Unicode is supported now and ARRAYs are supported via PgSQL.PgArray. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1016005&group_id=16528 |