PostgreSQL wildcard LIKE for any of a list of words

前端 未结 5 1154
醉酒成梦
醉酒成梦 2020-11-29 15:47

I have a simple list of ~25 words. I have a varchar field in PostgreSQL, let\'s say that list is [\'foo\', \'bar\', \'baz\']. I want to find any row in my table

5条回答
  •  Happy的楠姐
    2020-11-29 16:37

    All currently supported versions (9.5 and up) allow pattern matching in addition to LIKE.

    Reference: https://www.postgresql.org/docs/current/functions-matching.html

提交回复
热议问题