This process is also similar to MultiPoint decomposition. The points can be extracted one at a time or dumped into a geometry dump. Aside from these generic methods, there are also special functions for finding the start or end point of a line.
First, let's find the count of the vertices in a LineString. A generic ST_NPoints function can be used for that:
The ST_NPoints works for any geometry type--not just for LineStrings, but also LinearRings, polygons, their multi-variants, and even for points, in which case it will return 1. There is also a ST_NumPoints function, which works for LineStrings only.
The individual points are extracted from a LineString by the ST_PointN function, which is not unlike ST_GeometryN used for Multi-geometry decomposition.
Dumping the points into a set of rows is also similar to dumping a Multi-geometry. The only difference is that the function used is named ST_DumpPoints. The geometry dump compound type is a direct output from this function: