Re: Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings.

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, Asif Naeem <asif(dot)naeem(at)enterprisedb(dot)com>
Subject: Re: Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings.
Date: 2012-07-14 14:50:06
Message-ID: 5001871E.9050308@wulczer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 13/07/12 13:38, Jan Urbański wrote:
> On 12/07/12 11:08, Heikki Linnakangas wrote:
>> On 07.07.2012 00:12, Jan Urbański wrote:
>>> So you're in favour of doing unicode -> bytes by encoding with UTF-8 and
>>> then using the server's encoding functions?
>>
>> Sounds reasonable to me. The extra conversion between UTF-8 and UCS-2
>> should be quite fast, and it would be good to be consistent in the way
>> we do conversions in both directions.
>>
>
> I'll implement that than (sorry for not following up on that eariler).

Here's a patch that always encodes Python unicode objects using UTF-8
and then uses Postgres's internal functions to produce bytes in the
server encoding.

Cheers,
Jan

Attachment Content-Type Size
plpython-use-server-encoding-functions.patch text/x-diff 4.4 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-07-14 18:30:51 pgsql: Don't initialize TLI variable to -1, as TimeLineID is unsigned.
Previous Message Heikki Linnakangas 2012-07-14 11:24:04 pgsql: Print the name of the WAL file containing latest REDO ptr in pg_

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-07-14 17:29:25 Re: Support for XLogRecPtr in expand_fmt_string?
Previous Message Jose Ildefonso Camargo Tolosa 2012-07-14 14:12:09 Re: Synchronous Standalone Master Redoux