Thu Jul 6 11:26:09 PDT 2006
- Previous message: [Slony1-commit] By cbbrowne: change to setAddTable_int(): Reject the table if the
- Next message: [Slony1-commit] By cbbrowne: Add more description to test1 README, as it's testing more
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Add a regression test to verify that tables where the proposed candidate primary key has nullable columns are rejected... Modified Files: -------------- slony1-engine/tests/test1: init_add_tables.ik (r1.4 -> r1.5) init_schema.sql (r1.3 -> r1.4) -------------- next part -------------- Index: init_add_tables.ik =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/init_add_tables.ik,v retrieving revision 1.4 retrieving revision 1.5 diff -Ltests/test1/init_add_tables.ik -Ltests/test1/init_add_tables.ik -u -w -r1.4 -r1.5 --- tests/test1/init_add_tables.ik +++ tests/test1/init_add_tables.ik @@ -2,3 +2,12 @@ set add table (id=2, set id=1, origin=1, fully qualified name = 'public.table2', key='table2_id_key'); table add key (node id = 1, fully qualified name = 'public.table3'); set add table (id=3, set id=1, origin=1, fully qualified name = 'public.table3', key = SERIAL); + +try { + set add table (id=4, set id=1, origin=1, fully qualified name = 'public.table4', key = 'no_good_candidate_pk'); +} on error { + echo 'Tried to replicate table4 with no good candidate PK - rejected'; +} on success { + echo 'Tried to replicate table4 with no good candidate PK - accepted'; + exit 1; +} Index: init_schema.sql =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/init_schema.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -Ltests/test1/init_schema.sql -Ltests/test1/init_schema.sql -u -w -r1.3 -r1.4 --- tests/test1/init_schema.sql +++ tests/test1/init_schema.sql @@ -19,3 +19,9 @@ CONSTRAINT table3_date_check CHECK (mod_date <= now()) ); +create table table4 ( + id serial NOT NULL, + id2 integer +); + +create unique index no_good_candidate_pk on table4 (id, id2); \ No newline at end of file
- Previous message: [Slony1-commit] By cbbrowne: change to setAddTable_int(): Reject the table if the
- Next message: [Slony1-commit] By cbbrowne: Add more description to test1 README, as it's testing more
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list