I have a rails (~4.2.3) blogging platform app on postgres (~9.4.0.1), where the title of a post is a string. I want to allow the blog administrator to specify the minimum and maximum length of the title for their blog, so I have title_min_length and title_max_length properties. I want to provide flexible defaults for these two values. min_length could, of course be 1. For the max_length, I would like to allow whatever is the minimum guaranteed maximum length for a string field in this stack (rails + postgres). What should that value be, given the real limit is the available memory?
According to this answer on SO, there is no limit in Postgres. Also, according to this other answer, as of rails ~4, the ActiveRecord string size limit of 255 has been removed, and a string can be arbitrarily long.
Given that, what is a reasonable maximum length limit to specify as a default? I do not want to artificially restrict the user by picking too short a length.