Add jsonb_translate(jsonb, from, to)

Florents Tselai <florents.tselai@gmail.com>

From: Florents Tselai <florents.tselai@gmail.com>
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-27T17:16:19Z
Lists: pgsql-hackers

Attachments

This is a spur of the moment patch really,
but while going through the process of translating some json data from
Greek to English I found myself wishing for $subject.
Inspired by the Unix tr utility.

Here's a working v1

If others find it useful as well,
I'd go ahead with a json implementation
And an additional parameter to make in-arrays replacement optional.