gpt4 book ai didi

postgresql - Postgres 字符串比较特性

转载 作者:行者123 更新时间:2023-11-29 12:13:04 26 4
gpt4 key购买 nike

谁能解释下面的矛盾?

select 'b.0'<'b00.0';
?column?
----------
t

但是

select 'b.g'<'b00.g';
?column?
----------
f

最佳答案

那是一个collation issue .尝试

select '.0' < '00', '.9' < '00', '.9' < '00' collate "C";
?column? | ?column? | ?column?
----------+----------+----------
t | f | t

http://wiki.postgresql.org/wiki/Todo:ICU

关于postgresql - Postgres 字符串比较特性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21360747/

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