Perfect! Next, let's get to know a couple functions that will be useful when we work with linestrings. The first two are
ST_EndPoint(geometry). Take a look at how they're used:
WHERE id = 1;
In the query above, we show the start and end point of the railway with
id = 1. Note that we used
ST_AsText(...) and passed in
ST_StartPoint(...) as its argument. That's because
ST_EndPoint return points in the internal PostGIS format, which is not very human-readable. Thus, we used
ST_AsText(...) to convert it to WKT.
As you can tell, spatial functions can be nested, or put inside one another.