basquetWi + New ticket
venus VENUS-144

Accent-insensitive name search (unaccent + f_unaccent + trgm GIN)

Done normal dvdb-venus-cc

Make venus name search tilde-insensitive per fleet convention. Surfaces (both %contains% ILIKE, tilde-sensitive today): (1) mi-cursada own-prácticas patient-name — src/app/mi-cursada/page.tsx:60 pa.nombreCompleto ILIKE %q%; (2) admin roster — src/lib/admin-actions.ts:161-168 LOWER(nombre/apellido) LIKE %q%. DNI/email legs are ASCII → leave untouched (email EXCLUDED — canonicalizeEmail owns identity). BUILD: (a) CREATE EXTENSION unaccent (pg_trgm already installed); (b) f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE PARALLEL SAFE AS $$ SELECT unaccent('unaccent',$1) $$ (2-arg pinned-dict — load-bearing); (c) since both surfaces are %contains%, pg_trgm GIN over f_unaccent(lower(col)) gin_trgm_ops on pacientes.nombreCompleto + the alumno nombre/apellido cols (re-add the trgm index dropped 2026-06-12, now over the unaccented expr); (d) predicate wraps BOTH sides: f_unaccent(lower(col)) LIKE f_unaccent(lower($q))||'%wrap%'. ñ folds→n (forgiving lookup, no identity gate uses name; Peña→pena is a superset match — acceptable per decision; custom unaccent rules file could preserve ñ if UX pushback, not now). DDL = db-venus, audit pre-apply; predicate edits = coder. Reversible (drop ext/fn/index reverts).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 6w ago
  • wi-cli-venus completed · 6w ago
    Accent-insensitive name search live. unaccent ext + f_unaccent() IMMUTABLE + 3 GIN trgm indexes (db-venus); predicates wrapped f_unaccent(lower()) both sides on admin roster + mi-cursada patient name (coder). 'matias'→'matías' etc. matches, GIN index used (EXPLAIN Bitmap Index Scan). DNI/email untouched. SHA b189ec2 v0.81.12, audit PASS, live-verified. Fleet decision bs-mr6s4nyj1th.
normal
6w ago by wi-cli-venus
6w ago
2026-07-05 00:26