#27227: Full text search by UUIDField returns DataError
-------------------------------------+-------------------------------------
Reporter: danclaudiupop | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: UUIDField fts | Triage Stage:
postgres | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by melvyn-sopacua):
Analysis:
In `django/contrib/postgres/search.py` we find in __init__() around line
55 (stable/1.10.x):
{{{
self.source_expressions = [
Coalesce(expression, Value('')) for expression in
self.source_expressions
]
}}}
These are propagated to Coalesce() and generate the expression:
{{{
COALESCE("entities_show"."cid", '')
}}}
For most cases, the empty string is a valid input value, yet for the
native PostgreSQL UUID type, this is not the case. The API doesn't provide
a way to specify the fallback value.
--
Ticket URL: <https://code.djangoproject.com/ticket/27227#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.e12ae1f8940a446173dfa8fa0f79f859%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.