This week, while setting up local project for work, I encountered some weired issue during the unit test and this has something to do with postgres and its default settings under Windows and other OS.
As an example, consider the following array:
[ 'D', 'd', 'a', 'A', 'c', 'b', 'CD', 'Capacitor' ]
>>> [ 'D', 'd', 'a', 'A', 'c', 'b', 'CD', 'Capacitor' ].sort()
Sorting this in Postgres SQL with default installation will yield a case insensitive sorting where upper and lower case are mixed:
SELECT regexp_split_to_table('D d a A c b CD Capacitor', ' ') ORDER BY 1;