All that Scheme and Lisp programming makes me a bad SQL writer. Suddenly I wonder why (Postgre)SQL doesn’t support ad-hoc function definitions in SELECT queries (or does it?). Because this looks ugly:
SELECT
translate(lower(a."name"), '-() /', ''), r.id
FROM my_objects a
LEFT OUTER JOIN other_objects r ON
translate(lower(a."name"), '-() /', '') = translate(lower(r.name->>'de'), '-() /', '');
Do you see the issue?
#sql