Luca Rasconi wrote:
CREATE OR REPLACE RULE r1 AS ON INSERT TO TABLE_A DO INSERT INTO TABLE_B (uid) VALUES ((new.uid));
how is it possible, why in a table 37 and in the other 37 + 1?
This is almost certainly the "nextval() evaluated twice" issue that catches everyone out from time to time. Check the mailing-list archives for discussion - it's because the rule acts as a macro, duplicating the expression.
-- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster