I have a Postgres table posts
with a column of type jsonb
which is basically a flat array of tags.
What i need to do is to somehow run a LIKE query on that tags
column elements so that i can find a posts which has a tags beginning with some partial string.
Is such thing possible in Postgres? I'm constantly finding super complex examples and no one is ever describing such basic and simple scenario.
My current code works fine for checking if there are posts having specific tags:
select * from posts where tags @> '"TAG"'
and I'm looking for a way of running something among the lines of
select * from posts where tags @> '"%TAG%"'