Rails on PostgreSQL : http://railsonpostgresql.com/articles.rss en-us 40 <h3>If you like Ruby on Rails, you'll love Rails on PostgreSQL!</h3> Intro to PostGIS <p>If you are planning on building a Rails application that uses spatial data in any way, then you owe it to yourself to take the time to investigate Postgis. Out of the box you&#8217;ll be able to perform an array of powerful functions on your spatial data: from bounding boxes and distance queries to polygon area calculations.</p> <h2>Installation</h2> <p>I won&#8217;t go into setup in too much detail, under most linux distributions postgis is a simple package install, it&#8217;s in macports if you&#8217;re a mac user, so either way installation shouldn&#8217;t be too hard. For integration with rails I recommend the GeoRuby gem and spatial_adapter. From the docs: &#8220;GeoRuby provides data types intended to hold data returned from PostGIS&#8230;&#8221;. spatial adapter is a rails plugin that extends ActiveRecord so that it understands geometric columns, transparently converting them to subclasses of the GeoRuby::Geometry class, supporting geometry columns in migrations, etc. spatial_adapter is hosted on github: http://github.com/fragility/spatial_adapter.</p> <h2>Data Storage</h2> <p>Postgis supports <a href="http://postgis.refractions.net/documentation/manual-1.3/ch04.html#RefObject">lots</a> of datatypes. For the purpose of this blog post we&#8217;ll focus on just using points, all other datatypes are composed of points and most of the concepts are easily applied to the other datatypes. Points are made up of at least three points of data: x, y, and Spatial Reference System Identifier (SRID). <a href="http://en.wikipedia.org/wiki/SRID">SRIDs</a> are used to describe the coordinate system used by the point. My gis background is poor so I&#8217;ll just suggest that if you are planning on working in lat/long values, SRID 4269 is probably the right choice for you (or maybe 4326, see the comments). The one downside of using lat/long data is it makes distance queries more difficult, 1 degree isn&#8217;t a fixed number of meters so you can&#8217;t directly ask the database for all rows within 100 meters of a given point, or at least not without having the database run a sequential scan of all rows. If people are interested in distance queries I&#8217;m happy to write about the subject.</p> <h2>Queries</h2> <p>The most basic query is the bounding box - which geometries lay within the given box? It is defined in postgis as <code>&&</code> and is able to use spatial indexes directly so is very fast. Beyond that most queries take the form of a function and are well documented in the <a href="http://postgis.refractions.net/documentation/">PostGIS documentation</a>, but enough talk - let&#8217;s start an example.</p> <h2>Example</h2> <p>Let&#8217;s assume we have a table of restaurants that we want to display on a map. First let&#8217;s add a geometry column to the restaurants table, with spatial_adapter it is a simple migration:</p> <p><code> add_column :restaurants, :the_geom, :point, :srid => 4269<br /> add_index :restaurants, :the_geom, :spatial => true </code> </p> <p>If you open up a psql console and look at the table definition you will see that this adds the column the_geom with the type the_geom as well as adding three new table constraints: srid=4269, number of dimensions is 2 (postgis supports more), and the geometry type is a point. Handy! You can see we&#8217;ve also added an index, spatial_adapter adds the :spatial option to indexes to specify simplify the creation of spatial indexes.</p> <p>Now to add points let&#8217;s open up a console and add geometry data to our restaurants:</p> <p><code> r = Resaurant.first r.the_geom = Point.from_x_y(-122.39, 47.5123, 4269) r.save! </code> </p> <p>Of course in real life you aren&#8217;t going to just make up data, you&#8217;ll likely want to use a geocoding service like <a href="http://code.google.com/apis/maps/documentation/geocoding/">google&#8217;s geocoding api</a> to determine the correct lat/long information. You&#8217;ll probably also want to store your chosen SRID in a constant somewhere, but now I&#8217;m nitpicking - let&#8217;s looks query our new data.</p> <p><code> Restaurant.first(:conditions => ["the_geom &amp;&amp; ?", Polygon.from_coordinates([[[x_min, y_min], [x_min, y_max], [x_max, y_max], [x_max, y_min], [x_min, y_min]]], 4269)]) </code></p> <p>Simple! Hope this helps show the basics of using PostGIS with rails. This post just barely scrapes the surface, luckily PostGIS and GeoRuby have excellent documentation, but if you have any more questions don&#8217;t hesitate to ask in the comments and I&#8217;ll try and help.</p> <p style="font-size: 10px">Doug Cole is the CTO of <a href="http://www.estately.com">www.estately.com</a> a real estate search website. Interested in working with Estately? <a href="http://www.estately.com/about/contact_us">Let us know!</a> </p> Thu, 05 Nov 2009 01:25:00 -0600 urn:uuid:b771c611-379d-4fcd-b598-075bf7c5ffa6 http://railsonpostgresql.com/2009/11/05/intro-to-postgis#comments http://railsonpostgresql.com/2009/11/05/intro-to-postgis Rails and PostgreSQL job in Honolulu <p>Saw this advertisement for a <a href="http://telecommutejoblist.com/ruby-rails-developer-honolulu">Ruby/Rails/PostgreSQL job in Honolulu</a> today. It's for <a href="http://eggup.com/">eggup.com</a>, which unfortunately is completely protected by a HTTP basic authentication challenge. First thing to do if you get that job - put up a <a href="http://line25.com/articles/tips-for-designing-an-awesome-coming-soon-page">nice "coming soon" page</a>!</p> Tue, 03 Nov 2009 18:20:00 -0600 urn:uuid:437c4183-85ee-4c37-a159-3a9be7599449 http://railsonpostgresql.com/2009/11/03/rails-and-postgresql-job-in-honolulu#comments http://railsonpostgresql.com/2009/11/03/rails-and-postgresql-job-in-honolulu RailsOnPg by Alexander Tretyakov <p>Thanks to <a href="http://www.robbyonrails.com/articles/2009/10/21/railsonpg-released">Robby on Rails</a> I heard about Alexander Tretyakov's interesting <a href="http://github.com/alex3t/rails_on_pg">RailsOnPg</a> plugin. This plugin makes it a bit easier to create PostgreSQL functions, triggers, views, and foreign keys by providing a nicer front end to calls to <code>ActiveRecord::Base.connection.execute</code>.</p> <p>For example, here's a migration to add a foreign key to a <code>Comment</code> model that belongs to a <code>User</code>:</p> <pre> class AddForeignKeyFromCommentsToUsers < ActiveRecord::Migration def self.up add_foreign_key :comments, :user_id, :users end def self.down remove_foreign_key :comments, :user_id, :users end end </pre> <p>This results in the following SQL:</p> <pre> ALTER TABLE comments ADD CONSTRAINT fk_comments_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE NO ACTION ON DELETE NO ACTION </pre> <p>As you can see, this provides some sensible defaults and a consistent naming scheme so that you can reliably roll back a migration that created a foreign key.</p> <p>I ran into some problems when creating a function; my migration failed with a <code>PGError</code>. Turns out that the plugin attempts to execute <code>CREATE LANGUAGE plpgsql</code> before it creates a function; in my case that language was already in place. I commented out line 16 of <code>railsonpg/lib/functions.rb</code> (the call to <code>setlang</code>) and everything worked fine. It looks like this need for a <code>CREATE LANGUAGE IF NOT EXISTS</code> (or something) has <a href="http://andreas.scherbaum.la/blog/archives/346-create-language-if-not-exist.html">come up before</a>, but I'm not sure what the status is. I'm using PostgreSQL 8.4.1 and that statement doesn't seem to be supported.</p> <p>At any rate, this looks like a handy plugin that could remove a lot of raw SQL from your migrations. Good stuff!</p> Fri, 23 Oct 2009 00:39:00 -0500 urn:uuid:fc00f839-ddd0-4e2f-a214-dbc6f1a6dc46 http://railsonpostgresql.com/2009/10/23/railsonpg-by-alexander-tretyakov#comments http://railsonpostgresql.com/2009/10/23/railsonpg-by-alexander-tretyakov PGConf West 2007 video - Best Practices with Rails and PostgreSQL <p>This is kind of a blast from the past - it's a talk by Bricolage lead developer <a href="http://kineticode.com/">David Wheeler</a> at PostgreSQL Conference West 2007. It's mainly an introduction to Rails, but David's a real PostgreSQL guru (and had a <A href="http://getsatisfaction.com/iwantsandy/topics/a_fork_in_the_road_an_important_announcement_about_i_want_sandy">Rails app</a> that was bought by Twitter) and thus brings out some interesting points. Here are some highlights from an initial listen:</p> <ul> <li>Some basics on Rails competitors and philosophy. Someone in the audience mentions Grails.</li> <br/> <li>ActiveRecord validations and callbacks. A few minutes on ActionView and ActionController</li> <br/> <li>Migrations. This was prior to timestamped migrations, so he talks about numbered migrations. Discusses creating indexes, the lack of built support for views. Suggests using <code>ActiveRecord::Base.connection.execute</code> to just run raw SQL as necessary. Shows an example that uses <code>SET DEFAULT CURRENT TIMESTAMP</code>.</li> <br/> <li>Talks about the <a href="http://araddconstraint.rubyforge.org/">araddconstraint</a> plugin. Probably <a href="http://github.com/matthuhiggins/foreigner">foreigner</a> (as mentioned on <a href="http://ruby5.envylabs.com/episodes/11-episode-10-september-15-2009">Ruby5</a>) is the current leader for adding foreign key constraints, although I haven't used it. Looks good though.</li> <br/> <li>Demonstrates a class-level finder that uses PostgreSQL-specific SQL - specifically, the <code>LOWER</code> function. This talk predates <code>named_scope</code>, so, there ya go.</li> <br/> <li>At around 28:00 he notes problem with using Slony and migrations - e.g., how do you get to the SQL so you can send it off to your Slony instance? In his case they just stopped using Slony and went to a warm standby, probably with WAL shipping.</li> <br/> <li>Talks about loading large data sets using <code>COPY</code>. I've found that this is the right way to get lots of data in a PostgreSQL database as well. Don't waste time using models for stuff like that.</li> <br/> <li>Discusses skinny controllers and fat models.</li> <br/> <li>At 32:30 talks about associations and some ActiveRecord conventions. <code>has_many :through</code> was new stuff then, I think; he uses <code>has_and_belongs_to_many</code> in the example.</li> <br/> <li>At 40:00 he talks about <code>created_at</code> and <code>updated_at</code> and time zones. He suggests that you always stores times in UTC, which is pretty standard. I think some of the possible complexities here are now built in to Rails, but I'm not sure.</li> <br/> <li>At 44:30 he talks about reopening classes. This seems to be a new topic for the audience and he gets some pushback. Someone refers to it as "Ruby's GOTO." The class he reopens is the PostgreSQLAdapter; he plugs in his own version of <code>quoted_date</code>.</li> <br/> <li>Around 50:00 he asks if someone could please update the PostgreSQL driver. Jeff Davis is in the audience and responds to him about the updates he's doing. Today this has all been taken care of as I noted in a previous post on <a href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers">Ruby PostgreSQL drivers.</a></li> <br/> </ul> <p>It's a nice presentation in front of a small group, with a nice feel to it. The audio quality is decent, although the slides are a little hard to read. Also, thanks to David for the nice email regarding this post. Enjoy!</p> Tue, 29 Sep 2009 00:20:00 -0500 urn:uuid:574b0885-ebe4-4ad3-aec3-d4d1535937ef http://railsonpostgresql.com/2009/09/29/pgconf-west-2007-video-best-practices-with-rails-and-postgresql#comments http://railsonpostgresql.com/2009/09/29/pgconf-west-2007-video-best-practices-with-rails-and-postgresql Rails and PostgreSQL job in Denver <p>Just noticed this <a href="http://jobs.rubynow.com/jobs/show/3047">job posting</a> about an opening at <a href="http://www.zerista.com/">Zerista</a>. It asks for Rails and PostgreSQL experience, thus the mention here. The person to contact is <a href="http://cfis.savagexi.com/">Charlie Savage</a>, who's done great work on improving the libxml-ruby gem. So you'd be working with smart folks.</p> <p>I googled around and didn't find any tech interviews or videos or whatever... if someone from Zerista is reading this and wants to share information about how you're using Rails and PostgreSQL in interesting ways, please post a comment or <a href="mailto:tom@infoether.com">contact me</a>! </p> Tue, 22 Sep 2009 16:19:00 -0500 urn:uuid:dd9c05a7-d48c-44bc-9ef6-90ff7f5247ef http://railsonpostgresql.com/2009/09/22/rails-and-postgresql-job-in-denver#comments http://railsonpostgresql.com/2009/09/22/rails-and-postgresql-job-in-denver Rails apps using PostgreSQL in production <p>Occasionally I see a job description or interview where someone will mention that they're using PostgreSQL + Rails in production for some big application. I'd like to do more detailed writeups on these... but here are some that I've seen:</p> <ul> <li>Ryan Heneise writes in to say that <a href="http://www.donortools.com">Donor Tools</a> runs on PostgreSQL.</li> <br/> <li>Doug Cole wrote in to confirm that the nifty real estate service <a href="http://estately.com/">estately.com</a> runs on Rails + PostgreSQL. They use PostgreSQL full text search and PostGIS. Doug also noted that (as of 9/21/09) they're hiring developers, so, <a href="http://www.estately.com/about/contact_us">give them a holler</a> if you're looking. You can also see a nifty <a href="http://video.google.com/videoplay?docid=2369592324539274058&hl=en#">PostGIS presentation</a> they did at Seattle Tech Startups.</li> <br/> <li>Mark Tremblay adds <a href="http://screenlight.tv/">screenlight.tv</a> to the list.</li> <br/> <li>Nathen Harvey writes in that <a href="http:///visualcv.com/">VisualCV</a> is a Rails + PostgreSQL app.</li> <br/> <li><a href="http://blog.segment7.net/">Eric Hodel</a> says that he's using Rails + PostgreSQL on <a href="http://rubypan.org">rubypan.org</a>. He uses PostgreSQL FTE via the <a href="http://rubyforge.org/projects/texticle/">texticle</a> gem.</li> <br/> <li>This <a href="http://technews.am/conversations/joel-on-software-jobs/software_engineer_messaging_architect_at_yammer_inc_san_francisco_ca_">job advertisement</a> indicates that <a href="https://www.yammer.com/">Yammer</a> is using Rails with PostgreSQL. From that advertisement, they're also using PostgreSQL's full text search.</li> <br/> <li><a href="http://heroku.com/">Heroku</a> provides each Rails app with <a href="http://docs.heroku.com/database">a PostgreSQL database</a>. I've googled all over for more information but haven't dug up any other interesting details, although I bet there's some neat stuff going on there.</li> </ul> <p>That's all that come to mind at the moment. If anyone has more details on any of these, or more examples, please let me know - would be great to have some more detailed information!</p> Thu, 17 Sep 2009 15:58:00 -0500 urn:uuid:1fb47337-a60f-4316-8006-53994d9720ef http://railsonpostgresql.com/2009/09/17/rails-apps-using-postgresql-in-production#comments http://railsonpostgresql.com/2009/09/17/rails-apps-using-postgresql-in-production Rails, PostgreSQL, and database drivers <p>There are a variety of database drivers available for getting a Rails app to talk to PostgreSQL. The <a href="http://wiki.rubyonrails.org/database-support/postgres">Rails wiki</a> has an excellent overview of the various drivers and their freshness. Here's a summary:</p> <ul> <li><code>gem install postgres-pr</code>: This gets you the pure Ruby driver - e.g., no native code. Thus it is slow. It's useful if you don't have a native PostgreSQL client, though. I actually use this on RubyForge - I didn't know any better when I first wrote code using it and now I need to go back and remove it.</li> <br/> <li><code>gem install postgres</code>: This gets you a native driver, but it's over 18 months old. Don't use it. If you are already using it, however, it looks like PostgreSQL guru <a href="http://thoughts.j-davis.com/">Jeff Davis</a> is doing bugfixes as necessary. So, you could do worse.</li> <br/> <li><code>gem install pg</code>: This is the one! This gets you a native driver that's actively being maintained. It's a complete rewrite of the <code>postgres</code> driver and is the way to go.</li> <br/> <li><code>gem install activerecord-jdbcpostgresql-adapter</code>: I haven't used this, but Simon Tokumine <a href="http://www.tokumine.com/2009/09/03/jruby-postgres-rails/">recommends</a> using this gem if you're using JRuby with Rails and PostgreSQL. From the <a href="http://kenai.com/projects/activerecord-jdbc/">ActiveRecord-JDBC project site</a>, this gem "[...] allows use of virtually any JDBC-compliant database with your JRuby on Rails application". Sounds like a winner.</li> </ul> <p>Here's an edge case I ran into recently. I had a Rails 2.0.2 application in production, and ActiveRecord 2.0.2 does a <code>require _library_or_gem 'postgres'</code> in <code>activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb</code>, so it won't work with the <code>pg</code> gem. If you're stuck on Rails 2.0.2 for some reason you'll need to go with either <code>postgres</code> or <code>postgres-pr</code>. You could try hacking the adapter to work with <code>pg</code>, but I went down that road, made three or four changes, kept getting errors, and decided it was just simpler to use one of the older gems. I'd be interested in hearing from anyone who's modified that version of the adapter to use the new driver... although the better path is probably just to upgrade the application to use a newer version of Rails.</p> <p>Also, for folks upgrading to Snow Leopard, here's a helpful post on <a href="http://blog.programmanstalt.de/articles/rails-postgres-snow-leopard-and-64bit-a-word-of-warning/">the pg gem and ARCHFLAGS</a> from Jan.</p> <p>To underscore my recommendation to use the <code>pg</code> gem, here's a quote from that project's <code>README</code>:</p> <blockquote> The 'pg' module is the newer module, that has been greatly improved, and is almost a complete rewrite. It is not backwards compatible. Use this module for newly written code. It should be more stable, less buggy, and has more features. </blockquote> <p>Indeed.</p> <p>I poked around the code of <code>pg</code> and <code>postgres</code> to see the differences. It looks like a lot of cleaning up has happened. For one example, the <code>PQfreemem</code> function that <code>libpq</code> provides isn't being used in <code>pg</code> since, per line 27 of <code>pg.c</code>, "[it's] unnecessary: copied to ruby object, then freed. Ruby object's memory is freed when it is garbage collected." A quick <code>grep</code> around the <code>postgres</code> gem shows a bunch of occurrences of that function - it was even embedded in a preprocessor directive to make it easier to use.</p> <p>So, to sum up, <code>gem install pg</code>. Thanks to Jeff for his work on this!</p> Fri, 04 Sep 2009 14:19:00 -0500 urn:uuid:a781d56d-5a5d-4e24-9f6a-02a8b4c820fd http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers#comments http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers SF PUG video - PostgreSQL for high performance Rails apps <p>Here's a video from a few months ago - a talk given by <a href="http://www.linkedin.com/pub/gleb-arshinov/2/920/548">Gleb Arshinov</a> (CEO of <a href="http://www.acunote.com/pluron">Pluron</a>) on June 9 2009 at the San Francisco PostgreSQL User's Group entitled "PostgreSQL as a Secret Weapon for High-Performance Ruby on Rails Applications". Here's the link to the <a href="http://media.postgresql.org/sfpug/sfpug-rails-20090609.mov">mov file</a>, and here are <a href="http://wiki.postgresql.org/wiki/SFPUG">all the SFPUG videos</a>. Note that the video file is 409 MB; I'm asking around to see if there's a version uploaded to YouTube or something.</p> <p>Some notes on the presentation:</p> <ul> <li>Pluron makes Acunote, an Agile project management app. They have 4K customers (some at EngineYard, some internal). They use nginx+mongrel.</li> <li>Have used PostgreSQL from day one for their app.</li> <li>PostgreSQL has good SQL standard compliance, good documentation.</li> <li>Noted that PostgreSQL doesn't support bulk update (e.g., ON DUPLICATE KEY UPDATE). A good discussion here around the 21:00 about possible solutions and problems with race conditions and such. The slide has some text about replication but unfortunately he doesn't talk about that.</li> <li>Mentions Acunote's <a href="http://github.com/acunote/virtual_attributes/tree/master">virtual attributes plugin</a></li> <li>Discusses their treatment of tree structures around 33:40.</li> <li>Talks about pagination at 37:00.</li> <li>Talks about their search language at 42:00. As far as I could tell they're not using Sphinx or any external search tool... not sure if they're using PostgreSQL full text search or not.</li> <li>Around 46:00 discusses using <code>any(array())</code> vs <code>in()</code>. Interesting if you don't mind going database-specific in your Rails app.</li> <li>At 1:03:00 suggests using SQL DDL via Rails DDL DSL (e.g., <code>CREATE TABLE</code> vs <code>create_table</code>). Same for using SQL to do data changes in migrations. I've found that this is a good idea as well, especially when dealing with larger data sets.</li> <li>Recommends using foreign key constraints - but using them to protect data integrity, not to implement business logic.</li> </ul> <p>A great presentation with some good technical content... highly recommended!</p> Fri, 28 Aug 2009 08:07:00 -0500 urn:uuid:a5045615-884e-42a2-aeb0-df6febad53e2 http://railsonpostgresql.com/2009/08/28/sf-pug-video-postgresql-for-high-performance-rails-apps#comments http://railsonpostgresql.com/trackbacks?article_id=7 http://railsonpostgresql.com/2009/08/28/sf-pug-video-postgresql-for-high-performance-rails-apps SD RUG video - PostgreSQL, MySQL, and Rails <p>I recently came across a video presentation from the San Diego Ruby User's Group from Oct 2008. This video features <a href="http://www.bestechvideos.com/2008/10/13/sd-rb-episode-055-mysql-postgres-and-rails">Guyren Howe</a> extolling the virtues of using Rails with PostgreSQL vs MySQL. He hits on a bunch of different topics, including:</p> <ul> <li>PostgreSQL has a bunch of features MySQL doesn't have - advanced rules/stored procedures/rules, a genetic query optimizer, excellent Oracle compatibility.</li> <li>PostgreSQL tends to outperform MySQL. He cites a variety of benchmarks including some that were run on 12-way boxes at Sun.</li> <li>PostgreSQL has a clear and liberal license, MySQL's license has all sorts of GPL mixed in it. If he were to give this presentation now I daresay he'd add the fact that Oracle now owns MySQL AB (via Sun) to the mix. Lively times there.</li> </ul> <p>The presentation is a little out of date - he's comparing PostgreSQL 8.2 with MySQL 5 - but the main points of the presentation are right on target. Also, it would have been nice if there had been more Rails-specific content, but as he said, Rails tends to abstract away the database, so there's not much room for maneuvering there.</p> <p>If you just want to see the slides, <a href="http://www.slideshare.net/gisborne/postgres-presentation-presentation">they're here</a>. Enjoy!</p> Fri, 21 Aug 2009 20:18:00 -0500 urn:uuid:3d20cff4-b06c-4eb5-9168-7befe5c60428 http://railsonpostgresql.com/2009/08/21/san-diego-rug-video-postgresql-mysql-and-rails#comments http://railsonpostgresql.com/trackbacks?article_id=6 http://railsonpostgresql.com/2009/08/21/san-diego-rug-video-postgresql-mysql-and-rails EnterpriseDB interviews Robby Russell <p>I came across a Rails+PostgreSQL interview from last year - this is Bob Zurek of EnterpriseDB <a href="http://www.enterprisedb.com/learning/dbr_russell.do">talking to Robby Russell</a> about <a href="http://planetargon.com/">Planet Argon</a>, Rails, PostgreSQL, and all that. There's a transcript there as well if you're in a hurry.</p> <p>Generally speaking, Robby Russell is a big name in the Rails+PostgreSQL space. As Bob Zurek notes in the interview, if you Google up <a href="http://www.google.com/search?hl=en&as_q=rails+postgresql&as_epq=&as_oq=&as_eq=&num=100&lr=&as_filetype=&ft=i&as_sitesearch=&as_qdr=all&as_rights=&as_occt=any&cr=&as_nlo=&as_nhi=&safe=images">rails postgresql</a> the first half dozen links or so point over to Robby's blog, <a href="http://robbyonrails.com/">Robby on Rails</a>. You can see all his PostgreSQL related posts via the <a href="http://www.robbyonrails.com/articles/tag/postgresql">'postgresql' tag</a>; lots of good stuff there.</p> Wed, 19 Aug 2009 15:38:00 -0500 urn:uuid:f3f18218-be3d-4bca-bb4a-5a45cd74d199 http://railsonpostgresql.com/2009/08/19/enterprisedb-interviews-robby-russell#comments http://railsonpostgresql.com/trackbacks?article_id=5 http://railsonpostgresql.com/2009/08/19/enterprisedb-interviews-robby-russell