Log Message: ----------- Implement encoding "choregraphy". This fixes issues with reading unicode strings in procedures by specifying the encoding using the magic comment # -*- encoding: utf-8 -*-. In addition, set the default unicode encoding after initializing the Postgres interface module. The interface module now includes an encoding portion that adds PostgreSQL aliases. This makes using PostgreSQL encoding names with Python seamless. Add Encoding and EncodingCode to the Postgres module. These functions get the database's encoding. EncodingCode returns the database's pg_enc, and Encoding returns the database's encoding as a string(note, translated to the Python encoding name). (Perhaps an EncodingCodeName should be added as well to get the database's encoding as a PostgreSQL encoding name). To do next: translate the procedure source to utf-8 before compilation. After this, plpy should fully support/recognize the database's encoding. Modified Files: -------------- be/include/pypg: ci.h (r1.2 -> r1.3) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/include/pypg/ci.h.diff?r1=1.2&r2=1.3) cis.h (r1.3 -> r1.4) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/include/pypg/cis.h.diff?r1=1.3&r2=1.4) be/test/expected/80: fund (r1.2 -> r1.3) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/test/expected/80/fund.diff?r1=1.2&r2=1.3) be/src: pl.c (r1.19 -> r1.20) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/pl.c.diff?r1=1.19&r2=1.20) function.c (r1.6 -> r1.7) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/function.c.diff?r1=1.6&r2=1.7) module.c (r1.16 -> r1.17) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/module.c.diff?r1=1.16&r2=1.17) Added Files: ----------- be/include/pypg: encoding.h (r1.1) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/include/pypg/encoding.h?rev=1.1&content-type=text/x-cvsweb-markup) be/src: encoding.c (r1.1) (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/encoding.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql-committers by date:
Соглашаюсь с условиями обработки персональных данных