我有Docker 11数据库,运行在PostgreSQL容器下,从镜像postgres-11创建。
在我将图片替换为postgis/postgis:11-2.5-alpine后,我遇到了一些奇怪的行为。
foodmarkets=# select id, nickname from public.user where nickname = 'test';
id | nickname
----+----------
(0 rows)
foodmarkets=# select id, nickname from public.user where nickname ilike 'test';
id | nickname
-----+----------
128 | Test
177 | test
(2 rows)我从第二个查询结果中复制test,粘贴到第一个查询并再次获取0 rows。
在开发模式中,平等比较是有效的。
我怀疑我输入了错误的东西,因为在生产模式下授权功能已经停止工作,因为它依赖于相同的查询。
这是怎么回事?
不同的docker图像会是一个原因吗?
发布于 2021-01-19 05:04:22
想明白了!
这是索引问题。
REINDEX INDEX user_nickname_key;https://stackoverflow.com/questions/65781831
复制相似问题