"Joel Jacobson" <j...@compiler.org> writes: > Having abandoned the cute idea that didn't work, > here comes a new patch with a regexp_positions() instead returning > setof record (start_pos integer[], end_pos integer[]).
I wonder if a 2-D integer array wouldn't be a better idea, ie {{startpos1,length1},{startpos2,length2},...}. My experience with working with parallel arrays in SQL has been unpleasant. Also, did you see https://www.postgresql.org/message-id/fc160ee0-c843-b024-29bb-97b5da61971f%40darold.net Seems like there may be some overlap in these proposals. regards, tom lane