mmmh, sorry, probably i'm not understanding the idea but I can't see the point on doing this... why do you use pl/psql for manage a raster? you can simply copy the file to another file, or use perl piddles or ... a lot of posibilities