SET BAIL ON;

EXECUTE PROCEDURE sp_patch_from(3); COMMIT;

CREATE TABLE test3 (
    foo INTEGER
);
INSERT INTO test3 VALUES (1);
INSERT INTO test3 VALUES (2);
INSERT INTO test3 VALUES (3);
INSERT INTO test3 VALUES (4);
INSERT INTO test3 VALUES (5);
INSERT INTO test3 VALUES (6);
INSERT INTO test3 VALUES (7);
COMMIT;

EXECUTE PROCEDURE sp_patch_to(4, 'test2 table'); COMMIT;
