[Django] #34238: Support computed `GENERATED ALWAYS` columns

10 views
Skip to first unread message

Django

unread,
Jan 2, 2023, 12:48:10 AM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: jpnauta | Owner: nobody
Type: New | Status: new
feature |
Component: Database | Version: dev
layer (models, ORM) | Keywords:
Severity: Normal | generated,always,computed,field
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Hi all, I would like to propose a way to add computed (i.e. `GENERATED
ALWAYS`) database fields. This has been discussed in many different forms
over the past several years:

- [https://groups.google.com/g/django-
developers/c/9Mf7YqDA4bg/m/wb07E71oAAAJ]
- [https://code.djangoproject.com/ticket/31300]
- [https://code.djangoproject.com/ticket/31565]

The current database backend support for this feature has been thoroughly
documented by Paulo here: [https://groups.google.com/g/django-
developers/c/9Mf7YqDA4bg/m/wb07E71oAAAJ].

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

Django

unread,
Jan 2, 2023, 1:25:40 AM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: jpnauta | Owner: jpnauta
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
generated,always,computed,field | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jpnauta):

* owner: nobody => jpnauta
* status: new => assigned
* has_patch: 0 => 1


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

Django

unread,
Jan 2, 2023, 1:26:20 AM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: Jeremy Nauta | Owner: Jeremy
| Nauta

Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
generated,always,computed,field | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jeremy Nauta):

https://github.com/django/django/pull/16417

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

Django

unread,
Jan 2, 2023, 1:27:12 AM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: jpnauta | Owner: jpnauta

Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
generated,always,computed,field | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by jpnauta:

Old description:

> Hi all, I would like to propose a way to add computed (i.e. `GENERATED
> ALWAYS`) database fields. This has been discussed in many different forms
> over the past several years:
>
> - [https://groups.google.com/g/django-
> developers/c/9Mf7YqDA4bg/m/wb07E71oAAAJ]
> - [https://code.djangoproject.com/ticket/31300]
> - [https://code.djangoproject.com/ticket/31565]
>
> The current database backend support for this feature has been thoroughly
> documented by Paulo here: [https://groups.google.com/g/django-
> developers/c/9Mf7YqDA4bg/m/wb07E71oAAAJ].

New description:

Hi all, I would like to propose a way to add computed (i.e. `GENERATED
ALWAYS`) database fields. This has been discussed in many different forms
over the past several years:

The current database backend support for this feature has been thoroughly
documented by Paulo here: [https://groups.google.com/g/django-
developers/c/9Mf7YqDA4bg/m/wb07E71oAAAJ].

Proposed implementation: [https://github.com/django/django/pull/16417]

--

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

Django

unread,
Jan 2, 2023, 1:54:54 AM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: Jeremy Nauta | Owner: Jeremy
| Nauta
Type: New feature | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage:
generated,always,computed,field | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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


Comment:

Adding a new duplicate of #31565 is not the way to move things forward.
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets Please follow triaging guidelines with regards to
wontfix tickets.]

--
Ticket URL: <https://code.djangoproject.com/ticket/34238#comment:4>

Django

unread,
Jan 2, 2023, 3:15:23 PM1/2/23
to django-...@googlegroups.com
#34238: Support computed `GENERATED ALWAYS` columns
-------------------------------------+-------------------------------------
Reporter: Jeremy Nauta | Owner: Jeremy
| Nauta
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
generated,always,computed,field | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jeremy Nauta):

Will be implemented via https://code.djangoproject.com/ticket/31300
instead

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

Reply all
Reply to author
Forward
0 new messages