From: ts Date: 2000-04-17T12:37:41+02:00 Subject: [ruby-talk:02494] ANNOUNCE : PL/Ruby source : ftp://moulon.inra.fr/pub/ruby/plruby-0.1.tar.gz documentation : http://moulon.inra.fr/ruby/plruby.html Its real name is plruby! because it must be run with $SAFE >= 4. The default value (for $SAFE) can be changed only at compile time, but don't try to compile it with $SAFE < 4, because it run under the uid of postgres. The file README.en contain ============================================================ PL/Ruby is a loadable procedural language for the Postgres database system that enable the Ruby language to create functions and trigger procedures * Prerequisite ruby >= 1.4.4 source of postgresql (for some include files) * Installation ruby extconf.rb make make install You may need to specify : --with-pgsql-include-dir= --with-pgsql-lib-dir= --with-pgsql-srcinc-dir= pgsql-srcinc-dir must contains, for example, the file catalog/pg_proc.h Example : ruby extconf.rb --with-pgsql-include-dir=/usr/include/postgresql \ --with-pgsql-lib-dir=/usr/lib \ --with-pgsql-srcinc-dir=/var/postgres/postgresl-6.5/src/include * Test (and examples) make test this will run the 2 commands : ( cd test/plt; ./runtest ) ( cd test/plp; ./runtest ) The database plruby_test is created and then destroyed. Don't use it if such a database exist on your system. * Now create the PL/Ruby language in PostgreSQL Since the pg_language system catalog is private to each database, the new language can be created only for individual databases, or in the template1 database. In the latter case, it is automatically available in all newly created databases. The commands to create the new language are: create function plruby_call_handler () returns opaque as 'path-to-plruby-shared-lib' language 'C'; create trusted procedural language 'plruby' handler plruby_call_handler lancompiler 'PL/Ruby'; The trusted keyword on create procedural language tells PostgreSQL, that all users (not only those with superuser privilege) are permitted to create functions with LANGUAGE 'plruby'. This is absolutely safe, because there is nothing a normal user can do with PL/Ruby, to get around access restrictions he/she has. * Documentation : see plruby.rd and plruby.html * Copying This extension module is copyrighted free software by Guy Decoux You can redistribute it and/or modify it under the same term as Ruby. Guy Decoux ============================================================ Guy Decoux