I created my path in QGIS v2.18.18, making the lines and a combination of cleaning tool and explode lines tool to get my desired output. I tried using ROAD GRAPH plugin in order to check whether my path works when getting the shortest path, and it does. So I used GDAL to put the shp file to my pgadmin, and then using pgr_createTopology() doesnt give me the correct output. The following is an image of my table.
and here is the the command I ran for it.
SELECT pgr_createTopology('edges', 0.001, 'the_geom', 'gid');