Hi hackers.
The following works well of course:
test=# select strpos('Aa'::citext, 'a');
strpos
--------
1
However, if I pass a typed text parameter for the substring, I get
case-sensitive behavior instead:
test=# select strpos('Aa'::citext, 'a'::text);
strpos
--------
2
This seems like surprising behavior - my expectation was that the first
parameter being citext would be enough to trigger case-insensitive
behavior. The same may be happening with other string functions (e.g.
regexp_matches). This is causing some difficulties in a real scenario where
SQL and parameters are getting generated by an O/RM, and changing them
isn't trivial.
Do the above seem like problematic behavior like it does to me, or is it
the expected behavior?
Shay