I am new to PostGIS. I have some linestring geometry values. Each linestring contains multiple points. I have dumped the points from that geometry by ST_DumpPoints. By ST_AsText, I have found that the first linestring contains 10 point sets (x,y,z) then second linestring contains 4 point sets. Now, I want to create a column named start and another column named end. The start will contain the start point of each point set of the linestring and end point will contain the next point of the point set of the linestring without the z value. E.g.
linestring1 dumped points: (1,2,2),(2,5,4),(3,4,5)...... linestring2 dumped points: (1,3,2),(3,3,4),(4,5,6)....
Now source and End columns will be
Source End (1,2) (2,5) (2,5) (3,4) (3,4) . . . . . . . . . (1,3) (3,3) (3,3) (4,5) (4,5) . . . . . . .