[OSM-dev] Field lengths in Rails port

Tom Hughes tom at compton.nu
Wed Jun 30 09:03:12 BST 2010


On 30/06/10 08:39, Frederik Ramm wrote:

> looking at the migrations I find that integer database fields are
> created with wildly different "limits":
>
> For example, ID columns are created with :limit=>64 whereas e.g. the
> version number has :limit=>11.
>
> Is this all basically disregarded, and all boils down to 4-byte signed
> integers, or what?

They're largely ignored, yes. They would make a difference for values 
created with an SQL type of NUMERIC but an SQL type of INTEGER is always 
4 bytes regardless of the specified limit.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/




More information about the dev mailing list