The JSP format-trick for written numbers, in PostgreSQL
Most of the old hands on that "Otheracle" database know to to convert an integer into a "written number" by using the JSP format: Try that in psql and.. No joy: Dig around, and you find that this magical JSP format is vendor specific, and not present in PostgreSQL. Bummer Luckily, most problems have been solved before, so I found a few varieties of a usable function, notably one on the PG mailinglist archive (link to merlin) . And less than 5 min later: Problem Solved. With all Credit due to someone called "merlin" on the PG mailing list.