Re: [PATCHES] Patch to fix plpython on OS X
On Tue, Jul 19, 2005 at 02:48:52PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > 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' ? Is it possible that plpython.so is linked against an old version of libpython? I see that the error message changed a few years ago: http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Python/exceptions.c?r1=1.44&r2=1.45 http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Python/exceptions.c?r1=1.45&r2=1.46 As I recall, Python must be configured with --enable-shared or you don't get a shared version of libpython, so if you installed a new Python but not a new version of libpython.*.so, then plpython.so might be linked against an old version. Does this machine have ldd or the equivalent? If so, can you compare "ldd /path/to/python" and "ldd /path/to/plpython.so"? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [PATCHES] Patch to fix plpython on OS X
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Tue, Jul 19, 2005 at 10:03:39AM -0400, Tom Lane wrote: >> "Jim C. Nasby" <[EMAIL PROTECTED]> 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.outMon 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 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Patch to fix plpython on OS X
On Tue, Jul 19, 2005 at 10:03:39AM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> 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. -- Jim C. Nasby, Database Consultant [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [PATCHES] Patch to fix plpython on OS X
"Jim C. Nasby" <[EMAIL PROTECTED]> 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? regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend