> SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), > (array_agg(data))[1], (array_agg(data))[count(*)] > FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE data > ~ 'INSERT' > GROUP BY 1 ORDER BY 1; > > but result is sensitive on locales setting - doesn't work well with czech > locales.
Simple fix here is to append COLLATE "C" after the ORDER BY.
it needs little bit bigger change - COLLATE cannot be used with positional ORDER BY