Re: Add jsonb_translate(jsonb, from, to)
От | Andrew Dunstan |
---|---|
Тема | Re: Add jsonb_translate(jsonb, from, to) |
Дата | |
Msg-id | ea9fa483-db55-48c8-a566-8a6d83690f78@dunslane.net обсуждение исходный текст |
Ответ на | Add jsonb_translate(jsonb, from, to) (Florents Tselai <florents.tselai@gmail.com>) |
Список | pgsql-hackers |
On 2025-09-27 Sa 1:16 PM, Florents Tselai wrote: > 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. It's not clear to me that this is a good idea. Blindly replacing every instance of a single string regardless of context seems at best a niche use. Is there any reason not to make this an extension? I haven't dug deeply into the patch, but I don't understand why you're putting an entry for this in system_functions.sql. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: