简体   繁体   中英

Is position(substring in string) in PostgreSQL case sensitive

如果没有,我认为lower(string)可以用于不区分大小写的比较,但是我不确定是否需要这样做。

Yes, it is case-sensitive.

psql (9.1.4)

postgres=> select position('f' in 'foo');
 position
----------
        1
(1 row)


Time: 200,830 ms
postgres=> select position('F' in 'foo');
 position
----------
        0
(1 row)


Time: 0,327 ms
postgres=>

是的,在Postgres中区分大小写。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM