you can use that, that's func.jsonb_array_elements_text(column)


On 01/20/2016 12:12 PM, Sami Pietilä wrote:
> I have been using this kind of sql to search case insensitive strings
> from jsonb lists in postgresql.  jsonb_array_elements_text unpacks the
> list items as normal table rows from which text can be matched with ilike:
> 
> select * from jtable, jsonb_array_elements_text(jtable.data) where value
> ILIKE '%Firs%';
> 
> keskiviikko 20. tammikuuta 2016 16.29.49 UTC+2 Michael Bayer kirjoitti:
> 
>     this is more of a "what SQL will work on Postgresql" question, I'd ask
>     on StackOverflow or the PG list just in terms of the SQL query to use.
>     Once you get a string SQL query that works we can do it through
>     SQLAlchemy.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlalchemy+unsubscr...@googlegroups.com
> <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
> To post to this group, send email to sqlalchemy@googlegroups.com
> <mailto:sqlalchemy@googlegroups.com>.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to