Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#20446 closed Cleanup/optimization (fixed)

Documentation for SmallIntegerField does not clarify 'small'

Reported by: erikr Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords: dceu13
Cc: eromijn@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation for SmallIntegerField and PositiveSmallIntegerField simply state the range is 'database-dependant'. Although true, this is rather useless to someone trying to decide whether to use this field.

I have looked at this and found:

Database Datatype Min value Max value
SQLite INTEGER Same as IntegerField Same as IntegerField
Oracle NUMBER(11) Same as IntegerField Same as IntegerField
MySQL for SmallIntegerField smallint -32768 32767
MySQL for PositiveSmallIntegerField smallint unsigned 0 65535
PostgreSQL smallint -32768 32767

Therefore, I think the documentation should state a safe range of -32768 to 32767 for all databases.

Change History (5)

comment:1 Changed 23 months ago by erikr

  • Easy pickings set
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 23 months ago by jgeskens

  • Triage Stage changed from Unreviewed to Ready for checkin

Looks good te me!

comment:3 Changed 23 months ago by Erik Romijn <eromijn@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 56e2f6ccae76a6f0a7f1d64677bf29e11518e5c6:

Fixed #20446 -- Documentation for SmallIntegerField does not clarify 'small'

comment:4 Changed 23 months ago by Tim Graham <timograham@…>

In 78de9b19027d3aee268797ad8899ac7283024c0c:

Merge pull request #1128 from erikr/improve-smallint-docs

Fixed #20446 -- Documentation for SmallIntegerField does not clarify 'small'

comment:5 Changed 23 months ago by Tim Graham <timograham@…>

In 38fbc8384748140dc4b94818d38c0ecbb8fb77d5:

[1.5.x] Fixed #20446 -- Documentation for SmallIntegerField does not clarify 'small'

Backport of 56e2f6ccae from master

Note: See TracTickets for help on using tickets.
Back to Top