How could I create a topology for a custom generated geometry table having just
the_geom geometry(linestring) column? Because
pgr_createTopolgy() asks for the
gid column also for a given table, which is not something like primary key.
Why do you think that
gid is not a primary key?
pgr_createTopology function requires a serial ID column as argument (the default column name is
id), you could simply add it like this:
ALTER TABLE foo ADD column id serial;
Is there a reason, why this is not possible in your case?