Alvaro Herrera wrote:
> On the other hand, I don't think it's impossible to have matches that
> start earlier than others in the string, but are actually found later
> (say, because they are a parentized expression that ends later). So
> giving the starting positions allows one to know where are they
> located, rather than where were they reported. (I don't really know
> if the matches are sorted before reporting though.)
I have no strong opinion about how matches are returned. Seeing the
definitional difficulties that you point out, it may be fine to return
them unordered. But then all "matches" functions should do that.
For the "split" functions, however, providing the order is clearly
important.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/