#35778: Use native JSONObject on Postgres 16+ with server side bindings
-------------------------------------+-------------------------------------
Reporter: john-parton | Owner: john-
| parton
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | 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):
In the (probably unlikely) case that a user has created an index using
`JSONObject`, isn't it also possible that migrating from
`JSONB_BUILD_OBJECT` to `JSON_OBJECT` might break those indexes in much
the same way as your Cast example?
{{{#!python
class People(models.Model):
phone_number = models.IntegerField()
class Meta:
indexes = [
Index(name="phone_number_obj",
JSONObject(phone_number="phone_number"))
]
}}}
If the migration was run a while ago, the index would use the
JSONB_BUILD_OBJECT function, but now queries will use the JSON_OBJECT
function.
Is it worth noting SOMEWHERE in a release note or something? It seems
really unlikely to me that someone would index their data this way.
--
Ticket URL: <https://code.djangoproject.com/ticket/35778#comment:13>
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/010701924e7d7b9d-5047dfee-7d11-46d6-b126-cda7b8f26ed0-000000%40eu-central-1.amazonses.com.