title: What data type can I use for very large text fields that is database agnostic?
body: <p>In my Rails app, I want to store the geographical bounds of places column fields in a database. E.g., the boundary of New York is represented as a polygon: an array of arrays. </p>
  
  <p>I have declared my model to serialize the polygons, but I am unsure whether I should even store them like this. The size of these serialized polygons easily exceed 100,000 characters, and MySQL only can store about <a href="https://stackoverflow.com/questions/2266830/why-is-rails-trucating-text-column-to-65535-chars">65000 characters</a> in a standard TEXT field. </p>
  
  <p>Now I know MySQL also has a LONGTEXT field. But I really want my app to be database-agnostic. How does Rails handle this by itself? Will it switch automatically to LONGTEXT fields? What about when I start using PostgreSQL?</p>