【发布时间】:2016-12-15 18:07:11
【问题描述】:
我正在尝试在 postgresql 的表上查找表情符号。
有时我的结果中会出现这样的情况:
# SELECT id, title FROM my_texts WHERE title ILIKE '[%';
id | title
-------+---------------------------------------------------------------
85981 | [<U+1F6AB>] forbidden sample text
我尝试使用以下查询查找哪些标题具有此表情符号:
SELECT id, title FROM my_texts WHERE title ILIKE '%<U+1F6AB>';
SELECT id, title FROM my_texts WHERE title ILIKE '%\U+1F6AB%'
SELECT id, title FROM my_texts WHERE title ILIKE '%\U1F6AB%'
但这些都没有给我想要的结果。
如何正确编写这个 unicode 字符?
【问题讨论】:
标签: sql postgresql unicode emoji