Can anyone explain why I must make / a character class
in case-insensitive query in order to match / ?
and then why does it work in plain ~ ?
hannu=> select * from item where path ~* '^/a';
path
------
/a/b/c
/a/b/d
/a/d/d
/aa/d
/a/b
/a/c
/a/d
(7 rows)
hannu=> select * from item where path ~ '^/a';
path
------
/a/b/c
/a/b/d
/a/d/d
/aa/d
/a/b
/a/c
/a/d
(7 rows)
hannu=> select * from item where path ~* '^/A';
path
----
(0 rows)
hannu=> select * from item where path ~* '^[/]A';
path
------
/a/b/c
/a/b/d
/a/d/d
/aa/d
/a/b
/a/c
/a/d
(7 rows)
------------
Hannu