[Django] #35295: Use INSERT with multiple rows on Oracle 23c+

19 views
Skip to first unread message

Django

unread,
Mar 12, 2024, 1:54:02 PM3/12/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz | Owner: Mariusz Felisiak
Felisiak |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: 5.0
layer (models, ORM) |
Severity: Normal | Keywords: oracle
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Oracle 23c finally allows to `INSERT` multiple rows into a table in a
single step without a `UNION`-`SELECT` workaround 🎉

https://oracle-base.com/articles/23c/table-values-constructor-23c#insert
--
Ticket URL: <https://code.djangoproject.com/ticket/35295>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 12, 2024, 1:59:29 PM3/12/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage:
| Unreviewed
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/17969 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:1>

Django

unread,
Mar 12, 2024, 2:20:17 PM3/12/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(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 David Smith):

* stage: Unreviewed => Accepted

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

Django

unread,
Mar 12, 2024, 3:59:23 PM3/12/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1

Comment:

The current patch fails on
`field_defaults.tests.DefaultTests.test_bulk_create_mixed_db_defaults_function`:
{{{
django.db.utils.DatabaseError: ORA-01797: this operator must be followed
by ANY or ALL
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:3>

Django

unread,
Mar 13, 2024, 12:46:47 PM3/13/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"33c06ca0da6c4f151b84e5d8c305faff9ca30d98" 33c06ca0]:
{{{#!CommitTicketReference repository=""
revision="33c06ca0da6c4f151b84e5d8c305faff9ca30d98"
Refs #32673, Refs #35295 -- Avoided wrapping rhs direct values in lookups.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:4>

Django

unread,
Mar 13, 2024, 12:50:18 PM3/13/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(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):

* needs_better_patch: 1 => 0

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

Django

unread,
Mar 14, 2024, 6:11:25 AM3/14/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution: fixed
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 <felisiak.mariusz@…>):

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

Comment:

In [changeset:"175b04942afaff978013db61495f3b39ea12989b" 175b049]:
{{{#!CommitTicketReference repository=""
revision="175b04942afaff978013db61495f3b39ea12989b"
Fixed #35295 -- Used INSERT with multiple rows on Oracle 23c.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:7>

Django

unread,
Mar 14, 2024, 6:11:25 AM3/14/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: Database layer | Version: 5.0
(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
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"912f72a6f057bb39f63d66c7fcf0eab7bf28c7b5" 912f72a]:
{{{#!CommitTicketReference repository=""
revision="912f72a6f057bb39f63d66c7fcf0eab7bf28c7b5"
Refs #35295 -- Added BaseDatabaseOperations.bulk_insert_sql().

Co-authored-by: Nick Pope <ni...@nickpope.me.uk>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:6>

Django

unread,
Aug 3, 2024, 3:05:40 AM8/3/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"5424151f96252e1289e9a6f7eb842cd1dc87850a" 5424151]:
{{{#!CommitTicketReference repository=""
revision="5424151f96252e1289e9a6f7eb842cd1dc87850a"
Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with multiple rows
on Oracle 23c."

This reverts commit 175b04942afaff978013db61495f3b39ea12989b due to a
crash when Oracle > 23.3.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:8>

Django

unread,
Aug 3, 2024, 3:08:31 AM8/3/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"03051db758f237443ed4fe95416ce6505e60fe58" 03051db]:
{{{#!CommitTicketReference repository=""
revision="03051db758f237443ed4fe95416ce6505e60fe58"
[5.1.x] Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with
multiple rows on Oracle 23c."

This reverts commit 175b04942afaff978013db61495f3b39ea12989b due to a
crash when Oracle > 23.3.

Backport of 5424151f96252e1289e9a6f7eb842cd1dc87850a from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:9>

Django

unread,
Aug 3, 2024, 3:09:30 AM8/3/24
to django-...@googlegroups.com
#35295: Use INSERT with multiple rows on Oracle 23c+
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: closed
Component: Database layer | Version: 5.0
(models, ORM) |
Severity: Normal | Resolution: wontfix
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 Sarah Boyce):

* resolution: fixed => wontfix

Comment:

See [https://code.djangoproject.com/ticket/35655#comment:6 comment].
--
Ticket URL: <https://code.djangoproject.com/ticket/35295#comment:10>
Reply all
Reply to author
Forward
0 new messages