For example, the query below returns an empty result:
SELECT * FROM table
WHERE message ILIKE ‘%A user account was%’;
But the actual message column value is:
A user account was deleted
accountid : amit
For example, the query below returns an empty result:
SELECT * FROM table
WHERE message ILIKE ‘%A user account was%’;
But the actual message column value is:
A user account was deleted
accountid : amit
Hello there, what version of CrateDB are you running? I cannot reproduce.
SELECT
*
FROM
t
WHERE
a ILIKE '%line%';
| a |
|---|
| “It’s line one\nIt’s line two” |
It can be reproduced like this on CrateDB 6.1.1:
CREATE TABLE q1 (a TEXT);
INSERT INTO q1 VALUES (
$$
A user account was deleted
accountid : amit
$$
);
SELECT *
FROM q1
WHERE a ILIKE '%A user account was%';
-- returns no result
The same process on PostgreSQL does return a result:
postgres=# CREATE TABLE q1 (a TEXT);
CREATE TABLE
postgres=# INSERT INTO q1 VALUES (
$$
A user account was deleted
accountid : amit
$$
);
INSERT 0 1
postgres=# SELECT * FROM q1;
a
----------------------------
+
A user account was deleted+
accountid : amit +
(1 row)
postgres=# SELECT *
FROM q1
WHERE a ILIKE '%A user account was%';
a
----------------------------
+
A user account was deleted+
accountid : amit +
(1 row)
That makes it look like a bug to me
. @anujjaiswar, since you discovered it, would you like to report it on GitHub so that it can be addressed by the development team?
Thanks!
Yes, I have reported this issue, and the reference details are provided below.