<?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 - beginner</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, 19 Aug 2010 08:07:25 GMT</pubDate>

    <image>
        <url>http://www.postgresonline.com/journal/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Postgres OnLine Journal - beginner - 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>Starting PostgreSQL in windows without install</title>
    <link>http://www.postgresonline.com/journal/archives/172-Starting-PostgreSQL-in-windows-without-install.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>beginner</category>
            <category>q&amp;a</category>
    
    <comments>http://www.postgresonline.com/journal/archives/172-Starting-PostgreSQL-in-windows-without-install.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=172</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;This is a question that comes up quite often by windows users, so thought we would share how we normally do it.  The question is can you run a PostgreSQL server on your windows desktop/server box without having to install anything?
The answer is yes and quite easily.  Why would you need to do this.  There are a couple of cases -- one you are developing a single user app that you want users to be able to run from anywhere without having to install it first.
The other common reason is, you aren&#039;t allowed to install anything on a user&#039;s pc and you also want to package along a database you already have created.&lt;/p&gt;
&lt;p&gt;For our purposes, many of our developers develop on portable WAMP like things, and for some of our applications, they need to work in both MySQL and PostgreSQL, so we need an easy way during development to swap one out for the other.&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/172-Starting-PostgreSQL-in-windows-without-install.html#extended&quot;&gt;Continue reading &quot;Starting PostgreSQL in windows without install&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 12 Aug 2010 19:25:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/172-guid.html</guid>
    
</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>Of Camels and People: Converting back and forth from Camel Case, Pascal Case to  underscore lower case</title>
    <link>http://www.postgresonline.com/journal/archives/170-Of-Camels-and-People-Converting-back-and-forth-from-Camel-Case,-Pascal-Case-to-underscore-lower-case.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>beginner</category>
            <category>mysql</category>
            <category>oracle</category>
            <category>postgresql versions</category>
            <category>q&amp;a</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/170-Of-Camels-and-People-Converting-back-and-forth-from-Camel-Case,-Pascal-Case-to-underscore-lower-case.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=170</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;When it comes to naming things in databases and languages, there are various common standards. For many languages the 
    &lt;a href=&quot;http://en.wikipedia.org/wiki/CamelCase&quot; target=&quot;_blank&quot;&gt;camel family of namings&lt;/a&gt; is very popular. For unix based databases
    usually UPPER or lower _ is the choice and for databases such as SQL Server and MySQL which allow you to name your columns with mixed casing
    but couldn&#039;t care less what case you express them in selects, you get a mish mush of styles depending on what camp the database user originated from.&lt;/p&gt;
&lt;p&gt;So to summarize the key styles and the family of people &lt;/p&gt;
&lt;UL&gt;&lt;LI&gt;camelCase : lastName  - employed by SmallTalk, Java, Flex, C++ and various C derivative languages.&lt;/LI&gt;
    &lt;LI&gt;Pascal Case: (a variant of Camel Case) -- LastName which is employed by C#, VB.NET, Pascal (and Delphi), and SQL Server (and some MySQL windows converts). Also often used for class names by languages that use standard camelCase for function names.&lt;/LI&gt;
    &lt;LI&gt;lower case _ last_name :  often found in C, a favorite among PostgreSQL database users. (some MySQL)&lt;/LI&gt;
    &lt;LI&gt;upper case _ LAST_NAME :  a favorite among Oracle Users (some MySQL  Oracle defectors)&lt;/LI&gt;
&lt;/UL&gt;

&lt;p&gt;Being at the cross roads of all the above, we often have to deal with the various above as well as having internal schizophrenic strife and external fights.  
The internal turmoil is the worst and is worse than an ambidextrous person trying to figure out which hand to use in battle.  For these exercises, we&#039;ll demonstrate one way how to convert between the various conventions.  These 
are the first thoughts that came to our mind, so may not be the most elegant.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/170-Of-Camels-and-People-Converting-back-and-forth-from-Camel-Case,-Pascal-Case-to-underscore-lower-case.html#extended&quot;&gt;Continue reading &quot;Of Camels and People: Converting back and forth from Camel Case, Pascal Case to  underscore lower case&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 23 Jul 2010 17:17:17 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/170-guid.html</guid>
    <category>regex</category>
<category>regular expressions</category>
<category>string matching</category>
<category>string parsing</category>

</item>
<item>
    <title>What is new in PgAdmin III 1.12.0</title>
    <link>http://www.postgresonline.com/journal/archives/168-What-is-new-in-PgAdmin-III-1.12.0.html</link>
            <category>9.0</category>
            <category>basics</category>
            <category>beginner</category>
            <category>pgadmin</category>
            <category>postgresql versions</category>
    
    <comments>http://www.postgresonline.com/journal/archives/168-What-is-new-in-PgAdmin-III-1.12.0.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=168</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Gathering from the number of hits we got from our &lt;a href=&quot;http://www.postgresonline.com/journal/archives/164-What-is-new-in-PostgreSQL-9.0.html&quot; target=&quot;_blank&quot;&gt;What&#039;s new in PostgreSQL 9.0&lt;/a&gt;,
and the large number of &lt;a href=&quot;http://developers.slashdot.org/story/10/06/09/1612246/What-Is-New-In-PostgreSQL-90&quot; target=&quot;_blank&quot;&gt;slashdot&lt;/a&gt; responses we got
as well as the fair number of &lt;a href=&quot;http://www.reddit.com/r/programming/comments/ccyqh/what_is_new_in_postgresql_90/&quot; target=&quot;_blank&quot;&gt;reddit responses&lt;/a&gt;,
I guess a lot of people are really excited about the upcoming PostgreSQL 9.0 or at least 
have a lot of opinions about what is still missing in it.&lt;/p&gt;

&lt;p&gt;For this discussion, we would like to point out one of the companion adminstration tools that
will be packaged in with PostgreSQL 9.0 (and currently packaged in beta 2).  This is PgAdmin III, which
we will affectionately refer to as &lt;em&gt;the Administrative tool for mere mortals&lt;/em&gt;.  It is the first administrative
tool that most users new to PostgreSQL use and gives them a user-friendly interface to the
power behind PostgreSQL.  I would say if it were not for this tool and its web cousin &lt;a href=&quot;http://phppgadmin.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;PhpPgAdmin&lt;/a&gt;, many 
a scared newbie user would be running away at the vast unencumbered freedom that PostgreSQL/psql and sibling commandline tools  offer.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/168-What-is-new-in-PgAdmin-III-1.12.0.html#extended&quot;&gt;Continue reading &quot;What is new in PgAdmin III 1.12.0&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 05 Jul 2010 03:19:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/168-guid.html</guid>
    <category>pgadmin</category>

</item>
<item>
    <title>Importing data into PostgreSQL using Open Office Base 3.2</title>
    <link>http://www.postgresonline.com/journal/archives/167-Importing-data-into-PostgreSQL-using-Open-Office-Base-3.2.html</link>
            <category>beginner</category>
            <category>ms access</category>
            <category>oobase</category>
            <category>oracle</category>
            <category>product showcase</category>
    
    <comments>http://www.postgresonline.com/journal/archives/167-Importing-data-into-PostgreSQL-using-Open-Office-Base-3.2.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=167</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;A while ago we demonstrated how to &lt;a href=&quot;http://www.postgresonline.com/journal/archives/8-Using-OpenOffice-Base-2.3.1-with-PostgreSQL.html&quot; target=&quot;_target&quot;&gt;use Open Office Base to connect to a PostgreSQL server using both the native PostgreSQL SBC and the PostgreSQL JDBC driver&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The routine for doing the same in Open Office Base 3.2 is pretty much the same as it was in the 2.3 incarnation.  In this excerpt, we&#039;ll demonstrate how to import data into PostgreSQL using Open Office Base, as we had promised to do in 
&lt;a href=&quot;http://www.postgresonline.com/journal/archives/133-Database-Administration,-Reporting,-and-Light-application-development.html&quot; target=&quot;_blank&quot;&gt;Database Administration, Reporting, and Light Applicaton Development&lt;/a&gt; and some stumbling blocks to watch out for.&lt;/p&gt;

&lt;h5&gt;Use Case&lt;/h5&gt;
&lt;p&gt;Command line lovers are probably scratching there head, why you want to do this. After all stumbling your way thru a commandline and typing stuff is much more fun and you can automate it after you are done.  
For our needs, we get stupid excel or some other kind of tab delimeted data
from somebody, and we just want to cut and paste that data in our database. These files are usually small (under 5000 records) and the column names are never consistent. We don&#039;t want to fiddle with writing code to do these one off type exercises.&lt;/p&gt;

&lt;p&gt;For other people, who are used to using GUIs or training people afraid of command lines, the use cases are painfully obvious, so we won&#039;t bore you.&lt;/p&gt;

&lt;h5&gt;Importing Data with Open Office Base Using copy and paste&lt;/h5&gt;
&lt;p&gt;Open Office has this fantastic feature called Copy and Paste (no kidding), and we will demonstrate in a bit, why their copy and paste is better than Microsoft Access&#039;s Copy and Paste particularly when you want to paste into some database other than a Microsoft one.  
It is worthy of a metal if I dear say.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/167-Importing-data-into-PostgreSQL-using-Open-Office-Base-3.2.html#extended&quot;&gt;Continue reading &quot;Importing data into PostgreSQL using Open Office Base 3.2&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 28 Jun 2010 03:42:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/167-guid.html</guid>
    <category>msaccess</category>
<category>oobase</category>

</item>
<item>
    <title>NOT IN NULL Uniqueness trickery</title>
    <link>http://www.postgresonline.com/journal/archives/166-NOT-IN-NULL-Uniqueness-trickery.html</link>
            <category>basics</category>
            <category>beginner</category>
            <category>postgresql versions</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/166-NOT-IN-NULL-Uniqueness-trickery.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=166</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;I know a lot has been said about this beautiful value we affectionately call &lt;a href=&quot;http://en.wikipedia.org/wiki/Null_%28SQL%29&quot; target=&quot;_blank&quot;&gt;NULL&lt;/a&gt;, which is neither here nor there and that manages to catch many of us 
off guard with its casual neither here nor thereness.  Database analysts who are really just back seat mathematicians in disguise like to &lt;a href=&quot;http://sqlblog.com/blogs/hugo_kornelis/archive/2007/09/30/what-if-null-if-null-is-null-null-null-is-null.aspx&quot; target=&quot;_blank&quot;&gt;philosophize&lt;/a&gt;
about the unknown and pat themselves on the back when they feel they have mastered the unknown better than any one else.  Of course database spatial analysts, the worst kind of back seat mathematicians, 
like to talk not only about NULL but about &lt;a href=&quot;http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry&quot; target=&quot;_blank&quot;&gt;EMPTY and compare notes with their brethren&lt;/a&gt; and &lt;a href=&quot;http://blog.cleverelephant.ca/2010/03/nothing-nada-zip-bupkus.html&quot; target=&quot;_blank&quot;&gt;write dissertations&lt;/a&gt;
about what to do about something that is neither here nor there
but is more known than the unknown, but not quite as known as the empty string.&lt;/p&gt;

&lt;p&gt;Okay getting to the point, one of our clients asked us about a peculiar problem they had with a query, and the strange results they were getting.  We admit this still manages to catch us off guard every once in a while.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/166-NOT-IN-NULL-Uniqueness-trickery.html#extended&quot;&gt;Continue reading &quot;NOT IN NULL Uniqueness trickery&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 22 Jun 2010 04:19:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/166-guid.html</guid>
    <category>ansi sql</category>
<category>null</category>

</item>
<item>
    <title>Where is soundex and other warm and fuzzy string things</title>
    <link>http://www.postgresonline.com/journal/archives/158-Where-is-soundex-and-other-warm-and-fuzzy-string-things.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>beginner</category>
            <category>contrib spotlight</category>
            <category>fuzzystrmatch</category>
            <category>mysql</category>
            <category>oracle</category>
            <category>postgresql versions</category>
            <category>sql server</category>
    
    <comments>http://www.postgresonline.com/journal/archives/158-Where-is-soundex-and-other-warm-and-fuzzy-string-things.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=158</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;For those people coming from Oracle, SQL Server and MySQL or other databases that have soundex functionality, 
you may be puzzled, or even frustrated when you try to do 
something like &lt;br /&gt;&lt;code&gt;WHERE soundex(&#039;Wushington&#039;) = soundex(&#039;Washington&#039;)&lt;/code&gt; 
&lt;br /&gt; in PostgreSQL and get a function does not exist error.&lt;/p&gt;

&lt;p&gt;Well it does so happen that there is a soundex function in PostgreSQL, and yes it is 
also called &lt;b&gt;soundex&lt;/b&gt;, but is offered as a contrib module and not installed by default. It also has other fuzzy  string matching functions in addition to soundex. 
One of my favorites, the &lt;b&gt;levenshenstein&lt;/b&gt; distance function is included as well.  In this article
we&#039;ll be covering the contrib module packaged as &lt;b&gt;fuzzystrmatch.sql&lt;/b&gt;. Details of the module can be found in &lt;a href=&quot;http://www.postgresql.org/docs/8.4/static/fuzzystrmatch.html&quot; target=&quot;_blank&quot;&gt;FuzzyStrMatch&lt;/a&gt;.
The contrib module has been around for sometime, but has changed slightly from PostgreSQL version to PostgreSQL version.  We are covering the 8.4 version in this article.&lt;/p&gt;

&lt;p&gt;For those unfamiliar with soundex, its a basic approach developed by the US Census in the 1930s as a way of sorting
names by pronounciation.  Read &lt;a href=&quot;http://www.fcgsc.org/forms/CensusAndSoundex.pdf&quot; target=&quot;_blank&quot;&gt;Census and Soundex&lt;/a&gt; for more gory history details.&lt;/p&gt;
&lt;p&gt;Given that it is an approach designed primarily for the English alphabet, it sort of makes sense why its not built-in to PostgreSQL,
which has more of a diverse international concern. For example if you used it to compare two words in Japanese or Chinese,
don&#039;t think it would fair too well in any of the database platforms that support this function.&lt;/p&gt;
&lt;p&gt;The original soundex algorithm has been improved over the years.  Though its still the most common used today, newer variants 
exist called &lt;a href=&quot;http://en.wikipedia.org/wiki/Metaphone&quot; target=&quot;_blank&quot;&gt;MetaPhone&lt;/a&gt; developed in the 1990s and &lt;a href=&quot;http://en.wikipedia.org/wiki/Double_Metaphone&quot; target=&quot;_blank&quot;&gt;Double Metaphone (DMetaPhone)&lt;/a&gt; developed in 2000 that support additional
consonants in other languages such as Slavic, Celtic, Italian, Spanish etc.  
These two variants are also included in the fuzzystrmatch contrib library.  The soundex function still seems to be 
the most popularly used at least for U.S. This is perhaps because most of the other databases (Oracle, SQL Server, MySQL) have soundex built-in but not the metaphone variants.
So in a sense soundex is a more portable function.  The other reason is that metaphone and dmetaphone take up a bit more space and
are also more processor intensive to compute than soundex. We&#039;ll demonstrate some differences between them in this article.&lt;/p&gt;

&lt;p&gt;To enable soundex and the other fuzzy string matching functions included, just run the 
&lt;b&gt;share/contrib/fuzzystrmatch.sql&lt;/b&gt; located in your PostgreSQL install folder.  This library is an important piece of arsenal for geocoding and genealogy tracking particularly
the U.S. streets and surnames data sets.  I come from a long line of Minors, Miners, Burnettes and Burnets.&lt;/p&gt;

&lt;p&gt;For the next set of exercises, we will be using the places dataset we created in &lt;a href=&quot;http://www.postgresonline.com/journal/archives/157-Import-fixed-width-data-into-PostgreSQL-with-just-PSQL.html&quot; target=&quot;_blank&quot;&gt;Importing Fixed width data into PostgreSQL with just PSQL&lt;/a&gt;.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/158-Where-is-soundex-and-other-warm-and-fuzzy-string-things.html#extended&quot;&gt;Continue reading &quot;Where is soundex and other warm and fuzzy string things&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 17 May 2010 16:53:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/158-guid.html</guid>
    <category>contrib</category>
<category>mysql</category>
<category>oracle</category>
<category>soundex</category>
<category>sql server</category>
<category>string matching</category>

</item>
<item>
    <title>Import fixed width data into PostgreSQL with just PSQL</title>
    <link>http://www.postgresonline.com/journal/archives/157-Import-fixed-width-data-into-PostgreSQL-with-just-PSQL.html</link>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>http://www.postgresonline.com/journal/archives/157-Import-fixed-width-data-into-PostgreSQL-with-just-PSQL.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=157</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Fixed width data is probably the most annoying data to import because you need some mechanism to break the columns at the column boundaries.  A lot of people bring this kind of data
into a tool such as OpenOffice, Excel or MS Access, massage it into a delimeted format and then pull it in with PostgreSQL copy command or some other means.  There is another way and one that doesn&#039;t require 
anything else aside from what gets packaged with PostgreSQL.  We will demonstrate this way.&lt;/p&gt;


&lt;p&gt;Its quite simple.  Pull each record in as a single column and then spit it into the columns you want with plain old SQL. We&#039;ll demonstrate this by importing Census data places fixed width file.&lt;/p&gt;
&lt;p&gt;Although this technique we have is focused on PostgreSQL, its pretty easy to do the same steps in any other relational database.&lt;/p&gt;


&lt;p&gt;Both David Fetter and Dimitri Fontaine have demonstrated other approaches of doing this as well
so check theirs out.&lt;/p&gt;

&lt;span style=&quot;color:green&quot;&gt;UPDATE&lt;/span&gt;
&lt;ul&gt;
   &lt;li&gt;David Fetter - &lt;a href=&quot;http://people.planetpostgresql.org/dfetter/index.php?/archives/58-psql,-Paste,-Perl-Pefficiency!.html&quot; target=&quot;_blank&quot;&gt;psql, Paste, Perl: Pefficiency!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dimitri Fontaine - &lt;a href=&quot;http://blog.tapoueh.org/blog.dim.html#%20Import%20fixed%20width%20data%20with%20pgloader&quot; target=&quot;_blank&quot;&gt;Import fixed width data with pgloader&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/157-Import-fixed-width-data-into-PostgreSQL-with-just-PSQL.html#extended&quot;&gt;Continue reading &quot;Import fixed width data into PostgreSQL with just PSQL&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 23 Apr 2010 17:38:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/157-guid.html</guid>
    
</item>
<item>
    <title>Regular Expressions in PostgreSQL</title>
    <link>http://www.postgresonline.com/journal/archives/152-Regular-Expressions-in-PostgreSQL.html</link>
            <category>8.4</category>
            <category>beginner</category>
            <category>q&amp;a</category>
    
    <comments>http://www.postgresonline.com/journal/archives/152-Regular-Expressions-in-PostgreSQL.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=152</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Every programmer should embrace and use &lt;a href=&quot;http://en.wikipedia.org/wiki/Regular_expression&quot; target=&quot;_blank&quot;&gt;regular expressions&lt;/a&gt; (INCLUDING Database programmers).
There are many places where regular expressions can be used to reduce a 20 line piece of code into a 
1 liner.  Why write 20 lines of code when you can write 1.&lt;/p&gt;

&lt;p&gt;Regular expressions are a domain language just like SQL.  Just like SQL they are embedded in many places.  You have them in your program editor.  
You see it in sed, grep, perl, PHP, Python, VB.NET, C#,
in ASP.NET validators and javascript for checking correctness of input.  You have them in PostgreSQL as well where
you can use them in SQL statements, domain definitions and check constraints. You can mix
regular expressions with SQL. When you mix the two domain languages, you can do enchanting things with a flip of a wrist that
would amaze your less informed friends. Embrace the power of domain languages and mix it up.  PostgreSQL
makes that much easier than any other DBMS we can think of.&lt;/p&gt;
&lt;p&gt;For more details on using regular expressions in PostgreSQL, check out the manual pages &lt;a href=&quot;http://www.postgresql.org/docs/current/static/functions-matching.html&quot; target=&quot;_blank&quot;&gt;Pattern Matching in PostgreSQL&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The problem with regular expressions is that they are slightly different depending on what language environment you are
running them in. Different enough to be frustrating.  We&#039;ll just focus on their use in PostgreSQL, though these lessons 
are applicable to other environments.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/152-Regular-Expressions-in-PostgreSQL.html#extended&quot;&gt;Continue reading &quot;Regular Expressions in PostgreSQL&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 14 Feb 2010 11:43:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/152-guid.html</guid>
    <category>regex</category>
<category>regular expressions</category>
<category>string matching</category>

</item>
<item>
    <title>Making backups of select tables</title>
    <link>http://www.postgresonline.com/journal/archives/150-Making-backups-of-select-tables.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>9.0</category>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>http://www.postgresonline.com/journal/archives/150-Making-backups-of-select-tables.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=150</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Every once in a while, especially if you have a fairly large database, you may find the need to do select backups of certain tables.
Your criteria might be based on name or how relatively recently data has changed in the table.  
Below are some of the tricks we use.  Some use our favorite hack of scripting command line scripts with SQL.
&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/150-Making-backups-of-select-tables.html#extended&quot;&gt;Continue reading &quot;Making backups of select tables&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 21 Jan 2010 00:55:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/150-guid.html</guid>
    
</item>
<item>
    <title>PgAdmin III Plug-in Registration: PostGIS Shapefile and DBF Loader</title>
    <link>http://www.postgresonline.com/journal/archives/145-PgAdmin-III-Plug-in-Registration-PostGIS-Shapefile-and-DBF-Loader.html</link>
            <category>beginner</category>
            <category>contrib spotlight</category>
            <category>pgadmin</category>
            <category>postgis</category>
    
    <comments>http://www.postgresonline.com/journal/archives/145-PgAdmin-III-Plug-in-Registration-PostGIS-Shapefile-and-DBF-Loader.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=145</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;PgAdmin 1.9+ has a simple Plug-In architecture which makes it relatively simple to introduce new plugins. It is pretty much all controlled by the file &lt;em&gt;plugins.ini&lt;/em&gt;. In that file you can register any executable you want in there.  If you want the executable to get passed database configuration settings, there is an option for that and you just have to build your executable to accept commandline switches.&lt;/p&gt;

&lt;p&gt;You can download the windows version from &lt;a href=&quot;http://www.postgis.org/download/windows/experimental.php&quot; target=&quot;_blank&quot;&gt;http://www.postgis.org/download/windows/experimental.php&lt;/a&gt;. If you just want it without the PostGIS 1.5 binaries -- just download the one labeled &lt;em&gt;PostGIS ESRI Shapefile GUI&lt;/em&gt;.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/145-PgAdmin-III-Plug-in-Registration-PostGIS-Shapefile-and-DBF-Loader.html#extended&quot;&gt;Continue reading &quot;PgAdmin III Plug-in Registration: PostGIS Shapefile and DBF Loader&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 24 Dec 2009 14:19:16 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/145-guid.html</guid>
    <category>pgadmin</category>

</item>
<item>
    <title>An almost idiot's guide to Install and Upgrade to PostgreSQL 8.4 with Yum</title>
    <link>http://www.postgresonline.com/journal/archives/144-An-almost-idiots-guide-to-Install-and-Upgrade-to-PostgreSQL-8.4-with-Yum.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>basics</category>
            <category>beginner</category>
            <category>yum</category>
    
    <comments>http://www.postgresonline.com/journal/archives/144-An-almost-idiots-guide-to-Install-and-Upgrade-to-PostgreSQL-8.4-with-Yum.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=144</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;In this exercise, we&#039;ll go thru our steps for upgrading a Redhat Enterprise Linux 64-bit PostgreSQL
box from PostgreSQL 8.3 to PostgreSQL 8.4.  If you don&#039;t have any kind of PostgreSQL installed on your box,
you can skip the Upgrade step.&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;color:green&quot;&gt;UPDATE - since Devrim&#039;s move from Command prompt - he has started a new yum repository.  You may want to use
this one instead since it seems more up to date than the other. &lt;a href=&quot;http://yum.pgrpms.org/&quot; target=&quot;_blank&quot;&gt;http://yum.pgrpms.org/&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;

&lt;h4&gt;Updgrading from PostgreSQL 8.* to PostgreSQL 8.4&lt;/h4&gt;
&lt;p&gt;If you are starting from scratch -- just skip this section.&lt;/p&gt;
&lt;p&gt;If you are upgrading from 8.4.0 to 8.4.1 you can get away with a simple &lt;br /&gt;&lt;code&gt;yum update postgresql&lt;/code&gt;&lt;br /&gt; and skip the rest of this article.&lt;/p&gt;
&lt;p&gt;If you are upgrading from PostgreSQL 8.3 to 8.4, in theory you can use PgMigrator, but in practice,
particularly with a Yum install, you are bound to run into obstacles. If you are running an older version, you must dump and restore.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/144-An-almost-idiots-guide-to-Install-and-Upgrade-to-PostgreSQL-8.4-with-Yum.html#extended&quot;&gt;Continue reading &quot;An almost idiot&#039;s guide to Install and Upgrade to PostgreSQL 8.4 with Yum&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 28 Nov 2009 04:48:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/144-guid.html</guid>
    
</item>
<item>
    <title>Lowercasing table and column names</title>
    <link>http://www.postgresonline.com/journal/archives/141-Lowercasing-table-and-column-names.html</link>
            <category>8.2</category>
            <category>8.3</category>
            <category>8.4</category>
            <category>basics</category>
            <category>beginner</category>
    
    <comments>http://www.postgresonline.com/journal/archives/141-Lowercasing-table-and-column-names.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=141</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;This is an unfortunate predicament that many people find themselves in and does cause a bit of frustration. You bring in some tables into your PostgreSQL
database using some column name preserving application, and the casings are all preserved from the source data store.  So now you have to quote all the fields 
everytime you need to use them.  In these cases, we usually rename the columns to be all lower case using a script.  There are two approaches we have seen/can think of for doing this
one to run a script that generates the appropriate alter table statements and the other is to update the pg_attribute system catalog table directly. &lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/141-Lowercasing-table-and-column-names.html#extended&quot;&gt;Continue reading &quot;Lowercasing table and column names&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 26 Oct 2009 02:44:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/141-guid.html</guid>
    
</item>
<item>
    <title>Enable and Disable Vacuum per table</title>
    <link>http://www.postgresonline.com/journal/archives/139-Enable-and-Disable-Vacuum-per-table.html</link>
            <category>8.4</category>
            <category>beginner</category>
            <category>q&amp;a</category>
    
    <comments>http://www.postgresonline.com/journal/archives/139-Enable-and-Disable-Vacuum-per-table.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=139</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;Vacuuming and analyzing is the process that removes dead rows and also updates the statistics of a table.
As of PostgreSQL 8.3, auto vacuuming (the process that runs around cleaning up tables), is on by default.  If you are
creating a lot of tables and bulk loading data, the vacuumer sometimes gets in your way.  One way to get around that is to
disable auto vacuuming on the tables you are currently working on and then reenable afterward.  
You can also do this from the PgAdmin III management console.
&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/139-Enable-and-Disable-Vacuum-per-table.html#extended&quot;&gt;Continue reading &quot;Enable and Disable Vacuum per table&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 21 Oct 2009 00:31:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/139-guid.html</guid>
    
</item>
<item>
    <title>Terminating Annoying Back Ends</title>
    <link>http://www.postgresonline.com/journal/archives/134-Terminating-Annoying-Back-Ends.html</link>
            <category>8.4</category>
            <category>beginner</category>
            <category>q&amp;a</category>
    
    <comments>http://www.postgresonline.com/journal/archives/134-Terminating-Annoying-Back-Ends.html#comments</comments>
    <wfw:comment>http://www.postgresonline.com/journal/wfwcomment.php?cid=134</wfw:comment>

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

    <author>nospam@example.com (Leo Hsu and Regina Obe)</author>
    <content:encoded>
    &lt;p&gt;One of the small little treats provided in PostgreSQL 8.4 is the new &lt;b&gt;pg_terminate_backend&lt;/b&gt; function.  In the
past when we wanted to kill runaway postgresql queries issued by a database or user or hmm us, we would call the pg_cancel_backend function.
The problem with that is it would simply cancel the query in the backend process, but often times the offending application would simply launch the same query again.&lt;p&gt;

&lt;p&gt;In PostgreSQL 8.4 a new function was introduced called &lt;b&gt;pg_terminate_backend&lt;/b&gt;.  This doesn&#039;t completely replace pg_cancel_backend, but basically does
what you do when you go into say a Windows Task manager and kill the offending postgres process or on Linux, you call a kill command on a postgres process.  Its nicer
in the sense that you can do it all within PostgreSQL and you can use the pg_stat_activity query to help you out a bit.  Also you don&#039;t run the risk as easily of
killing the root postgres process and killing the postgres service all together.
&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.postgresonline.com/journal/archives/134-Terminating-Annoying-Back-Ends.html#extended&quot;&gt;Continue reading &quot;Terminating Annoying Back Ends&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 09 Sep 2009 20:47:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.postgresonline.com/journal/archives/134-guid.html</guid>
    
</item>

</channel>
</rss>