Issue #2551 resolved
apparently INSERTs (and UPDATE, DELETE) can have CTEs in pg 9.1. , plus UPDATE, SELECT, DELETE in CTEs.
apparently its all possible now. might as well make a new syntax bonanza out of it:
WITH upsert AS ( UPDATE metric k SET k.count = k.count + 5 WHERE event = "foo" AND interval = "D" and date = "whatever" RETURNING k.* ) INSERT INTO metric (event, interval, date, count) SELECT ("foo", "D", "whatever", 5) WHERE NOT EXISTS ( SELECT 1 FROM upsert );