gpt4 book ai didi

postgresql - 如何使用 utf-8 中的数据库在 Postgres 8.3.x 中进行不区分重音的搜索?

转载 作者:行者123 更新时间:2023-11-29 11:29:35 25 4
gpt4 key购买 nike

尝试了 select to_ascii('capo','LATIN1'), to_ascii('çapo','LATIN1') 结果不同....

最佳答案

here .

CREATE FUNCTION to_ascii(bytea, name)
RETURNS text STRICT AS 'to_ascii_encname' LANGUAGE internal;

然后像这样使用它:

SELECT to_ascii(convert_to('Übermeier', 'latin1'), 'latin1'); 

关于postgresql - 如何使用 utf-8 中的数据库在 Postgres 8.3.x 中进行不区分重音的搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/659076/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com