(In my answer, I suppose you are interested in type=road relations)

Keep using the planet_osm_lines table which is much suited for queries than the planet_osm_rels which is mainly for diff updates of your database.

But, as you have noticed, relations which forms long lines are cut into pieces in the planet_osm_lines. To avoid that, you have to hack osm2pgsql a bit.

In the file output-pgsql.c, search for the comment :
// Split long linear ways after around 1 degree or 100km (polygons not effected)

change the next lines which talks about the split_at variable :
split_at = 1;
and
split_at = 100 * 1000;

and change the values to something huge (I’ve put 40000000) and then your relations are no more splited