Possible to have nested inserts in Postgres 8.4?
You should be able to do something like this with a writable CTE:

WITH i AS (
   INSERT INTO host (hostname, hostrole) VALUES ('foobar', 'Virtual') RETURNING id
)
INSERT INTO interface (name, mac, host)
SELECT 'eth0', '00:50:56:9d:34:d4', id
FROM i


(untested, but it should be something like that)

Writable CTE is in PostgreSQL 9.1 and up.