In PostgreSQL equality operator working, but ILIKE not

Viewed 69

I have PostgreSQL 11 database, that running under Docker container, created from image postgres-11.

After I have replaced image to postgis/postgis:11-2.5-alpine, I faced some following strange behaviour.

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)

I copying test from second query results, pasting to first query and getting 0 rows again.

In development mode equality comparison is working.

I doubt, that I'm typing something incorrect, because in production mode authorisation feature has stopped working, because it relies on the same query.

Whats wrong here?

Can different docker image be a reason?

1 Answers

Figured it out!

It was index problem.

REINDEX INDEX user_nickname_key;
Related