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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Jan Urbański <wulczer(at)wulczer(dot)org>, 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-06 20:47:54
Message-ID: 1341607674.7092.3.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On fre, 2012-07-06 at 18:53 +0300, Heikki Linnakangas wrote:
> > What shall we do about those? Ignore them? Document that if you're sing
> > one of these encodings then PL/Python with Python 2 will be crippled and
> > with Python 3 just won't work?
>
> We could convert to UTF-8, and use the PostgreSQL functions to convert
> from UTF-8 to the server encoding. Double conversion might be slow, but
> I think it would be better than failing.

Actually, we already do the other direction that way
(PLyUnicode_FromStringAndSize) , so maybe it would be more consistent to
always use this.

I would hesitate to use this as a kind of fallback, because then we
would sometimes be using PostgreSQL's recoding tables and sometimes
Python's recoding tables, which could became confusing.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2012-07-06 20:54:59 pgsql: Convert libpq regress script to Perl
Previous Message Bruce Momjian 2012-07-06 16:28:33 pgsql: Run updated copyright.pl on HEAD and 9.2 trees, updating the psq

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-07-06 20:50:55 Re: Schema version management
Previous Message Robert Haas 2012-07-06 20:40:28 Re: Event Triggers reduced, v1