<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Schadenfreude &#187; centos</title>
	<atom:link href="http://www.ralree.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PL/Ruby on CentOS 5</title>
		<link>http://www.ralree.com/2007/08/01/pl-ruby-on-centos-5/</link>
		<comments>http://www.ralree.com/2007/08/01/pl-ruby-on-centos-5/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 20:24:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/pl-ruby-on-centos-5</guid>
		<description><![CDATA[I had some trouble compiling PL/Ruby for PostgreSQL today on Modzer0. I solved it with some clever extconf.rb switches: ruby extconf.rb --with-pgsql-include=/usr/include/pgsql/ --with-pgsql-version=81 Now I avoid the problems I was having before: [root@modzer0 plruby-0.5.1]# make make[1]: Entering directory #... In function ‘perm_fmgr_info’:plruby.c:116: error: ‘TopMemoryContext’ undeclared (first use in this function) plruby.c:116: error: (Each undeclared identifier is reported only once plruby.c:116: error: for each function it appears in.) plruby.c: In function ‘plruby_call_handler’: plruby.c:706: warning: unused variable ‘result’ plruby.c: In function ‘pl_compile’: [...]]]></description>
			<content:encoded><![CDATA[<p>I had some trouble compiling <a href="http://moulon.inra.fr/ruby/plruby.html">PL/Ruby</a> for PostgreSQL today on Modzer0.  I solved it with some clever <code>extconf.rb</code> switches:</p>
<pre><code>
ruby extconf.rb --with-pgsql-include=/usr/include/pgsql/ --with-pgsql-version=81
</code></pre>
<p>Now I avoid the problems I was having before:</p>
<pre><code>
[root@modzer0 plruby-0.5.1]# make
make[1]: Entering directory
#...
In function ‘perm_fmgr_info’:plruby.c:116: error: ‘TopMemoryContext’ undeclared (first use in this function)
plruby.c:116: error: (Each undeclared identifier is reported only once
plruby.c:116: error: for each function it appears in.)
plruby.c: In function ‘plruby_call_handler’:
plruby.c:706: warning: unused variable ‘result’
plruby.c: In function ‘pl_compile’:
plruby.c:875: error: subscripted value is neither array nor pointer
plruby.c:876: error: subscripted value is neither array nor pointer
plruby.c:879: error: subscripted value is neither array nor pointer
plruby.c:889: error: subscripted value is neither array nor pointer
plruby.c:937: error: ‘TopMemoryContext’ undeclared (first use in this function)
make[1]: *** [plruby.o] Error 1
</code></pre>
<p>Now I just have to create the language in Postgres.  I&#8217;m making it trusted since I don&#8217;t want anyone doing anything nasty.  I might build the untrusted version later like Robby did <a href="http://www.robbyonrails.com/articles/2005/08/22/installing-untrusted-pl-ruby-for-postgresql">here</a>.</p>
<pre><code>
CREATE FUNCTION plruby_call_handler() RETURNS language_handler
  AS '/usr/lib/ruby/site_ruby/1.8/i386-linux/plruby.so'
  LANGUAGE C;

CREATE TRUSTED LANGUAGE 'plruby'
  HANDLER plruby_call_handler
  LANCOMPILER 'PL/Ruby';
</code></pre>
<h2>Voila!</h2>
<pre><code>
Procedural Languages
  Name  | Trusted?
--------+----------
 plperl | yes
 plruby | yes
</code></pre>
<p><img src="http://ralree.info/assets/2007/8/1/o-face.jpg" alt="OH OH"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/08/01/pl-ruby-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

