Convenient would be to be able to define start as well as end point. Then
returning to the start point would be just a special case where start and
end point are the same: https://github.com/pgRouting/pgrouting/pull/49 (includes a pull request)
Google Maps API offers some optional setting for its "Directions Service",
where you can indicate if the waypoints should be returned in an optimized
order or in the listed order: https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRoute
So "optimized" is lyouike TSP and otherwise it's just concatenated shortest
path requests. There it's possible to specify origin and destination, which
would be case (2).