QGIS offers a plugin that will solve a shortest path problem across any vector polyline layer in any format - the Road Graph plugin. The advantage of using this plugin over pgRouting is that you don't need to do anything special to your polyline layer to route across it. As