I have a table that, when ordered, describes a path by point descriptions in each row. A column tells whether a row is a special (stop) point within that path and is empty otherwise. The path starts and ends with such a row and has many in between. What I want to do is create line segments from the point rows that start at such a row and also end at such a row.
I want to call
ST_Makeline from PostGIS to turn the ordered points into these line segments. How can I enforce that
ST_Makeline, being a "summary" function is only called for the inclusive point groups 1 to 3 and 3 to 6?