#20446: Documentation for SmallIntegerField does not clarify 'small'
--------------------------------------+--------------------
Reporter: erikr | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords: dceu13
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/20446>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.