Hi all, I noticed that the existing description of the string translate() function <http://www.postgresql.org/docs/current/static/functions-string.html#FUNCTIONS-STRING-OTHER> currently has a description of: Any character in string that matches a character in the from set is replaced by the corresponding character in the to set This description leaves off the other half of translate()'s capability, namely stripping unwanted characters entirely. The comment for the translate() in oracle_compat.c is helpful here, saying: If from is longer than to, occurrences of the extra characters in from are deleted. Attached is a patch to update the doc page based on this comment's wording. Josh
Excerpts from Josh Kupershmidt's message of mié oct 13 21:50:40 -0300 2010: > This description leaves off the other half of translate()'s > capability, namely stripping unwanted characters entirely. The comment > for the translate() in oracle_compat.c is helpful here, saying: Agreed. I applied your patch and also touched the example slightly to illustrate this. I didn't backpatch this; probably not worth the trouble. Thanks. -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера