Re: Speeding up loops in pl/pgsql function
От | Reuven M. Lerner |
---|---|
Тема | Re: Speeding up loops in pl/pgsql function |
Дата | |
Msg-id | 4DDD4E57.7070800@lerner.co.il обсуждение исходный текст |
Ответ на | Speeding up loops in pl/pgsql function ("Reuven M. Lerner" <reuven@lerner.co.il>) |
Ответы |
Re: Speeding up loops in pl/pgsql function
Re: Speeding up loops in pl/pgsql function |
Список | pgsql-performance |
Hi, Alex. You wrote: > Have you tried something like: > SELECT encode(regexp_replace('141142143', '(\d{3})', '\\\1', > 'g')::bytea, 'escape'); Hmm, forgot about regexp_replace. It might do the trick, but without a full-blown eval that I can run on the replacement side, it'll be a bit more challenging. But that's a good direction to consider, for sure. > I think select E'\XXX' is what you are looking for (per the fine > manual: http://www.postgresql.org/docs/current/static/datatype-binary.html) I didn't think that I could (easily) build a string like that from digits in a variable or a column, but I'll poke around and see if it can work. Thanks, Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner
В списке pgsql-performance по дате отправления: