Escaping special characters in to_tsquery

后端 未结 3 717
栀梦
栀梦 2021-02-12 17:52

How do you espace special characters in string passed to to_tsquery? For instance, this kind of query:

select to_tsquery(\'AT&T\');
3条回答
  •  礼貌的吻别
    2021-02-12 18:22

    I found this comment very useful that uses the plainto_tsquery('AT&T) function https://stackoverflow.com/a/16020565/350195

提交回复
热议问题