<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Postgres OnLine Journal - pl programming</title>
    <link>http://www.postgresonline.com/journal/</link>
    <description>an In depth look at the PostgreSQL open source database</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Sun, 08 Jan 2012 18:35:09 GMT</pubDate>

    <image>
        <url>http://www.postgresonline.com/journal/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Postgres OnLine Journal - pl programming - an In depth look at the PostgreSQL open source database</title>
        <link>http://www.postgresonline.com/journal/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>The wonders of Any Element</title>
    <link>http://www.postgresonline.com/journal/archives/239-The-wonders-of-Any-Element.html</link>
            <category>8.4</category>
            <category>9.0</category>
            <category>9.1</category>
            <category>pl programming</category>
            <category>sql functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/239-The-wonders-of-Any-Element.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=239</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=239</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PostgreSQL has this interesting placeholder called &lt;em&gt;anyelement&lt;/em&gt; which it has had for a long time and its complement &lt;em&gt;anyarray&lt;/em&gt;.  They are used when you want to define a function that can handle many types arguments or can output many types of outputs.  They are particularly useful for defining aggregates, which we demonstrated in
&lt;a href=&quot;http://www.postgresonline.com/journal/archives/68-More-Aggregate-Fun-Whos-on-First-and-Whos-on-Last.html&quot; target=&quot;_blank&quot;&gt;Who&#039;s on First and Who&#039;s on Last&lt;/a&gt; and several other aggregate articles.&lt;/p&gt;
&lt;p&gt;Anyelement / anyarray can be used just as conveniently in other functions. The main gotcha is that when you pass in the first anyelement/anyarray all subsequent anyelement / anyarray must match the same data type as the first anyelement / anyarray. &lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/239-The-wonders-of-Any-Element.html#extended&quot;&gt;Continue reading &quot;The wonders of Any Element&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 08 Jan 2012 13:30:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/239-guid.html</guid>
    <category>anyelement</category>

</item>
<item>
    <title>SQL Server to PostgreSQL: Converting table structure</title>
    <link>http://www.postgresonline.com/journal/archives/219-SQL-Server-to-PostgreSQL-Converting-table-structure.html</link>
            <category>basics</category>
            <category>beginner</category>
            <category>oracle</category>
            <category>plpgsql</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/219-SQL-Server-to-PostgreSQL-Converting-table-structure.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=219</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=219</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;We&#039;ve been working on converting some of our SQL Server apps to PostgreSQL.   In this
article we&#039;ll describe some things to watch out for and provide a function we wrote to automate some of
the conversion.&lt;/p&gt;

&lt;p&gt;Although both databases are fairly ANSI-SQL compliant, there are still differences 
with their CREATE TABLE statements, data types, and how they handle other things that makes porting applications not so trivial. &lt;/p&gt;
&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/219-SQL-Server-to-PostgreSQL-Converting-table-structure.html#extended&quot;&gt;Continue reading &quot;SQL Server to PostgreSQL: Converting table structure&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 04 Sep 2011 00:33:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/219-guid.html</guid>
    <category>migration</category>
<category>oracle</category>
<category>regular expressions</category>
<category>sql server</category>

</item>
<item>
    <title>Using PgAdmin PLPgSQL Debugger</title>
    <link>http://www.postgresonline.com/journal/archives/214-Using-PgAdmin-PLPgSQL-Debugger.html</link>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>9.1</category>
            <category>basics</category>
            <category>gis</category>
            <category>intermediate</category>
            <category>pgadmin</category>
            <category>plpgsql</category>
    
    <comments>http://www.postgresonline.com/journal/archives/214-Using-PgAdmin-PLPgSQL-Debugger.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=214</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=214</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;I&#039;m one of those old-fashioned folks that debugs with print lines and raise notices.  They&#039;re nice.
They always work, you can put clock time stops in there and don&#039;t require any fancy configuration.  
At a certain point you do have to pull out a real debugger to see what is going on.  This often
happens when your one-liners are no longer good enough and now you have to write 20 liners of plpgsql code.&lt;/p&gt;

&lt;p&gt;Such is the case with geocoding and the &lt;a href=&quot;http://www.postgis.org/documentation/manual-svn/Extras.html#Tiger_Geocoder&quot; target=&quot;_blank&quot;&gt;PostGIS tiger geocoder&lt;/a&gt; specifically.  Lots of interest has revived
on that with people submitting bug reports and we&#039;ve got paying clients in need of a fairly easy and speedy drop-in geocoder
that can be molded to handle such things as road way locations, badly mis-spelled real estate data, or just simply
to get rid of their dependency on Google, Yahoo, MapQuest, ESRI and other online or pricey geocoding tools.
So I thought I&#039;d take this opportunity to supplement our old-fashioned debugging with plpgsqldebugger goodness.
In this article, we&#039;ll show you how to configure the plpgsql debugger integrated in PgAdmin and run with it.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/214-Using-PgAdmin-PLPgSQL-Debugger.html#extended&quot;&gt;Continue reading &quot;Using PgAdmin PLPgSQL Debugger&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 27 Jun 2011 01:49:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/214-guid.html</guid>
    <category>debugging</category>
<category>pgadmin</category>

</item>
<item>
    <title>Variadic Functions in PostgreSQL</title>
    <link>http://www.postgresonline.com/journal/archives/211-Variadic-Functions-in-PostgreSQL.html</link>
            <category>8.4</category>
            <category>gis</category>
            <category>intermediate</category>
            <category>mysql</category>
            <category>pl programming</category>
            <category>plpgsql</category>
            <category>postgis</category>
            <category>postgresql versions</category>
            <category>sql functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/211-Variadic-Functions-in-PostgreSQL.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=211</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=211</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PostgreSQL 8.4 introduced the ability to create user-defined &lt;a href=&quot;http://en.wikipedia.org/wiki/Variadic_function&quot; target=&quot;_blank&quot;&gt;variadic functions&lt;/a&gt;. These are basically 
functions that take as input an undefined number of arguments where the argument that is an undefined number are all of the same type and are the last input arguments. Depesz went over it two years ago in &lt;a href=&quot;http://www.depesz.com/index.php/2008/07/31/waiting-for-84-variadic-functions/&quot; target=&quot;_blank&quot;&gt;Waiting for 8.4 variadic functions&lt;/a&gt;,
so we are a bit late to the party. In a nutshell -- variadic functions are syntactic sugar for functions that would otherwise take arrays. In this article we&#039;ll provide some more demonstrations of them to supplement Depesz article.&lt;/p&gt;

&lt;p&gt;I was reminded that I had never explored this feature, when recently documenting one of the
new PostGIS 2.0 Raster functions - &lt;a href=&quot;http://www.postgis.org/documentation/manual-svn/RT_ST_Reclass.html&quot; target=&quot;_blank&quot;&gt;ST_Reclass&lt;/a&gt; which employs this feature. 
I think ST_Reclass is a superb function and one of my favorite raster functions thus far that I hope to put to good use soon.  Our new PostGIS family member,Bborie Park, is running thru our
PostGIS Raster milestones much faster than I had dreamed. He&#039;s already implemented a good chunk of stuff we discussed in &lt;a href=&quot;http://www.postgis.us/chapter_13&quot; target=&quot;_blank&quot;&gt;Chapter 13 - PostGIS Raster&lt;/a&gt; and had stated you probably won&#039;t see in PostGIS 2.0.  He&#039;s
going a bit faster than I can catalog them, so the documentation is already embarrassingly behind the fantastic functionality that is already present in PostGIS 2.0.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/211-Variadic-Functions-in-PostgreSQL.html#extended&quot;&gt;Continue reading &quot;Variadic Functions in PostgreSQL&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 03 Jun 2011 22:02:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/211-guid.html</guid>
    <category>mysql</category>
<category>postgis</category>
<category>postgresql 8.4</category>
<category>raster</category>
<category>string concatenation</category>

</item>
<item>
    <title>Using RETURNS TABLE vs. OUT parameters</title>
    <link>http://www.postgresonline.com/journal/archives/201-Using-RETURNS-TABLE-vs.-OUT-parameters.html</link>
            <category>8.4</category>
            <category>9.0</category>
            <category>db2</category>
            <category>intermediate</category>
            <category>pl programming</category>
            <category>plpgsql</category>
            <category>postgresql versions</category>
            <category>sql functions</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/201-Using-RETURNS-TABLE-vs.-OUT-parameters.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=201</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=201</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In a prior article &lt;a href=&quot;http://www.postgresonline.com/journal/archives/129-Use-of-OUT-and-INOUT-Parameters.html&quot; target=&quot;_blank&quot;&gt;Use of Out and InOut Parameters&lt;/a&gt;
we demonstrated how to use OUT parameters and INOUT parameters to return a set of records from a PostgreSQL function.
There is another approach to doing this, and that is to use the ANSI Standard RETURNS TABLE construct.  
If you come from a SQL Server or IBM DB2 background, the RETURNS TABLE construct is probably most familiar, but still
how you use it and what is legal in it is a little different than it is in SQL Server or IBM DB2.  We&#039;ll save the
contrast compare as a topic for another article.  &lt;/p&gt;

&lt;p&gt;In terms of performance between using OUT vs. RETURNS TABLE, we haven&#039;t noticed much of a difference. The main thing that is 
nice about RETURNS TABLE is just that it&#039;s syntactically more pleasing in the sense that its clearer the structure of what you are returning.&lt;/p&gt;

&lt;p&gt;In these next examples, we&#039;ll demonstrate similar examples we showed in the aforementioned article except using the 
&lt;code&gt;RETURNS TABLE&lt;/code&gt;.  
Be warned that the &lt;code&gt;RETURNS TABLE&lt;/code&gt; construct is only available for PostgreSQL 8.4+, while the OUT approach
has existed since PostgreSQL 8.1. With that said, if you need your code to work on 8.3 or lower, you can&#039;t use RETURNS TABLE.
When in doubt about a feature and you are creating code that needs to support earlier versions of PostgreSQL
(as we have to in the PostGIS development group),
or you want to get stubborn users off old antiquated versions of PostgreSQL and need a bit of ammunition  
(as we have to (on PostGIS development including our own developers - and you know who you are :) ) )
check the
&lt;a href=&quot;http://www.postgresql.org/about/featurematrix&quot; target=&quot;_blank&quot;&gt;PostgreSQL feature matrix&lt;/a&gt;.  
It will save you a lot of grief.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/201-Using-RETURNS-TABLE-vs.-OUT-parameters.html#extended&quot;&gt;Continue reading &quot;Using RETURNS TABLE vs. OUT parameters&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 08 Apr 2011 02:32:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/201-guid.html</guid>
    <category>ibm db2</category>
<category>postgresql 9.0</category>
<category>sql server</category>

</item>
<item>
    <title>PostGIS in Action - E-Book final version officially out</title>
    <link>http://www.postgresonline.com/journal/archives/200-PostGIS-in-Action-E-Book-final-version-officially-out.html</link>
            <category>8.4</category>
            <category>9.0</category>
            <category>9.1</category>
            <category>cte</category>
            <category>db2</category>
            <category>editor note</category>
            <category>firebird</category>
            <category>gis</category>
            <category>oracle</category>
            <category>postgis</category>
            <category>sql functions</category>
            <category>sql server</category>
            <category>window functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/200-PostGIS-in-Action-E-Book-final-version-officially-out.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=200</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=200</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;I am happy to report, that the final proof of the PostGIS in Action E-Book got released today 
and the printed version is scheduled for release Aprill 11th, 2011 and should be available on Amazon and other locations around then. The other e-Reader formats will come after that.
You can &lt;a href=&quot;http://affiliate.manning.com/idevaffiliate.php?id=1134_177&quot; target=&quot;_blank&quot;&gt;buy from here or download the two free chapters&lt;/a&gt;, if you haven&#039;t already.&lt;/p&gt;

&lt;p&gt;Each hard-copy purchase comes with a free E-Book version.  There is a coupon in the back of the book when you get it to get the E-Book versions.&lt;/p&gt;

&lt;p&gt;Yes, I know it&#039;s been a really really long time.
On the bright side, we produced twice as much content as we had set out to do and that was with keeping things as concise as we
could get away with, still managing to cover more than we set out to cover, and stripping out as many unnecessary words as we could muster. 
So 520 pages and almost 2 years later, this is where we are.  &lt;/p&gt;
&lt;p&gt;A good chunk of the additional bulk of the book was the appendices which are about 150 pages
total and focus strictly on PostgreSQL and SQL.  After many comments from early reviewers, we thought it unfair not to have a good chunk of PostgreSQL
and just general relational database content to familiarize programmers and GIS folks with the RDBMS that PostGIS lives in.  Most GIS folk unfortunately
have the hardest time with getting up to speed with SQL and just standard RDBMS management.&lt;/p&gt;

&lt;h4&gt;Two free chapters and accompanying code for all chapters&lt;/h4&gt;
&lt;p&gt;The two free chapters we selectively picked because we thought they would be most beneficial to newcomers and people new to relational databases.
So the free chapters are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://affiliate.manning.com/idevaffiliate.php?id=1134_177&quot; target=&quot;_blank&quot;&gt;Chapter 1: What is a spatial database?&lt;/a&gt;  Which provides a fast paced history of PostGIS, PostgreSQL, Spatial Databases and moves into 
		an even faster journey into converting flat file restaurant locations to spatial point geometries, loading in an ESRI shapefile of roads.  Then shows you how to write standard
		spatial queries and render the results.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://affiliate.manning.com/idevaffiliate.php?id=1134_177&quot; target=&quot;_blank&quot;&gt;Appendix C: SQL Primer&lt;/a&gt; -- goes through querying information_schemas, the common points of writing SELECT, INSERT, UPDATE, DELETE SQL statements and the finer points of using aggregate functions, Windowing constructs and common table expressions as well
	as a brief overview of how PostgreSQL stacks up with other relational databases (SQL Server, Oracle, IBM DB2, MySQL, Firebird) in SQL features.&lt;/li&gt;
	&lt;li&gt;All the chapter code and accompanying data.  It&#039;s a bit hefty at 57 MB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So even if you don&#039;t buy our book, we hope you find the free chapters useful.&lt;/p&gt;
&lt;p&gt;You can get a more detailed listing of all the chapters from the &lt;a href=&quot;http://www.postgis.us&quot; target=&quot;_blank&quot;&gt;PostGIS in Action book site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We&#039;d like to thank all those who supported us through this long and unpredictable journey.  Hopefully we&#039;ll have several more, though hopefully 
a bit less nerve-racking than this first one.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 30 Mar 2011 12:28:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/200-guid.html</guid>
    
</item>
<item>
    <title>PL/R Part 3: Sharing Functions across PL/R functions with plr_module</title>
    <link>http://www.postgresonline.com/journal/archives/190-PLR-Part-3-Sharing-Functions-across-PLR-functions-with-plr_module.html</link>
            <category>8.4</category>
            <category>9.0</category>
            <category>9.1</category>
            <category>intermediate</category>
            <category>pl programming</category>
            <category>PLR</category>
    
    <comments>http://www.postgresonline.com/journal/archives/190-PLR-Part-3-Sharing-Functions-across-PLR-functions-with-plr_module.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=190</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=190</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In &lt;a href=&quot;http://www.postgresonline.com/journal/archives/189-plr_part2.html&quot; target=&quot;_blank&quot;&gt;Part 2 of PL/R&lt;/a&gt; we covered how to build PL/R functions that take arrays and output textual outputs of generated R objects.  We then used this in an aggregate SQL query using array_agg. Often when you are building PL/R functions
you&#039;ll have R functions that you want to reuse many times either inside a single PL/R function or across various PL/R functions. &lt;/p&gt;

&lt;p&gt;Unfortunately, if you wanted to call a PL/R function from another PL/R function, this is not possible unless you are doing it from spi.execute call. 
There is another way to embed reusable R code in a PostgreSQL database.
In order to be able to share databases stored R code across various PL/R functions, PL/R has a feature called a plr_module.  In this tutorial
we&#039;ll learn how to create and register shareable R functions with plr_module. In the next part of this series we&#039;ll start to explore generating graphs with PL/R.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/190-PLR-Part-3-Sharing-Functions-across-PLR-functions-with-plr_module.html#extended&quot;&gt;Continue reading &quot;PL/R Part 3: Sharing Functions across PL/R functions with plr_module&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 20 Dec 2010 13:37:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/190-guid.html</guid>
    <category>plr</category>
<category>postgis</category>
<category>r</category>

</item>
<item>
    <title>PL/R Part 2: Functions that take arguments and the power of aggregation</title>
    <link>http://www.postgresonline.com/journal/archives/189-PLR-Part-2-Functions-that-take-arguments-and-the-power-of-aggregation.html</link>
            <category>8.4</category>
            <category>9.0</category>
            <category>9.1</category>
            <category>intermediate</category>
            <category>pl programming</category>
            <category>PLR</category>
    
    <comments>http://www.postgresonline.com/journal/archives/189-PLR-Part-2-Functions-that-take-arguments-and-the-power-of-aggregation.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=189</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=189</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In &lt;a href=&quot;http://www.postgresonline.com/journal/archives/188-plr_part1.html&quot; target=&quot;_blank&quot;&gt;Intro to PL/R and R&lt;/a&gt;, we covered how to enable PL/R language in the database and wrote some PL/R functions
that rendered plain text reports using the R environment.  What makes combining R and PostgreSQL in
PL/R most powerful is when you can start writing SQL summary queries that use R functions like any other SQL function. &lt;/p&gt;

&lt;p&gt;In this next example, we&#039;ll be using PostGIS test runs from tests we autogenerated from the &lt;a href=&quot;http://www.postgis.org/documentation/manual-svn/&quot; target=&quot;_blank&quot;&gt;Official PostGIS documentation&lt;/a&gt; (Documentation Driven Testing (DDT))
as described in the  &lt;a href=&quot;http://trac.osgeo.org/postgis/wiki/DevWikiGardenTest&quot; target=&quot;_blank&quot;&gt;Garden Test&lt;/a&gt; section of the PostGIS Developer wiki.  
We&#039;ve also updated some of our logging generator and test patterns so future results may not represent what we demonstrated in the last article. &lt;/p&gt;
&lt;p&gt;On a side note: Among the changes in the tests was to introduce more variants of the &lt;a href=&quot;http://www.postgis.org/pipermail/postgis-devel/2010-December/010776.html&quot; target=&quot;_balnk&quot;&gt;Empty Geometry now supported by PostGIS 2.0&lt;/a&gt;.  
Our beloved PostGIS 2.0 trunk is at the moment somewhat unstable when working with these new forms of emptiness and stuffing geometries in inappropriate places. At the moment it doesn&#039;t survive through  the mindless machine gun battery of tests we have mercilessly inflicted.
It&#039;s been great fun trying to build a better dummy while watching &lt;a href=&quot;http://blog.cleverelephant.ca/&quot; target=&quot;_blank&quot;&gt;Paul&lt;/a&gt; run around patching holes to make the software more dummy proof as the dummy stumbles across questionable but amusing PostGIS use cases not gracefully handled by his new serialization and empty logic. &lt;/p&gt;

&lt;p&gt;On yet another side note, it&#039;s nice to 
see that others are doing similar wonderful things with documentation.  Check out &lt;a href=&quot;http://eulerto.blogspot.com/2010/11/comment-on-catalog-tables.html&quot; target=&quot;_blank&quot;&gt;Euler&#039;s comment on catalog tables&lt;/a&gt;
where he uses the PostgreSQL SGML documentation to autogenerate PostgreSQL catalog table comments using &lt;a href=&quot;http://openjade.sourceforge.net/doc/sx.htm&quot; target-&quot;_blank&quot;&gt;OpenJade&#039;s OSX to convert the SGML to XML&lt;/a&gt; and then XSL similar to what we did with PostGIS documentation to autogenerate PostGIS function/type comments and as a platform
for our test generator.  &lt;/p&gt;

&lt;p&gt;For our next exercises we&#039;ll be using the power of aggregation to push data into R instead of &lt;b&gt;pg.spi.execute&lt;/b&gt;. This will make our functions far more reusable and versatile.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/189-PLR-Part-2-Functions-that-take-arguments-and-the-power-of-aggregation.html#extended&quot;&gt;Continue reading &quot;PL/R Part 2: Functions that take arguments and the power of aggregation&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 10 Dec 2010 01:38:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/189-guid.html</guid>
    <category>plr</category>
<category>postgis</category>
<category>r</category>

</item>
<item>
    <title>Quick Intro to R and PL/R - Part 1</title>
    <link>http://www.postgresonline.com/journal/archives/188-Quick-Intro-to-R-and-PLR-Part-1.html</link>
            <category>9.0</category>
            <category>gis</category>
            <category>intermediate</category>
            <category>pl programming</category>
            <category>PLR</category>
    
    <comments>http://www.postgresonline.com/journal/archives/188-Quick-Intro-to-R-and-PLR-Part-1.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=188</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=188</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In this article we&#039;ll provide a summary of what PL/R is and how to get running with it.  Since we don&#039;t like repeating ourselves,
we&#039;ll refer you to an article we wrote a while ago which is still fairly relevant today called &lt;a href=&quot;http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01&quot; target=&quot;_blank&quot;&gt;Up and Running with PL/R (PLR) in PostgreSQL: An almost Idiot&#039;s Guide&lt;/a&gt;
and just fill in the parts that have changed.  We should note that particular series was more geared toward the spatial database programmer (PostGIS in particular).  There is a lot of overlap between the PL/R, R, and PostGIS user-base which is comprised
of many environmental scientists and researchers in need of powerful charting and stats tools to analyse their data who are high on the smart but low on the money human spectrum. &lt;/p&gt;
&lt;p&gt;This series will be more of a general PL/R user perspective.  We&#039;ll follow more of the same style we did with &lt;a href=&quot;http://www.postgresonline.com/journal/archives/99-Quick-Intro-to-PLPython.html&quot; target=&quot;_blank&quot;&gt;Quick Intro to PL/Python&lt;/a&gt;. We&#039;ll end our series with a PL/R cheatsheet similar to what we had for PL/Python.&lt;/p&gt;
&lt;p&gt;As stated in our &lt;a href=&quot;http://www.postgresonline.com/journal/archives/187-postgis20_state_plr.html&quot; target=&quot;_blank&quot;&gt;State of PostGIS&lt;/a&gt; article, we&#039;ll be using log files we generated from our PostGIS stress tests.  These stress tests were auto-generated from the PostGIS official documentation.  
The raster tests are comprised of 2,095 query executions exercising all the pixel types supported.  The geometry/geograpy tests are comprised of 65,892 spatial SQL queries exercising every PostGIS geometry/geography supported in PostGIS 2.0 -- yes this includes TINS, Triangles,Polyhedral Surfaces, Curved geometries and all dimensions of them.
Most queries are unique. If you are curious to see what these log tables look like or want to follow along with these exercises, you can download the tables from &lt;a href=&quot;/demos/plr/postgis20gardentests.zip&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;What is R and PL/R and why should you care?&lt;/h4&gt;
&lt;p&gt;R is both a language and an environment for doing statistics and generating graphs and plots.  It is GNU-licensed and a common favorite of Universities and Research institutions. PL/R is a procedural language for PostgreSQL that allows you to write database stored functions
in R.  R is a set-based and domain specific language similar to SQL except unlike the way relational databases treat data, it thinks of data as matrices, lists and vectors.  I tend to think of it as a cross between LISP and SQL though more experienced Lisp and R users will probably disagree with me on that.  This makes it easier in many cases to tabulate data both across columns as well as across rows.
The examples we will show in these exercises, could be done in SQL, but they are much more succinct to write in R.  In addition to the language itself, there are a whole wealth of statistical and graphing functions available in R that you will not 
find in any relational database.  These functions are growing as more people contribute packages.  Its packaging system called Comprehensive R Archive (CRAN) is similar in concept to Perl&#039;s CPAN and the in the works &lt;a href=&quot;http://blog.pgxn.org/&quot; target=&quot;_blank&quot;&gt;PGXN for PostgreSQL&lt;/a&gt;.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/188-Quick-Intro-to-R-and-PLR-Part-1.html#extended&quot;&gt;Continue reading &quot;Quick Intro to R and PL/R - Part 1&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 28 Nov 2010 14:19:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/188-guid.html</guid>
    <category>plr</category>
<category>postgis</category>
<category>r</category>

</item>
<item>
    <title>The State of PostGIS, Joys of Testing, and PLR the Prequel</title>
    <link>http://www.postgresonline.com/journal/archives/187-The-State-of-PostGIS,-Joys-of-Testing,-and-PLR-the-Prequel.html</link>
            <category>9.0</category>
            <category>editor note</category>
            <category>gis</category>
            <category>PLR</category>
            <category>postgis</category>
    
    <comments>http://www.postgresonline.com/journal/archives/187-The-State-of-PostGIS,-Joys-of-Testing,-and-PLR-the-Prequel.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=187</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=187</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve always enjoyed dismantling things.  Deconstruction was a good way of analyzing how things were built by cataloging all the ways
I could dismantle or destroy them.  I experimented with mechanical systems, electrical circuitry, chemicals and biological systems sometimes coming close to bodily harm. In later years I decided to play it safe and just stick with programming and computer simulation 
as a convenient channel to enjoy my destructive pursuits.
 Now getting to the point of this article.&lt;/p&gt;
&lt;p&gt;In later articles, I&#039;ll start to demonstrate the use of &lt;a href=&quot;http://www.joeconway.com/plr/&quot; target=&quot;_blank&quot;&gt;PL/R&lt;/a&gt;, the procedural language for PostgreSQL that allows you to program functions in the statistical language and Environment R.  To 
make these examples more useful, I&#039;ll be analyzing data generated from PostGIS tests I&#039;ve been working on for stress testing the upcoming PostGIS 2.0. PostGIS 2.0 is a major
and probably the most exciting release for us.  &lt;a href=&quot;http://blog.cleverelephant.ca&quot; target=&quot;_blank&quot;&gt;Paul Ramsey&lt;/a&gt; did a summary talk recently of Past, Present, Future of PostGIS at &lt;a href=&quot;http://www.ustream.tv/recorded/10667125&quot; target=&quot;_blank&quot;&gt;State of PostGIS FOSS4G Japan http://www.ustream.tv/recorded/10667125&lt;/a&gt;
which provides a brief glimpse of what&#039;s in store in 2.0.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/187-The-State-of-PostGIS,-Joys-of-Testing,-and-PLR-the-Prequel.html#extended&quot;&gt;Continue reading &quot;The State of PostGIS, Joys of Testing, and PLR the Prequel&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 23 Nov 2010 18:22:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/187-guid.html</guid>
    <category>plr</category>
<category>postgis</category>

</item>
<item>
    <title>STRICT on SQL Function Breaks In-lining Gotcha</title>
    <link>http://www.postgresonline.com/journal/archives/163-STRICT-on-SQL-Function-Breaks-In-lining-Gotcha.html</link>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>basics</category>
            <category>intermediate</category>
            <category>mysql</category>
            <category>oracle</category>
            <category>postgis</category>
            <category>postgresql versions</category>
            <category>sql functions</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/163-STRICT-on-SQL-Function-Breaks-In-lining-Gotcha.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=163</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=163</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;One of the coolest features of PostgreSQL is the ability to write functions using plain old
SQL.  This feature it has had for a long time.  Even before PostgreSQL 8.2. No other database to our knowledge has this feature.  By SQL we mean sans procedural mumbo jumbo like
loops and what not.  This is cool for two reasons:&lt;/p&gt;

&lt;UL&gt;
	&lt;LI&gt;Plain old SQL is the simplest to write and most anyone can write one and is just what the doctor ordered in many cases. PostgreSQL even allows you to write
		aggregate functions with plain old SQL. Try to write an &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms131056(v=SQL.105).aspx&quot; target=&quot;_blank&quot;&gt;aggregate function in SQL Server&lt;/a&gt;
		you&#039;ve got to pull out your Visual Studio this and that and do some compiling and loading and you better know C# or VB.NET.  Try in &lt;a href=&quot;http://www.codeproject.com/KB/database/MySQL_UDFs.aspx&quot; target=&quot;_blank&quot;&gt;MySQL and you better learn C&lt;/a&gt;.
			Do the same in PostgreSQL (you have a large choice of languages &lt;a href=&quot;http://www.postgresonline.com/journal/archives/68-More-Aggregate-Fun-Whos-on-First-and-Whos-on-Last.html&quot; target=&quot;_blank&quot;&gt;including SQL&lt;/a&gt;) and the code is simple to write.  Nevermind
			with MySQL and SQL Server, you aren&#039;t even allowed to do those type of things on a shared server or a server where the IT department is paranoid.  The closest 
				with this much ease would be  &lt;a href=&quot;http://www.oracle.com/technology/oramag/oracle/06-jul/o46sql.html&quot; target=&quot;_blank&quot;&gt;Oracle, which is unnecessarily verbose&lt;/a&gt;. &lt;/LI&gt;
	&lt;LI&gt;Most importantly -- since it is just SQL, for simple user-defined functions, a PostgreSQL sql function can often be in-lined into the overall query plan since
		it only uses what is legal in plain old SQL.&lt;/LI&gt;
&lt;/UL&gt;

&lt;p&gt;This inlining feature is part of the secret sauce that makes PostGIS fast and easy to use.
So instead of writing geom1 &amp;&amp;amp; geom2 AND Intersects(geom1,geom2)  -- a user can write
ST_Intersects(geom1,geom2) .  The short-hand is even more striking when you think of the ST_DWithin function.
&lt;/p&gt;

&lt;p&gt;With an inlined function, the planner has visibility into the function and breaks apart the 
spatial index short-circuit test &amp;amp;&amp;amp;  from the more exhaustive absolute test Intersects(geom1,geom2)
and has great flexibility in reordering the clauses in the plan.
&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/163-STRICT-on-SQL-Function-Breaks-In-lining-Gotcha.html#extended&quot;&gt;Continue reading &quot;STRICT on SQL Function Breaks In-lining Gotcha&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 02 Jun 2010 05:06:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/163-guid.html</guid>
    
</item>
<item>
    <title>Output parameters, custom data type gotchas</title>
    <link>http://www.postgresonline.com/journal/archives/160-Output-parameters,-custom-data-type-gotchas.html</link>
            <category>8.4</category>
            <category>pl programming</category>
            <category>postgis</category>
            <category>sql functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/160-Output-parameters,-custom-data-type-gotchas.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=160</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=160</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Pierre Racine has been diligently  working on &lt;a href=&quot;http://trac.osgeo.org/postgis/wiki/WKTRaster&quot; target=&quot;_blank&quot;&gt;PostGIS WKT Raster&lt;/a&gt; development. He was recently creating an sql function that 
uses &lt;a href=&quot;http://www.postgresonline.com/journal/archives/129-Use-of-OUT-and-INOUT-Parameters.html&quot; target=&quot;_blank&quot;&gt;output parameters&lt;/a&gt;.
That was all nice and well, except he couldn&#039;t figure out how to output the output parameters as columns.&lt;/p&gt;

&lt;p&gt;The function looked something like this: &lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
CREATE FUNCTION somefunction(rast raster, OUT field1 integer, OUT field2 sometype, etc.) AS
	$$ blah blah blah $$
LANGUAGE &#039;sql&#039;;
&lt;/code&gt;
&lt;/pre&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/160-Output-parameters,-custom-data-type-gotchas.html#extended&quot;&gt;Continue reading &quot;Output parameters, custom data type gotchas&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 17 May 2010 16:22:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/160-guid.html</guid>
    
</item>
<item>
    <title>PostGIS 1.5.0 out and PLR working on Windows 8.3-8.4 installs</title>
    <link>http://www.postgresonline.com/journal/archives/151-PostGIS-1.5.0-out-and-PLR-working-on-Windows-8.3-8.4-installs.html</link>
            <category>8.3</category>
            <category>8.4</category>
            <category>pl programming</category>
            <category>PLR</category>
            <category>postgis</category>
    
    <comments>http://www.postgresonline.com/journal/archives/151-PostGIS-1.5.0-out-and-PLR-working-on-Windows-8.3-8.4-installs.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=151</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=151</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;h4&gt;PostGIS 1.5.0 is finally out&lt;/h4&gt;
&lt;p&gt;I&#039;m happy to report that after a long haul, we have finally released PostGIS 1.5.0. 
Two months late, but there it is, and its a really great release I think;  Perhaps the best release ever.
&lt;/p&gt;
&lt;p&gt;Details on what makes this release so special.  &lt;a href=&quot;http://blog.opengeo.org/2010/02/05/postgis-1-5/&quot; target=&quot;_blank&quot;&gt;The geodetic support&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Summary excerpted from &lt;a href=&quot;http://www.postgis.org/pipermail/postgis-devel/2010-February/008611.html&quot; target=&quot;_blank&quot;&gt;Paul&#039;s slightly premature announcement&lt;/a&gt;
&lt;pre style=&quot;font-size:small&quot;&gt;
February 4, 2010

The PostGIS development team has, after a long course of reflection
and a detailed self-examination of our various personal failings,
decided to release PostGIS 1.5.0 to the public.

  &lt;a href=&quot;http://postgis.org/download/postgis-1.5.0.tar.gz&quot;&gt;http://postgis.org/download/postgis-1.5.0.tar.gz&lt;/a&gt;

This new version of PostGIS includes a new &quot;geography&quot; type for
managing geodetic (lat/lon) data, performance-enhanced distance
calculations, GML and KML format readers, an improved shape loading
GUI, and other new features as well.

Especial thanks to:

* Dave Skea for algorithms and mathematics necessary to support
spherical geometry
* Nicklas Avén for the new performance enhanced distance calculations
and other distance-related functions
* Sandro Santilli for new buffering features (end caps and style options)
* Olivier Courtin for GML/KML input functions
* Guillaume Lelarge for support for the upcoming PgSQL 9.0
* George Silva for an example implementation of history tables
* Vincent Picavet for Hausdorff distance calculations
* The maintainers of GEOS, Proj4, and LibXML, without whom we would
have less of a spatial database

Love, the PostGIS project steering committee,

Mark Cave-Ayland
Kevin Neufeld
Regina Obe
Paul Ramsey
&lt;/pre&gt;
&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/151-PostGIS-1.5.0-out-and-PLR-working-on-Windows-8.3-8.4-installs.html#extended&quot;&gt;Continue reading &quot;PostGIS 1.5.0 out and PLR working on Windows 8.3-8.4 installs&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 07 Feb 2010 00:58:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/151-guid.html</guid>
    
</item>
<item>
    <title>Use of OUT and INOUT Parameters</title>
    <link>http://www.postgresonline.com/journal/archives/129-Use-of-OUT-and-INOUT-Parameters.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>intermediate</category>
            <category>pl programming</category>
            <category>plpgsql</category>
            <category>postgresql versions</category>
            <category>sql functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/129-Use-of-OUT-and-INOUT-Parameters.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=129</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=129</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PostgreSQL has supported what are called Out (output) parameters &lt;a href=&quot;http://www.postgresql.org/docs/8.1/interactive/plpgsql-declarations.html&quot; target=&quot;_blank&quot;&gt;since version 8.1&lt;/a&gt;.
We were surprised it has been that long since we always thought of it as a feature from 8.2+ 
until it recently came up for discussion on &lt;a href=&quot;http://postgis.refractions.net/pipermail/postgis-users/2009-July/024104.html&quot; target=&quot;_blank&quot;&gt;PostGIS newsgroup&lt;/a&gt; and we decided to investigate how 
long it has been supported.
&lt;/p&gt;
&lt;p&gt;What are OUT parameters?  These are parameters you define as part of the function argument
list that get returned back as part of the result.  When you create functions, the arguments 
 are defaulted to IN parameters when not explicitly specified (which means they are passed in and not returned) which 
is why you sometimes see PgAdmin do something like &lt;em&gt;IN somevariable variabletype&lt;/em&gt; when you use 
the function wizard.
&lt;/p&gt;
&lt;p&gt;You can have INOUT parameters as well which are function inputs that both get passed in, can be modified
by the function and also get returned.&lt;/p&gt;

&lt;p&gt;As a side note -  In 8.4, PostgreSQL was enhanced to allow dynamic sql RETURN QUERY using &lt;a href=&quot;http://www.postgresql.org/docs/8.4/static/plpgsql-statements.html&quot; target=&quot;_blank&quot;&gt;RETURN QUERY EXECUTE&lt;/a&gt; syntax for plpgsql queries and also
allow set returning functions being called in the SELECT part for any pl language.  In prior versions,
this was only a feature of PL functions written in SQL.
8.3 introduced RETURN query which required a static sql statement, but did make things a bit easier.
&lt;/p&gt;

&lt;p&gt;One of the common use cases for using OUT parameters is to be able to return multiple outputs from a function without having
to declare a PostgreSQL type as output of the function.  In this article we shall cover all variants of this.  We&#039;ll just focus on sql and plpgsql for this
discussion, since we are not sure to what extent other pl languages (if at all) support IN OUT.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/129-Use-of-OUT-and-INOUT-Parameters.html#extended&quot;&gt;Continue reading &quot;Use of OUT and INOUT Parameters&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 30 Jul 2009 14:34:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/129-guid.html</guid>
    
</item>
<item>
    <title>PLPython Part 5: PLPython meets PostgreSQL Multi-column aggregates and SVG plots</title>
    <link>http://www.postgresonline.com/journal/archives/107-PLPython-Part-5-PLPython-meets-PostgreSQL-Multi-column-aggregates-and-SVG-plots.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>advanced</category>
            <category>pl programming</category>
            <category>plpython</category>
            <category>postgresql versions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/107-PLPython-Part-5-PLPython-meets-PostgreSQL-Multi-column-aggregates-and-SVG-plots.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=107</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=107</wfw:commentRss>
    

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In our &lt;a href=&quot;http://www.postgresonline.com/journal/archives/102-PLPython-Part-4-PLPython-meets-aggregates.html&quot; target=&quot;_blank&quot;&gt;PLPython Part 4: PLPython meets aggregates&lt;/a&gt; we demonstrated the power of PostgreSQL  in combination
with PLPython to create a sequence of ascii plots by using the power of aggregation.  Our friend &lt;a href=&quot;http://www.spatialdbadvisor.com/&quot; target=&quot;_blank&quot;&gt;Simon Greener over at Spatial Db Advisor&lt;/a&gt; told me the example
was clever but ascii plots was so 70ish and ugly, why didn&#039;t I do SVG plots? He felt people being predominantly visual would be caught up in the ugliness of Ascii plots and miss the point.
At least &lt;a href=&quot;http://www.postgresonline.com/journal/archives/102-PLPython-Part-4-PLPython-meets-aggregates.html#c803&quot; target&quot;_blank&quot;&gt;Bob found them neat and can appreciate the elegance in simplicity, thanks Bob.&lt;/a&gt;.

&lt;p&gt;
To make it up
to Simon, we shall demonstrate 2 features we left out in our prior article.
&lt;/p&gt;
&lt;p&gt;
&lt;OL&gt;&lt;LI&gt;Pretty SVG graphs -- so I don&#039;t have to hear more about SVG from Simon and how I&#039;m caught in the 70s.&lt;/LI&gt;
	&lt;LI&gt;Ability to plot a schedule -- schedule item, start date, end date using a multi-column aggregate function. Here is a good use for multi-column aggregates or at least I think so. (Yeh for Multi-column aggregates)&lt;/LI&gt;
&lt;/OL&gt;
&lt;/p&gt;

&lt;p&gt;If you are into spatial processing in the database or how many ways you can play with XML particularly &lt;a href=&quot;http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks&quot; target=&quot;_blank&quot;&gt;Oracle Locator, Oracle Spatial&lt;/a&gt;, &lt;a href=&quot;http://www.spatialdbadvisor.com/postgis_tips_tricks&quot; target=&quot;_blank&quot;&gt;PostGIS&lt;/a&gt; and &lt;a href=&quot;http://www.spatialdbadvisor.com/sql_server_blog&quot; target=&quot;_blank&quot;&gt;SQL Server 2008&lt;/a&gt;, we highly recommend &lt;a href=&quot;http://www.spatialdbadvisor.com/&quot; target=&quot;_blank&quot;&gt;Simon&#039;s articles&lt;/a&gt;.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/107-PLPython-Part-5-PLPython-meets-PostgreSQL-Multi-column-aggregates-and-SVG-plots.html#extended&quot;&gt;Continue reading &quot;PLPython Part 5: PLPython meets PostgreSQL Multi-column aggregates and SVG plots&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 13 Mar 2009 08:28:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/107-guid.html</guid>
    <category>aggregates</category>
<category>plpython</category>

</item>

</channel>
</rss>
