postgresql-plruby
postgresql-plruby copied to clipboard
Support for ruby19
plruby does not work with ruby19 (ruby 1.9.1p378) and just segfaults.
Steps to reproduce:
-
create function foo() returns int as '1' language 'plruby'; select foo();
-
STATEMENT: drop function foo(int); (eval):1: [BUG] Segmentation fault ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
-- control frame ----------
c:0003 p:0021 s:0006 b:0006 l:0010ec d:000005 EVAL (eval):1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0010ec d:0010ec TOP
---------------------------
LOG: server process (PID 11159) was terminated by signal 11: Segmentation fault
LOG: terminating any other active server processes
I am currently investigating the code, apparently I have experience in embedding ruby but not with pg-pl stuff.
for me it gives:
template1=# create function foo() returns int as '1' language 'plruby';
CREATE FUNCTION
template1=# select foo();
ERROR: cannot create internal procedure (plruby.c:640)
DETAIL:
Insecure: can't define method
<<===def PLtemp.proc_84239(args)
1
end
===>>
could you send more info? ruby 1.9.2
Hmm, and if reduce the safe level, it works perfectly
template1=# select foo();
foo
-----
1