Thanks Michael. There's still a problem when psql exists with a non-zero exit status. I think the attached patch is needed in addition. -- Simen