Re: Patch: regexp_matches variant returning an array of matching positions
От | Alvaro Herrera |
---|---|
Тема | Re: Patch: regexp_matches variant returning an array of matching positions |
Дата | |
Msg-id | 20140128211911.GX10723@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Patch: regexp_matches variant returning an array of matching positions (Björn Harrtell <bjorn.harrtell@gmail.com>) |
Ответы |
Re: Patch: regexp_matches variant returning an array of matching
positions
|
Список | pgsql-hackers |
Björn Harrtell wrote: > I've written a variant of regexp_matches called regexp_matches_positions > which instead of returning matching substrings will return matching > positions. I found use of this when processing OCR scanned text and wanted > to prioritize matches based on their position. Interesting. I didn't read the patch but I wonder if it would be of more general applicability to return more info in a fell swoop a function returning a set (position, length, text of match), rather than an array. So instead of first calling one function to get the match and then their positions, do it all in one pass. (See pg_event_trigger_dropped_objects for a simple example of a function that returns in that fashion. There are several others but AFAIR that's the simplest one.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: