alxndr
03/13/2022, 6:40 PMinfo
with data like: { topic: "postgres" }
, I'd like for this row to be returned if the provided search value string contains "postgres"
but not if it includes "topic"
I was able to create a new column on the table that is a concatenation of other columns to run text search against that generated column (using the docs https://supabase.com/docs/guides/database/full-text-search#searchable-columns), but so far haven't been able to figure out the syntax to do this with a jsonb column for the values only, I get the whole stringified object in there, which is ok but not ideal as some of the keys are fairly generic and shouldn't match on a text search.
Thanks in advance!Needle
03/13/2022, 6:40 PM/title
command!
We have solved your problem?
Click the button below to archive it.garyaustin
03/13/2022, 8:03 PMselect array_to_string(array(
select value from jsonb_each_text(
(select myjson from messages where id = 6)
)),',');
The inner select is for my test using a table I have with jsonb and would just be a column name in the row in your case.Needle
03/13/2022, 8:03 PM