Re: [HACKERS] plpython fails its regression test

2003-02-06 Thread Andrew Bosma

I hate following up my on my own email, especially to say I was wrong.
In a previous message I said plpython passed the regression test here.
It failed, I'll check it out over the weekend.

However, python version 2.2 and later will fail further tests because
of the deprecation of rexec.  

Andrew

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[HACKERS] plpython fails its regression test

2003-01-30 Thread Tom Lane
In CVS tip, if you run make installcheck in src/pl/plpython, the test
fails with a number of diffs between the expected and actual output.
I'm not sure if plpython is broken, or if it's just that someone changed
the behavior and didn't bother to update the test's expected files (the
test files don't seem to have been maintained since they were first
installed).

Comments?

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] plpython fails its regression test

2003-01-30 Thread Greg Copeland
On Thu, 2003-01-30 at 16:39, Tom Lane wrote:
 In CVS tip, if you run make installcheck in src/pl/plpython, the test
 fails with a number of diffs between the expected and actual output.
 I'm not sure if plpython is broken, or if it's just that someone changed
 the behavior and didn't bother to update the test's expected files (the
 test files don't seem to have been maintained since they were first
 installed).
 
 Comments?
 
 

Could this have anything to do with the changes I made to the python
stuff to get it to support longs (IIRC)?  It's been a while now so I
don't recall exactly what got changed.  I do remember that I chanced
some test code to ensure it tested the newly fixed data type.


Regards,


-- 
Greg Copeland [EMAIL PROTECTED]
Copeland Computer Consulting


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] plpython fails its regression test

2003-01-30 Thread Tom Lane
Greg Copeland [EMAIL PROTECTED] writes:
 On Thu, 2003-01-30 at 16:39, Tom Lane wrote:
 In CVS tip, if you run make installcheck in src/pl/plpython, the test
 fails with a number of diffs between the expected and actual output.

 Could this have anything to do with the changes I made to the python
 stuff to get it to support longs (IIRC)?

The diffs seem to have more to do with error handling --- see attached.

None of the plpython files have changed since November, btw, so I would
imagine you'll see the same behavior in 7.3 or 7.3.1; but I haven't
rebuilt that branch to confirm it.

regards, tom lane


--- error.expected  2002-03-06 13:50:31.0 -0500
+++ error.output2003-01-30 17:18:23.0 -0500
@@ -1,12 +1,15 @@
 SELECT invalid_type_uncaught('rick');
-WARNING:  plpython: in function __plpython_procedure_invalid_type_uncaught_49801:
-plpy.SPIError: Cache lookup for type `test' failed.
+WARNING:  plpython: in function __plpython_procedure_invalid_type_uncaught_154373:
+plpy.SPIError: Unknown error in PLy_spi_prepare.
+ERROR:  Type test does not exist
 SELECT invalid_type_caught('rick');
-WARNING:  plpython: in function __plpython_procedure_invalid_type_caught_49802:
-plpy.SPIError: Cache lookup for type `test' failed.
+WARNING:  plpython: in function __plpython_procedure_invalid_type_caught_154374:
+plpy.SPIError: Unknown error in PLy_spi_prepare.
+ERROR:  Type test does not exist
 SELECT invalid_type_reraised('rick');
-WARNING:  plpython: in function __plpython_procedure_invalid_type_reraised_49803:
-plpy.SPIError: Cache lookup for type `test' failed.
+WARNING:  plpython: in function __plpython_procedure_invalid_type_reraised_154375:
+plpy.SPIError: Unknown error in PLy_spi_prepare.
+ERROR:  Type test does not exist
 SELECT valid_type('rick');
  valid_type 
 
@@ -14,20 +17,20 @@
 (1 row)
 
 SELECT read_file('/etc/passwd');
-ERROR:  plpython: Call of function `__plpython_procedure_read_file_49809' failed.
+ERROR:  plpython: Call of function `__plpython_procedure_read_file_154381' failed.
 exceptions.IOError: can't open files in restricted mode
 SELECT write_file('/tmp/plpython','This is very bad');
-ERROR:  plpython: Call of function `__plpython_procedure_write_file_49810' failed.
+ERROR:  plpython: Call of function `__plpython_procedure_write_file_154382' failed.
 exceptions.IOError: can't open files in restricted mode
 SELECT getpid();
-ERROR:  plpython: Call of function `__plpython_procedure_getpid_49811' failed.
-exceptions.AttributeError: getpid
+ERROR:  plpython: Call of function `__plpython_procedure_getpid_154383' failed.
+exceptions.AttributeError: 'module' object has no attribute 'getpid'
 SELECT uname();
-ERROR:  plpython: Call of function `__plpython_procedure_uname_49812' failed.
-exceptions.AttributeError: uname
+ERROR:  plpython: Call of function `__plpython_procedure_uname_154384' failed.
+exceptions.AttributeError: 'module' object has no attribute 'uname'
 SELECT sys_exit();
-ERROR:  plpython: Call of function `__plpython_procedure_sys_exit_49813' failed.
-exceptions.AttributeError: exit
+ERROR:  plpython: Call of function `__plpython_procedure_sys_exit_154385' failed.
+exceptions.AttributeError: 'module' object has no attribute 'exit'
 SELECT sys_argv();
 sys_argv
 


--- feature.expected2002-10-15 11:24:17.0 -0400
+++ feature.output  2003-01-30 17:18:23.0 -0500
@@ -36,9 +36,10 @@
 (1 row)
 
 SELECT import_succeed();
- import_succeed 
-
- succeeded, as expected
+NOTICE:  ('import failed -- No module named _sre',)
+ import_succeed 
+
+ failed, that wasn't supposed to happen
 (1 row)
 
 SELECT import_test_one('sha hash of this string');
@@ -56,9 +57,9 @@
 select argument_test_one(users, fname, lname) from users where lname = 'doe' order by 
1;
   argument_test_one  
 -
- jane doe = {'fname': 'jane', 'userid': 1, 'lname': 'doe', 'username': 'j_doe'}
- john doe = {'fname': 'john', 'userid': 2, 'lname': 'doe', 'username': 'johnd'}
- willem doe = {'fname': 'willem', 'userid': 3, 'lname': 'doe', 'username': 'w_doe'}
+ jane doe = {'lname': 'doe', 'username': 'j_doe', 'userid': 1, 'fname': 'jane'}
+ john doe = {'lname': 'doe', 'username': 'johnd', 'userid': 2, 'fname': 'john'}
+ willem doe = {'lname': 'doe', 'username': 'w_doe', 'userid': 3, 'fname': 'willem'}
 (3 rows)
 
 select nested_call_one('pass this along');

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html