Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

Support for ruby19 #1

Description

@unexist

plruby does not work with ruby19 (ruby 1.9.1p378) and just segfaults.

Steps to reproduce:

  1. create function foo() returns int as '1' language 'plruby';
    select foo();

  2. 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.

Activity

  1. tfoldi commented on Sep 20, 2010

    @tfoldi
    Contributor

    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

  2. tfoldi commented on Sep 20, 2010

    @tfoldi
    Contributor

    Hmm, and if reduce the safe level, it works perfectly

    template1=#  select foo();
     foo
    -----
       1
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions