I'm trying to add an Integer as a new field to Users. Have installed the Number module and added a field type 'Integer' with a maximum value of 999999999999999999. But when I edit a user the field has a max length of 10. Is there a way to edit this?
-
1This is not a Drupal issue. en.wikipedia.org/wiki/Integer_%28computer_science%29– TriskelionApr 2, 2013 at 11:53
-
1It is a Drupal issue because for all the questioner knows Drupal might use some big integer storage under the hood. But indeed, it doesn't.– Alfred ArmstrongApr 2, 2013 at 13:30
-
@ Alfred Armstrong - no it's MAXINT. Now they know better and will not continue to look for an answer where there is none. The answer provided by user11153 failed to explain why the maximum existed.– TriskelionApr 2, 2013 at 13:56
-
1@user11153 - Your answer was clear enough! I was simply stating that the source of the limitation does not exist within Drupal. Your edit is fine.– TriskelionApr 2, 2013 at 16:14
-
2@Triskellion sorry but the source of the limitation does exist within Drupal. That field type enforces a limit that is not necessarily imposed by the environment. MAXINT for 64 bits is plenty big enough for the number in question, and it would be perfectly possible for Drupal to take that into account. But it doesn't.– Alfred ArmstrongApr 2, 2013 at 17:06
1 Answer
Maximum number that Number module can hold is 2 147 483 647 (231 - 1), because of the size of SQL INT
datatype. For larger numbers you must use string field or Bigint module, that allows to storing numbers up to 9 223 372 036 854 775 807 (263 - 1).
-
Of course. Didn't think about that. Was just thinking in terms of Drupal.– RebDevApr 2, 2013 at 15:37
-
1Note: I will install the 'bigint' module (drupal.org/project/bigint) to allow the larger numbers I require.– RebDevApr 2, 2013 at 16:37