Inserting data with SELECT into new column
You already solved your main problem!

But I want to suggest you to create a new table for sub and maybe also for fullpath, because you store the same values again and again in this row.

Something like this: 

CREATE TABLE path (id integer, name varchar(100));


Then populate it with a SELECT and add the ID to the main table!