[Django] #32961: Add support for BIT_XOR aggregate in PostgreSQL 14+.

20 views
Skip to first unread message

Django

unread,
Jul 23, 2021, 11:55:14 AM7/23/21
to django-...@googlegroups.com
#32961: Add support for BIT_XOR aggregate in PostgreSQL 14+.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New | Status: assigned
feature |
Component: | Version: 3.2
contrib.postgres | Keywords: postgresql,
Severity: Normal | aggregate, bit_xor
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
PostgreSQL 14+ will support a `BIT_XOR` aggregate function. We already
support `BIT_AND` and `BIT_OR` in `django.contrib.postgres`.

See ​https://www.postgresql.org/docs/release/14.0/

----

As an aside, it looks as though Oracle 21c supports these as
`BIT_AND_AGG`, `BIT_OR_AGG`, and `BIT_XOR_AGG`.
They're also supported in MySQL and MariaDB, but when there are no rows to
aggregate they don't return `NULL`.
It's relative straightforward to register custom aggregates for SQLite for
these too.
Perhaps there might be a case to migrate these to
`django.db.models.aggregates` in the future...

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

Django

unread,
Jul 23, 2021, 11:56:16 AM7/23/21
to django-...@googlegroups.com
#32961: Add support for BIT_XOR aggregate in PostgreSQL 14+.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: contrib.postgres | Version: 3.2
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
aggregate, bit_xor | Someday/Maybe
Has patch: 0 | Needs documentation: 0

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

* stage: Unreviewed => Someday/Maybe


Comment:

Changing the triage status based on PostgreSQL 14 still being in beta, as
has been done for #32943.

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

Django

unread,
Jul 23, 2021, 12:00:12 PM7/23/21
to django-...@googlegroups.com
#32961: Add support for BIT_XOR aggregate in PostgreSQL 14+.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: contrib.postgres | Version: 3.2
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
aggregate, bit_xor | Someday/Maybe
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14689 ​Draft PR] pending this being
accepted.

PostgreSQL 14 should be released in late September or early October based
on the last five major releases.
Django 4.0 feature freeze is scheduled for 20th September with final
release on 6th December.

If all goes well we could perhaps consider landing this before the feature
freeze when a PostgreSQL 14 release candidate is available.

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

Reply all
Reply to author
Forward
0 new messages