title: PostgreSQL: PL/R does not work as expected
body: <p>Using <a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01" rel="nofollow noreferrer">this</a> tutorial of BostonGIS, I installed PL/R as an extension in my PostgreSQL 9.5 (x64) DB at Windows 7 Enterprise (x64) machine. After installation, I tested PL/R by running:</p>
  
  <pre><code>SELECT * FROM plr_environ();
  </code></pre>
  
  <p>and it returned environment information. Then, I ran:</p>
  
  <pre><code>SELECT load_r_typenames();
  </code></pre>
  
  <p>and the command took 5 minutes (and counting..) and never executed completely. I was unsure that  if something is messed up or how long this query should take. Thus, in another SQL editor, I tried following piece of code (source: <a href="http://www.irsae.no/courses-conferences-and-workshops/upcoming-courses/next-generation-data-management-in-movement-ecology-a-summer-school-at-fem/there-and-back-again-part-iii-extending-postgis-with-plr/" rel="nofollow noreferrer">here</a>):</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION plr_fn()
  RETURNS float8 AS
  $BODY$
    x &lt;- 10
    4/3*pi*x^3
  $BODY$
  LANGUAGE 'plr'
  </code></pre>
  
  <p>Then, I called this function using:</p>
  
  <pre><code>SELECT plr_fn();
  </code></pre>
  
  <p>Again, the query took forever and was never completed. I am bit puzzled that what went wrong in PL/R installation as I followed all steps and set the environment variables. Can someone help me to understand what is wrong with my PL/R installation?</p>