Presuming your data looks like this:
You may convert the set of ordered longitude/latitude pairs into linestrings like this:
SELECT ST_AsText(ST_MakeLine(q.f, q.t)) FROM
(SELECT (SELECT ST_MakePoint(c.long_from, c.lat_from) AS f),
(SELECT ST_MakePoint(c.long_to, c.lat_to) AS t)
FROM lonlatset c) AS q;
And here's the result:
Try to remember that it is very important to respect the proper coordinates order: first the longitude, and second the latitude!