我可以使用Ilike检查JSONB中表的内容吗
SELECT
id,
some_jsonb_table
FROM
public.example
where some_jsonb_table::text ilike '%example_report%'
我尝试切换some_jsonb_table
在文本
上,但仍然Ilike
不起作用。 如何检查表的内容是否包含我要搜索的文本片段?
SELECT
id,
some_jsonb_table
FROM
public.example
where some_jsonb_table::text ilike '%example_report%'
I tried to switch some_jsonb_table
on TEXT
but still ILIKE
doesn't work.
How to check if the content of the table contains the text fragment I am searching for ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
jsonb_data :: text Ilike'%my_search_string%
应该完美地拿走此示例表和查询,它甚至可以在嵌套的JSONB对象
结果上工作,就像
您可以使用替代操作员
postresql中的JSONB上的好资源
jsonb_data::text ilike '%my_search_string%
should work perfectlyTake this sample table and query, it works even on nested jsonb objects
Result is as expected
You can also use alternative operators
Good resource on jsonb in PostreSQL