pgsql: Add Unicode support in PL/Python PL/Python now accepts Unicode

From: petere(at)postgresql(dot)org (Peter Eisentraut)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add Unicode support in PL/Python PL/Python now accepts Unicode
Date: 2009-09-12 22:13:12
Message-ID: 20090912221312.65EBB753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Add Unicode support in PL/Python

PL/Python now accepts Unicode objects where it previously only accepted string
objects (for example, as return value). Unicode objects are converted to the
PostgreSQL server encoding as necessary.

This change is also necessary for future Python 3 support, which treats all
strings as Unicode objects.

Since this removes the error conditions that the plpython_unicode test file
tested for, the alternative result files are no longer necessary.

Modified Files:
--------------
pgsql/src/pl/plpython:
plpython.c (r1.128 -> r1.129)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/plpython.c?r1=1.128&r2=1.129)
pgsql/src/pl/plpython/expected:
README (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/README?r1=1.1&r2=1.2)
plpython_trigger.out (r1.4 -> r1.5)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_trigger.out?r1=1.4&r2=1.5)
plpython_unicode.out (r1.2 -> r1.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode.out?r1=1.2&r2=1.3)
pgsql/src/pl/plpython/sql:
plpython_trigger.sql (r1.3 -> r1.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/sql/plpython_trigger.sql?r1=1.3&r2=1.4)
plpython_unicode.sql (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/sql/plpython_unicode.sql?r1=1.1&r2=1.2)

Removed Files:
-------------
pgsql/src/pl/plpython/expected:
plpython_unicode_2.out
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode_2.out)
plpython_unicode_3.out
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpython/expected/plpython_unicode_3.out)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message User Fxjr 2009-09-12 23:08:53 npgsql - Npgsql2: [#1010700] Capture parameter names with
Previous Message Tom Lane 2009-09-12 22:12:09 pgsql: Rewrite the planner's handling of materialized plan types so that

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-12 22:14:39 Re: match_unsorted_outer() vs. cost_nestloop()
Previous Message Greg Smith 2009-09-12 21:51:49 Re: COPY enhancements