BEGIN;
SAVEPOINT start;
INSERT INTO users VALUES(user || suffix);
EXIT;
EXCEPTION
WHEN UNIQUE_VIOLATION THEN
ROLLBACK TO start;
suffix := suffix + 1;
END;
By the way, while I know Oracle won't abort the transaction, they might
rollback whatever work the command that failed had done; I'm not really
sure how that's handled.
How about a new EXCEPTION clause:
EXCEPTION NO ROLLBACK
WHEN UNIQUE...
Chirs
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match