The subquery lets you order the points if that is needed. -Steve Markus Schaber wrote: > Hi, Nicol, > Hi, Stephen, > > What about: > SELECT setsrid(makeline(collect(makepoint(lon, lat))), 4326) FROM table > > I don't see the need for a subquery at all... > > Markus