Re: Patch to fix plpython on OS X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch to fix plpython on OS X
Date: 2005-07-19 18:48:52
Message-ID: 8314.1121798932@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
> On Tue, Jul 19, 2005 at 10:03:39AM -0400, Tom Lane wrote:
>> "Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
>>> Attached is a plpython_error_1.out file that will fix cuckoo.
>>
>> What is the reason for the difference in the error message spelling
>> in the first place? Is this a Python version thing (and if so,
>> which version is newer --- that should have pride of place as
>> plpython_error.out I should think)? Or is there some other reason
>> that we need to understand more closely instead of just slapping on
>> a band-aid?

> I don't think it's a version issue; cuckoo is at 2.4, platypus used to
> be at 2.3 but I upgraded it to 2.4 to see if that was the issue, but
> platypus kept working.

Hmm ... if it's *not* a version thing then I really do want to know
what's causing it. Anyone have an idea why this machine is saying
'\u80' where everyone else's python says u'\x80' ?

*** ./expected/plpython_error.out Mon Jul 18 22:06:49 2005
--- ./results/plpython_error.out Mon Jul 18 23:53:30 2005
***************
*** 24,38 ****
--
SELECT unicode_return_error();
ERROR: plpython: function "unicode_return_error" could not create return value
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)
INSERT INTO unicode_test (testvalue) VALUES ('test');
ERROR: plpython: function "unicode_trigger_error" could not modify tuple
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)
SELECT unicode_plan_error1();
WARNING: plpython: in function unicode_plan_error1:
DETAIL: plpy.Error: Unknown error in PLy_spi_execute_plan
ERROR: plpython: function "unicode_plan_error1" could not execute plan
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)
SELECT unicode_plan_error2();
ERROR: plpython: function "unicode_plan_error2" could not execute plan
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)
--- 24,38 ----
--
SELECT unicode_return_error();
ERROR: plpython: function "unicode_return_error" could not create return value
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)
INSERT INTO unicode_test (testvalue) VALUES ('test');
ERROR: plpython: function "unicode_trigger_error" could not modify tuple
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)
SELECT unicode_plan_error1();
WARNING: plpython: in function unicode_plan_error1:
DETAIL: plpy.Error: Unknown error in PLy_spi_execute_plan
ERROR: plpython: function "unicode_plan_error1" could not execute plan
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)
SELECT unicode_plan_error2();
ERROR: plpython: function "unicode_plan_error2" could not execute plan
! DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-07-19 18:54:07 More buildfarm stuff
Previous Message Jim C. Nasby 2005-07-19 18:40:25 Re: Patch to fix plpython on OS X

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Fuhr 2005-07-19 19:54:00 Re: Patch to fix plpython on OS X
Previous Message Jim C. Nasby 2005-07-19 18:40:25 Re: Patch to fix plpython on OS X