搜索字符串结束部分在Postgres中
我需要找到具有相同决赛的记录:
http://www.a.com/a.a.a.com/a.html_art123 http://www.b.com/b.html_art123
最终部分“ Art123” IS记录有什么区别。 我正在使用split_part,但是查询太慢。
还有另一种解决这个问题的方法吗?
split_part('http://www.a.com/a.html_art124', '_', 2)
art124
I need to find records that have the same final:
http://www.a.com/a.html_art123
http://www.b.com/b.html_art123
the final part "art123" is what differences the record.
i'm using split_part but the query is too slow.
is there another way to solve this ?
split_part('http://www.a.com/a.html_art124', '_', 2)
art124
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以在查询中使用类似的操作员。
类似的内容:
%匹配该字段的任何零或更多字符的顺序。
Maybe you can use the LIKE operator in your query.
Something like this:
The % matches any sequence of zero or more characters of that field.