Be sure that you have imported in PostGIS the same river dataset (a shapefile) that was used in the previous recipe.