title: Why does this :id in Rails not work with Postgresql but it does work with MySQL?
body: <p>I am using this method for search engine friendly URLs in Rails - <a href="http://jroller.com/obie/entry/seo_optimization_of_urls_in" rel="nofollow">http://jroller.com/obie/entry/seo_optimization_of_urls_in</a></p>
  
  <p>My model looks like this.</p>
  
  <pre><code>class Listing &lt; ActiveRecord::Base
    def to_param
      "#{id}-#{title.parameterize}"
    end
  end
  </code></pre>
  
  <p>This works with MySQL but not Postgresql.</p>
  
  <p>This is the error I get:</p>
  
  <p>ActiveRecord::StatementInvalid (PGError: ERROR:  invalid input syntax for integer: "16-    college-station-apartments"
  : SELECT * FROM "floorplans" WHERE ("floorplans"."listing_id" = E'16-college-station-apartments')  ORDER BY beds ASC, baths ASC, footage ASC, price ASC):</p>
  
  <p>Is ActiveRecord not doing a .to_i on the find for Postgresql?</p>