5 INSERT INTO serial.pattern_template(name, pattern_code, owning_lib, share_depth)
6 VALUES ('spt-vis-test', '[]', 4, 0);
9 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(4)
10 WHERE name = 'spt-vis-test'),
12 'BR1 can see its own pattern at consortial sharing depth'
15 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(7)
16 WHERE name = 'spt-vis-test'),
18 'BR4 can see it as well at consortial sharing depth'
21 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(8)
22 WHERE name = 'spt-vis-test'),
24 'SL1 can see it as well at consortial sharing depth'
27 UPDATE serial.pattern_template SET share_depth = 2 WHERE name = 'spt-vis-test';
30 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(4)
31 WHERE name = 'spt-vis-test'),
33 'BR1 can still see own pattern at branch sharing depth'
36 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(7)
37 WHERE name = 'spt-vis-test'),
39 'BR4 CANNOT see it at branch sharing depth'
42 (SELECT COUNT(*) FROM serial.pattern_templates_visible_to(8)
43 WHERE name = 'spt-vis-test'),
45 'SL1 can still see it at branch sharing depth'