#27824: Cannot chain unaccent transform with key lookup in Postgres JSON field
-------------------------------------+-------------------------------------
     Reporter:  Aymeric Augustin     |                    Owner:  Simon
                                     |  Charette
         Type:  New feature          |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * status:  new => assigned
 * cc: Simon Charette (added)
 * owner:  (none) => Simon Charette


Comment:

 FWIW you want to use `RawSQL("(inputs ->> 'first_name')", [],
 output_field=TextField())` as a workaround.

 Note the use `->>` instead of `->` and `::text` as the latter will give
 you the text representation of the `first_name` JSON key (that would be
 `'"Charette"'` instead of `'Charette'`).

--
Ticket URL: <https://code.djangoproject.com/ticket/27824#comment:7>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.49dbbccb72cfef5c4444643df71a6bdb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to