Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20446 closed Cleanup/optimization (fixed)

Documentation for SmallIntegerField does not clarify 'small'

Reported by: Sasha Romijn Owned by: nobody
Component: Documentation Version: dev
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 by Sasha Romijn, 11 years ago

Easy pickings: set
Has patch: set

comment:2 by Jef Geskens, 11 years ago

Triage Stage: UnreviewedReady for checkin

Looks good te me!

comment:3 by Erik Romijn <eromijn@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 56e2f6ccae76a6f0a7f1d64677bf29e11518e5c6:

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

comment:4 by Tim Graham <timograham@…>, 11 years ago

In 78de9b19027d3aee268797ad8899ac7283024c0c:

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

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

comment:5 by Tim Graham <timograham@…>, 11 years ago

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