<?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 (Entries tagged as postgresql 9.0)</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>Thu, 21 Apr 2011 06:02:34 GMT</pubDate>

    <image>
        <url>http://www.postgresonline.com/journal/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Postgres OnLine Journal - 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>An Almost Idiot's Guide to Installing  PostGIS 1.5 on PostgreSQL 9.0 via Yum</title>
    <link>http://www.postgresonline.com/journal/archives/204-An-Almost-Idiots-Guide-to-Installing-PostGIS-1.5-on-PostgreSQL-9.0-via-Yum.html</link>
            <category>9.0</category>
            <category>basics</category>
            <category>beginner</category>
            <category>postgis</category>
            <category>postgresql versions</category>
            <category>yum</category>
    
    <comments>http://www.postgresonline.com/journal/archives/204-An-Almost-Idiots-Guide-to-Installing-PostGIS-1.5-on-PostgreSQL-9.0-via-Yum.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=204</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In the past I have always chosen to compile my own PostGIS  because the GEOS library that came with the regular PostgreSQL yum install, was a bit antiquated. 
This has changed, so this time around I figured I&#039;d give it a go at using the Yum repository 1.5.2 release of PostGIS available via &lt;a href=&quot;http://www.pgrpms.org/news-packagelist.php&quot; target=&quot;_blank&quot;&gt;Yum Package List&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Before you can follow these directions, make sure you have your PostgreSQL 9.0 setup via our &lt;a href=&quot;http://www.postgresonline.com/journal/archives/203-postgresql90-yum.html&quot; target=&quot;_blank&quot;&gt;An almost idiot&#039;s guide to Install PostgreSQL 9.0 with Yum&lt;/a&gt;.&lt;/p&gt;

&lt;div style=&#039;background-color:yellow&#039;&gt;&lt;a href=&quot;http://www.amazon.com/PostGIS-Action-Regina-Obe/dp/1935182269?&amp;camp=213293&amp;linkCode=wey&amp;tag=postgisus-20&amp;creative=388373&quot; target=&quot;_blank&quot;&gt;PostGIS in Action&lt;/a&gt; has started shipping from Amazon and we already have 3 positive reviews.  We are hoping to write another book sometime soon, but haven&#039;t decided yet on the topic.  Will definitely have something to do with databases and probably a lot of PostgreSQL in it.&lt;/div&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/204-An-Almost-Idiots-Guide-to-Installing-PostGIS-1.5-on-PostgreSQL-9.0-via-Yum.html#extended&quot;&gt;Continue reading &quot;An Almost Idiot&#039;s Guide to Installing  PostGIS 1.5 on PostgreSQL 9.0 via Yum&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 21 Apr 2011 02:02:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/204-guid.html</guid>
    <category>postgis</category>
<category>postgresql 9.0</category>
<category>yum</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>String Aggregation in PostgreSQL, SQL Server, and MySQL</title>
    <link>http://www.postgresonline.com/journal/archives/191-String-Aggregation-in-PostgreSQL,-SQL-Server,-and-MySQL.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>cte</category>
            <category>db2</category>
            <category>intermediate</category>
            <category>mysql</category>
            <category>oracle</category>
            <category>postgresql versions</category>
            <category>q&amp;a</category>
            <category>sql server</category>
            <category>window functions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/191-String-Aggregation-in-PostgreSQL,-SQL-Server,-and-MySQL.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=191</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;&lt;b&gt;Question:&lt;/b&gt; You have a table of people and a table that specifies the activities each person is involved
in.  You want to return a result that has one record per person and a column that has a listing of activities for each person
separated by semicolons and alphabetically sorted by activity. You also want the whole set alphabetically sorted by person&#039;s name. &lt;/p&gt;

&lt;p&gt;This is a question we are always asked and since we mentor on various flavors of databases, 
we need to be able to switch gears and provide an answer that works on the client&#039;s database. Most
often the additional requirement is that you can&#039;t install new functions in the database. This means that
for PostgreSQL/SQL Server that both support defining custom aggregates, that is out as an option.&lt;/p&gt;

&lt;p&gt;Normally we try to come up with an answer that works in most databases, but sadly the only solution that works in 
most is to push the problem off to the client front end and throw up your hands and proclaim -- &amp;quot;This ain&#039;t something that should be 
done in the database and is a reporting problem.&amp;quot;  That is in fact what many database purists do, and all I can say to them is wake up and smell the coffee before you are out of a job.  
We feel that data 
transformation is an important function of a database, and if your database is incapable of massaging the data into a format
your various client apps can easily digest, WELL THAT&#039;s A PROBLEM.&lt;/p&gt;

&lt;p&gt;We shall now document this answer rather than trying to answer for the nteenth time. For starter&#039;s
PostgreSQL has a lot of answers to this question, probably more so than any other, though some are easier to execute than others
and many depend on the version of PostgreSQL you are using.  SQL Server has 2 classes of answers neither of which is terribly appealing,
but we&#039;ll go over the ones that don&#039;t require you to be able to install .NET stored functions in your database since we said that is often a requirement.  
MySQL has a fairly
simple, elegant and very portable way that it has had for a really long time.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/191-String-Aggregation-in-PostgreSQL,-SQL-Server,-and-MySQL.html#extended&quot;&gt;Continue reading &quot;String Aggregation in PostgreSQL, SQL Server, and MySQL&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 24 Dec 2010 11:24:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/191-guid.html</guid>
    <category>common table expressions</category>
<category>mysql</category>
<category>oracle</category>
<category>postgresql 9.0</category>
<category>sql server</category>
<category>string concatenation</category>
<category>window functions</category>

</item>
<item>
    <title>PostgreSQL 9.0 pg_dump, pg_dumpall, pg_restore cheatsheet overview</title>
    <link>http://www.postgresonline.com/journal/archives/186-PostgreSQL-9.0-pg_dump,-pg_dumpall,-pg_restore-cheatsheet-overview.html</link>
            <category>9.0</category>
            <category>beginner</category>
            <category>special feature</category>
    
    <comments>http://www.postgresonline.com/journal/archives/186-PostgreSQL-9.0-pg_dump,-pg_dumpall,-pg_restore-cheatsheet-overview.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=186</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Backup and Restore is probably the most important thing to know how to do when you have a database with data you care about.&lt;/p&gt;

&lt;p&gt;The utilities in PostgreSQL that accomplish these tasks are pg_restore, pg_dump, pg_dumpall, and for restore of plain text dumps - psql.  &lt;/p&gt;
&lt;p&gt;A lot of the switches used by pg_dump, pg_restore, pg_dumpall are common to all three.  You use pg_dump to do backups of a single database or select database objects and pg_restore to restore it either to another database or to recover portions of a database.  You use pg_dumpall to dump all your databases in plain text format.  &lt;/p&gt;

&lt;p&gt;Rather than trying to keep track of which switch works with which, we decided to combine all into a single cheat sheet with a column denoting which utility the switch is supported in.
Pretty much all the text is compiled from the --help switch of each.&lt;/p&gt;
&lt;P&gt;We created a similar &lt;a href=&quot;http://www.postgresonline.com/journal/archives/63-PostgreSQL-8.3-Pg_dump-Pg_Restore-Cheatsheet-Overview.html&quot; target=&quot;_blank&quot;&gt;Backup and Restore cheatsheet for PostgreSQL 8.3&lt;/a&gt; and since then some new features have been added such as the jobs parallel restore feature in 8.4.  We have now created an updated sheet to comprise all features present in PostgreSQL 9.0 packaged pg_dump, pg_restore, pg_dumpall command line utilities.
&lt;/P&gt;
&lt;P&gt;PDF Portrait version 8.5 x 11&quot; of this cheatsheet is available at &lt;a href=&quot;/special_feature.php?sf_name=postgresql90_pg_dumprestore_cheatsheet&amp;outputformat=pdf&quot; target=&quot;_blank&quot;&gt;PostgreSQL 9.0 Dump Restore 8.5 x 11&lt;/a&gt; and also available in
&lt;a href=&quot;/special_feature.php?sf_name=postgresql90_pg_dumprestore_cheatsheet&amp;outputformat=a4pdf&quot; target=&quot;_blank&quot;&gt;PDF A4 format&lt;/a&gt; and &lt;a href=&quot;/special_feature.php?sf_name=postgresql90_pg_dumprestore_cheatsheet&amp;outputformat=html&quot; target=_blank&gt;HTML&lt;/a&gt;.
&lt;/P&gt;

&lt;p&gt;As usual please let us know if you find any errors or omissions and we&#039;ll be happy to correct.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 21 Nov 2010 20:35:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/186-guid.html</guid>
    <category>backup</category>
<category>pg_dump</category>
<category>pg_restore</category>
<category>pgadmin</category>
<category>postgresql 9.0</category>
<category>restore</category>

</item>
<item>
    <title>PostgreSQL 9 Admin Cookbook Book Review</title>
    <link>http://www.postgresonline.com/journal/archives/182-PostgreSQL-9-Admin-Cookbook-Book-Review.html</link>
            <category>9.0</category>
            <category>product showcase</category>
    
    <comments>http://www.postgresonline.com/journal/archives/182-PostgreSQL-9-Admin-Cookbook-Book-Review.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=182</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;/store.php?asin=1849510288&quot; &gt;&lt;img src=&quot;/images/affiliate/PostgreSQL9.0AdminCookbook_large.jpg&quot; border=&quot;0&quot; alt=&quot;PostgreSQL 9.0 Admin cookbook&quot; style=&quot;float:left;padding:10px&quot;/&gt;&lt;/a&gt;I was excited when &lt;a href=&quot;/store.php?asin=1849510288&quot; target=&quot;_blank&quot;&gt;PostgreSQL 9 Admin Cookbook&lt;/a&gt; by Simon Riggs and Hannu Krosing and the companion book &lt;a href=&quot;/store.php?asin=184951030X&quot; target=&quot;_blank&quot;&gt;PostgreSQL 9 High Performance&lt;/a&gt;, by Greg Smith
were available. All three authors are well known experts in the PostgreSQL community and consultants at 2ndQuadrant, so you are sure to learn a lot from both books.  
Both books are published by Packt Publishing and can be &lt;a href=&quot;http://link.packtpub.com/yWvQiZ&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;bought directly from Packt Publishing&lt;/b&gt;&lt;/a&gt; or via Amazon. Packt is currently running a 50% off sale if you
buy both books (&lt;b&gt;e-Book version&lt;/b&gt;) directly from Packt. In addition Packt offers &lt;a href=&quot;http://www.packtpub.com/Shippingpolicy&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;free shipping for US, UK, Europe and select Asian countries&lt;/b&gt;&lt;/a&gt;.  The pair of books make attractive companions. &lt;/p&gt;
&lt;p&gt;The main thing I felt missing in this duo was a book dedicated to &lt;b&gt;PostgreSQL: The platform&lt;/b&gt;
that would cover all the various PL languages and the various neat ways PostgreSQL is used and has been extended by many to do things one would not normally expect of a database. 
Some day perhaps someone will write such a book.&lt;/p&gt;
&lt;p&gt;This article is a review about PostgreSQL 9 Admin Cookbook and we&#039;ll be following up later with PostgreSQL 9 High Performance.&lt;/p&gt;
&lt;p&gt;This is my first book review.  I have a lot of patience for writing, but little patience
when it comes to reading. That said, I found PostgreSQL 9 Admin Cookbook an easy and enjoyable read,
and a book that I managed to learn more tricks from than I care to admit.  It is a handy book to have for reference regardless of if you consider yourself
a novice, intermediate or advanced user.&lt;/p&gt;

&lt;p&gt;As the book title suggests, it&#039;s a cookbook, but a cookbook that combines a question and answer style with a discussion
style of writing.  The tasks are neatly categorized into 12 chapters and each task smoothly builds on previous tasks discussed.
It is still categorized in such a way that you can jump to a particular task you are currently having problems with without having read the other parts of the book.&lt;/p&gt;
&lt;p&gt;Although it is titled PostgreSQL 9 -- it covers earlier versions as well.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/182-PostgreSQL-9-Admin-Cookbook-Book-Review.html#extended&quot;&gt;Continue reading &quot;PostgreSQL 9 Admin Cookbook Book Review&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 03 Nov 2010 17:49:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/182-guid.html</guid>
    <category>book writing</category>
<category>postgresql 9.0</category>

</item>
<item>
    <title>Explain Plans PostgreSQL 9.0 - Part 2: JSON and JQuery Plan Viewer</title>
    <link>http://www.postgresonline.com/journal/archives/174-Explain-Plans-PostgreSQL-9.0-Part-2-JSON-and-JQuery-Plan-Viewer.html</link>
            <category>9.0</category>
            <category>application development</category>
            <category>intermediate</category>
            <category>jquery</category>
            <category>pgadmin</category>
            <category>postgresql versions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/174-Explain-Plans-PostgreSQL-9.0-Part-2-JSON-and-JQuery-Plan-Viewer.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=174</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.postgresonline.com/journal/rss.php?version=2.0&amp;type=comments&amp;cid=174</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/171-pgexplain90formats_part1.html&quot; target=&quot;_blank&quot;&gt;part 1 of this series&lt;/a&gt; on PostgreSQL 9.0 planner outputs, we demonstrated how to render explain plans in YAML, JSON, and XML using the new explain features in PostgreSQL 9.0. In this second part,
we&#039;ll demonstrate how to build a user interface that allows you input a JSON formatted explain plan and have it render into a printable, navigateable display using JQuery, javascript and a little bit of HTML coding.  
In part 3 we&#039;ll do something similar using XML and XSLT programming.
&lt;/p&gt;
&lt;p&gt;For those who aren&#039;t familiar with JQuery, it is an MIT licensed javascript library that is fairly light weight and allows you to inspect and change html elements with fairly intuitive syntax, has some nice ajax methods and tools for converting xml/json to native objects that can be manipulated. 
You can check it out at &lt;a href=&quot;http://jquery.com/&quot; target=&quot;_blank&quot;&gt;JQUERY&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are not experts in JQuery, but from what we have used of it, we really like it and the fact the base package is MIT licensed, fairly light weight and lots of plugins available for it are real pluses.&lt;/p&gt;


&lt;p&gt;The most difficult thing I think most people find about reading explain plans is that they are upside down; it starts with a conclusion and backtracks how to arrive at it.  Humans by nature think about planning steps from start to finish.
In order to make an explain plan understandable to mere mortals, we generally display them upside down or having the child-nodes shown left most.  We shall follow that approach.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/174-Explain-Plans-PostgreSQL-9.0-Part-2-JSON-and-JQuery-Plan-Viewer.html#extended&quot;&gt;Continue reading &quot;Explain Plans PostgreSQL 9.0 - Part 2: JSON and JQuery Plan Viewer&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 26 Aug 2010 04:13:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/174-guid.html</guid>
    <category>explain plan</category>
<category>imagemagick</category>
<category>jquery</category>
<category>json</category>
<category>pgadmin</category>
<category>postgresql 9.0</category>

</item>
<item>
    <title>Using LTree to Represent and Query Hierarchy and Tree Structures</title>
    <link>http://www.postgresonline.com/journal/archives/173-Using-LTree-to-Represent-and-Query-Hierarchy-and-Tree-Structures.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>contrib spotlight</category>
            <category>db2</category>
            <category>firebird</category>
            <category>intermediate</category>
            <category>ltree</category>
            <category>oracle</category>
            <category>postgresql versions</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/173-Using-LTree-to-Represent-and-Query-Hierarchy-and-Tree-Structures.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=173</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PostgreSQL offers several options for displaying and querying tree like structures.  
In &lt;a href=&quot;http://www.postgresonline.com/journal/archives/131-Using-Recursive-Common-table-expressions-to-represent-Tree-structures.html&quot; target=&quot;_blank&quot;&gt;Using Recursive Common Table Expressions (CTE) to represent tree structures&lt;/a&gt;
we demonstrated how to use common table expressions to display a tree like structure.  Common Table Expressions required PostgreSQL 8.4 and above but  was fairly ANSI standards compliant. In addition to that 
approach you have the option of using recursive functions.  There is yet another common approach for this which is specific to PostgreSQL.  This is using the &lt;a href=&quot;http://www.postgresql.org/docs/current/static/ltree.html&quot; target=&quot;_blank&quot;&gt;ltree contrib datatype&lt;/a&gt;
that has been supported for sometime in PostgreSQL.  For one of our recent projects, we chose ltree over the other approaches because the performance is much better when you need to do ad-hoc queries over the tree since it can take advantage of btree and gist indexes
and also has built-in tree query expressions that make ad-hoc queries simpler to do; similar in concept to the tsearch query syntax for querying text. &lt;/p&gt;

&lt;p&gt;In this article we&#039;ll demonstrate how to use ltree and along the way also show the PostgreSQL 9.0 new features &lt;b&gt;conditional triggers&lt;/b&gt; and &lt;b&gt;ordered aggregates&lt;/b&gt;.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/173-Using-LTree-to-Represent-and-Query-Hierarchy-and-Tree-Structures.html#extended&quot;&gt;Continue reading &quot;Using LTree to Represent and Query Hierarchy and Tree Structures&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 22 Aug 2010 01:15:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/173-guid.html</guid>
    <category>ansi sql</category>
<category>common table expressions</category>
<category>firebird</category>
<category>ibm db2</category>
<category>oracle</category>
<category>postgresql 9.0</category>
<category>sql server</category>
<category>triggers</category>

</item>
<item>
    <title>Explain Plans PostgreSQL 9.0 Text, JSON, XML, YAML - Part 1: You Choose</title>
    <link>http://www.postgresonline.com/journal/archives/171-Explain-Plans-PostgreSQL-9.0-Text,-JSON,-XML,-YAML-Part-1-You-Choose.html</link>
            <category>9.0</category>
            <category>basics</category>
            <category>beginner</category>
            <category>gis</category>
            <category>hstore</category>
            <category>pgadmin</category>
            <category>postgis</category>
    
    <comments>http://www.postgresonline.com/journal/archives/171-Explain-Plans-PostgreSQL-9.0-Text,-JSON,-XML,-YAML-Part-1-You-Choose.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=171</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;One of the new features of PostgreSQL 9.0 is the ability to specify the format of an explain plan.
In prior versions your only choice was text (and graphic explain with tools like PgAdmin III and other GUIS), but in 9.0 on, you have the additional options of
Javascript Object Notation (JSON) which &lt;a href=&quot;http://lin-ear-th-inking.blogspot.com/2010/07/is-json-csv-of-21st-century.html&quot; target=&quot;_blank&quot;&gt;some people have a thing or two to say about them&lt;/a&gt;,  YAML Ain&#039;t Markup Language (YAML) or eXtended Markup Language (XML). The new explain options are itemized in &lt;a href=&quot;http://www.postgresql.org/docs/9.0/static/sql-explain.html&quot; target=&quot;_blank&quot;&gt;PostgreSQL 9.0 EXPLAIN&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;The main benefit of the JSON, XML, YAML formats is that they are easier
to machine parse than the default text version. This will allow for creative renderings of planner trees with minimal coding.&lt;/p&gt;

&lt;p&gt;In Part 1 of this series, we&#039;ll demonstrate how to output the plans in these various formats and what they look like.
In later parts of this series -- we&#039;ll demonstrate how to use Javascript, XSL and other scripting/markup languages
to transform these into works of art you can hang on your wall.&lt;/p&gt;

-- START POSTGIS IN ACTION ASIDE --
&lt;p&gt;We just submitted the third major revision of &lt;a href=&quot;http://www.postgis.us/chapter_03&quot; target=&quot;_blank&quot;&gt;Chapter 3 Data Modeling&lt;/a&gt;
of our upcoming &lt;a href=&quot;http://www.postgis.us&quot; target=&quot;_blank&quot;&gt;PostGIS in Action&lt;/a&gt; book. 
The second major revision we never submitted and threw it out because it wasn&#039;t worldly enough and was too involved. We may
use it later on for an example.
Chapter 3 should be up on Manning Early Access Program (MEAP) soon. If you haven&#039;t bought the book yet &lt;a href=&quot;http://www.postgis.us/page_buy_book&quot;&gt;Buy now&lt;/a&gt;.
You don&#039;t want to miss out on a major masterpiece in the making. Okay we exaggerate a bit.&lt;/p&gt;
-- END POSTGIS IN ACTION ASIDE -- &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/171-Explain-Plans-PostgreSQL-9.0-Text,-JSON,-XML,-YAML-Part-1-You-Choose.html#extended&quot;&gt;Continue reading &quot;Explain Plans PostgreSQL 9.0 Text, JSON, XML, YAML - Part 1: You Choose&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 29 Jul 2010 17:58:03 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/171-guid.html</guid>
    <category>book writing</category>
<category>explain plan</category>
<category>jquery</category>
<category>json</category>
<category>pgadmin</category>
<category>postgis</category>
<category>postgresql 9.0</category>
<category>xml</category>
<category>xslt</category>
<category>yaml</category>

</item>
<item>
    <title>What is new in PostgreSQL 9.0</title>
    <link>http://www.postgresonline.com/journal/archives/164-What-is-new-in-PostgreSQL-9.0.html</link>
            <category>9.0</category>
            <category>new in postgresql</category>
            <category>postgis</category>
            <category>postgresql versions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/164-What-is-new-in-PostgreSQL-9.0.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=164</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PostgreSQL 9.0 beta 2 just got released this week.  We may see another beta before 9.0 is finally released, but it looks like PostgreSQL 9.0 will be here probably sometime this month.
&lt;a href=&quot;http://www.xzilla.net/blog/2010/Jun/PGCon-2010-slides-are-up.html&quot; target=&quot;_blank&quot;&gt;Robert Treat has a great slide presentation showcasing all the new features&lt;/a&gt;.  The slide share for those on &lt;a href=&quot;http://www.slideshare.net/xzilla/intro-to-postgres-9-tutorial&quot; target=&quot;_blank&quot;&gt;Robert Treat&#039;s slide share page&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;We&#039;ll list the key ones with our favorites at the top: &lt;/p&gt;
&lt;h4&gt;Our favorites&lt;/h4&gt;
&lt;OL&gt;
    &lt;LI&gt;The window function functionality has been enhanced to support ROWS PRECEDING and FOLLOWING.  Recall we discussed this in &lt;a href=&quot;http://www.postgresonline.com/journal/archives/119-Running-totals-and-sums-using-PostgreSQL-8.4-Windowing-functions.html&quot;&gt;Running totals and sums using PostgreSQL 8.4&lt;/a&gt;
     a hack for getting around the lack of ROWS x PRECEDING and FOLLOWING.  No more need for that.  This changes our comparison we did &lt;a href=&quot;http://www.postgresonline.com/journal/archives/122-Window-Functions-Comparison-Between-PostgreSQL-8.4,-SQL-Server-2008,-Oracle,-IBM-DB2.html&quot; target=&quot;_blank&quot;&gt;Window Functions Comparison Between PostgreSQL 8.4, SQL Server 2008, Oracle, IBM DB2&lt;/a&gt;.  
     Now the syntax is inching even closer to Oracle&#039;s window functionality, far superior to SQL Server 2005/2008, and about on par with IBM DB2.  We&#039;ll do updated compare late this month or early next month.
     Depesz has an example of this in &lt;a href=&quot;http://www.depesz.com/index.php/2010/02/17/waiting-for-9-0-extended-frames-for-window-functions/&quot; target=&quot;_blank&quot;&gt;Waiting for 9.0 – extended frames for window functions&lt;/a&gt;&lt;/LI&gt;
     
     &lt;LI&gt;Ordered Aggregates.  This is extremely useful for spatial aggregates and ARRAY_AGG, STRING_AGG, and medians where you care about the order of the aggregation.  Will have to give it a try.  
        For example if you are building a linestring using ST_MakeLine, a hack you normally do would be to order your dataset a certain way and  then run ST_MakeLine.   This will allow you to do 
            &lt;code&gt;ST_MakeLine(pt_geom ORDER BY track_time)&lt;/code&gt; or &lt;code&gt;ARRAY_AGG(student ORDER BY score)&lt;/code&gt;  This is very very cool. &lt;a href=&quot;http://www.depesz.com/index.php/2010/01/06/waiting-for-8-5-ordered-aggregates/&quot; target=&quot;_blank&quot;&gt;Depesz has some examples of ordered aggregates&lt;/a&gt;.&lt;/LI&gt;
     
     &lt;LI&gt;Join removal -- this is a feature that will remove joins from the execution plans where they are not needed.  For example where you have a left join that doesn&#039;t appear in a where or as a column in select. This is important
        for people like us that rely on views to allow less skilled users to be able to write meaningful queries without knowing too much about joins or creating ad-hoc query tools that allow users to pick from multiple tables. Check out &lt;a href=&quot;http://rhaas.blogspot.com/2010/06/why-join-removal-is-cool.html&quot; target=&quot;_blank&quot;&gt;Robert Haas why join removal is cool&lt;/a&gt; for more use cases.&lt;/LI&gt;
        
     &lt;LI&gt;GRANT/REVOKE ON ALL object IN SCHEMA and ALTER DEFAULT PRIVILEGES.  This is just a much simpler user-friendly way of applying permissions.  I can&#039;t tell you how many times we get beat up by MySQL users who find the PostgreSQL security management tricky and tedious to get right.
     Of course you can count on Depesz to have an example of this too &lt;a href=&quot;http://www.depesz.com/index.php/2009/11/07/waiting-for-8-5-grant-all/&quot; target=&quot;_blank&quot;&gt;Waiting for 9.0 - GRANT ALL&lt;/a&gt;&lt;/LI&gt;
&lt;/OL&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/164-What-is-new-in-PostgreSQL-9.0.html#extended&quot;&gt;Continue reading &quot;What is new in PostgreSQL 9.0&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 08 Jun 2010 22:11:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/164-guid.html</guid>
    <category>postgis</category>
<category>postgresql 9.0</category>
<category>window functions</category>

</item>

</channel>
</rss>