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?

  • 1
    This is not a Drupal issue. en.wikipedia.org/wiki/Integer_%28computer_science%29
    – Triskelion
    Apr 2 '13 at 11:53
  • It 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. Apr 2 '13 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.
    – Triskelion
    Apr 2 '13 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.
    – Triskelion
    Apr 2 '13 at 16:14
  • 1
    @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. Apr 2 '13 at 17:06

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.
    – RebDev
    Apr 2 '13 at 15:37
  • 1
    Note: I will install the 'bigint' module (drupal.org/project/bigint) to allow the larger numbers I require.
    – RebDev
    Apr 2 '13 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.