[Django] #24920: Database type NUMERIC with no parameters is not supported

25 views
Skip to first unread message

Django

unread,
Jun 4, 2015, 7:06:35 AM6/4/15
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: shaib | Owner: nobody
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords: oracle
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 1 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django's `DecimalField` requires both `max_digits` and `decimal_places`.
Database backends allow them to be dropped, to specify an "unlimited
precision" field.

This leads to bugs in `inspectdb`: On Oracle, a column defined as
`NUMERIC` is inspected as having 0 digits and negative precision; on
Postgresql, it is inspected as having 65535 (a C short -1?) digits and
decimal places, when the [http://www.postgresql.org/docs/9.4/static
/datatype-numeric.html documentation] says you can only explicitly define
up to 1000 decimal places (and even the implicitly defined precision is
only 16383).

Discussion in the context of Oracle (from 2012):
https://groups.google.com/d/topic/django-developers/qSAfzPyqKqw/discussion

(This could be solved more easily by adding a new field type than by
modifying the behavior of the existing `DecimalField`; however, I'm having
a hard time suggesting a name for such a field type, which may be an
indication that it is a bad interface. Besides that decision, this
probably applies as an easy picking).

--
Ticket URL: <https://code.djangoproject.com/ticket/24920>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 9, 2015, 2:23:01 PM6/9/15
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: shaib | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_docs: 1 => 0
* needs_tests: 1 => 0
* easy: 1 => 0
* stage: Unreviewed => Accepted


Comment:

Maybe you could raise the idea on the DevelopersMailingList. I think I'd
prefer if we didn't need to add a new field, but if so, I'll propose the
name `ImpreciseDecimalField`. Seems like a name like that might scare
people away from using it though.

--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:1>

Django

unread,
Mar 24, 2017, 1:39:40 PM3/24/17
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Maciej Gol):

Any update on this or a suggested way of resolving: either new field or a
fix to `DecimalField`?

--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:2>

Django

unread,
Mar 24, 2017, 8:07:29 PM3/24/17
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

If you want to propose a solution, please write to the
DevelopersMailingList to get feedback about how to proceed.

--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:3>

Django

unread,
Oct 20, 2025, 6:31:19 PMOct 20
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):

On the [https://groups.google.com/g/django-
developers/c/6BFfYDs53_k/m/HGw1vgs7fDIJ django-developers thread], Aymeric
proposed trying to adapt `DecimalField` rather than introduce a new field,
and Claude gave that idea a +1.

#36673 is a duplicate that requests making `DecimalField`'s `max_digits`
and `decimal_places` optional.
--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:4>

Django

unread,
Nov 4, 2025, 4:26:30 AMNov 4
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:5>

Django

unread,
Nov 4, 2025, 5:59:38 AMNov 4
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/20055 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:6>

Django

unread,
Nov 16, 2025, 9:03:55 AMNov 16
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:7>

Django

unread,
Nov 17, 2025, 7:43:59 AMNov 17
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"1ce6e78dd4beed702f15fa0be798dd17a15d4ba8" 1ce6e78]:
{{{#!CommitTicketReference repository=""
revision="1ce6e78dd4beed702f15fa0be798dd17a15d4ba8"
Fixed #24920 -- Added support for DecimalField with no precision.

Thanks Lily for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:8>

Django

unread,
Dec 28, 2025, 1:22:00 PM (yesterday) Dec 28
to django-...@googlegroups.com
#24920: Database type NUMERIC with no parameters is not supported
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"1c34b8716afde049f95ad1c72c2f8e148f826662" 1c34b871]:
{{{#!CommitTicketReference repository=""
revision="1c34b8716afde049f95ad1c72c2f8e148f826662"
Refs #24920 -- Made DecimalField system checks database dependent.

Thanks Tim Graham for the suggestion.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24920#comment:9>
Reply all
Reply to author
Forward
0 new messages