#35734: JSONObject crashes with Postgres 16 and server side bindings
-------------------------------------+-------------------------------------
Reporter: john-parton | Owner: john-
| parton
Type: Bug | Status: assigned
Component: Database layer | Version: 5.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by john-parton):
Replying to [comment:11 Sarah Boyce]:
>
[https://github.com/django/django/commit/0f53d48115ba0295cefea33512dc146caad39443
Here is an approach] which uses the native `JSONObject` function for
server side bindings, casting the keys to text. Adding it here for a
record.
I can create a separate ticket for this. "Enhancement", something like
"use native JSONObject on Postgres 16+ with server side bindings"?
I'm assuming that it's a "good thing" to prefer the native JSONObject over
just using jsonb_build_object all the time. In my experience, there is no
_practical_ difference, but I'm assuming the original change was accepted
because when support for Postgres 14 and 15 is dropped, we can drop the
jsonb_build_object code path with a simple delete. Does that sound right?
--
Ticket URL: <https://code.djangoproject.com/ticket/35734#comment:14>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019210287792-c63e116d-3d24-47e0-887c-844416a5a428-000000%40eu-central-1.amazonses.com.