Bug 43

Summary: get_set() is used inconsistently in altperl tools
Product: Slony-I Reporter: Mark Stosberg <mark>
Component: altperlAssignee: Slony Bugs List <slony1-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: peter, slony1-bugs
Priority: high    
Version: 1.2   
Hardware: PC   
OS: Linux   
Attachments: patch to fix the issue

Description Mark Stosberg 2008-03-27 13:00:24 UTC
One of the nice features of the altperl tools is the potential to use memorable names for sets instead of numbers. 

However, I have to say "potential" because this feature is not supported throughout all of the tools. 

The following tools use the "get_set" method, which enables this:

/usr/local/sbin/slonik_create_set
/usr/local/sbin/slonik_drop_set
/usr/local/sbin/slonik_drop_table
/usr/local/sbin/slonik_execute_script
/usr/local/sbin/slonik_subscribe_set

However, the following scripts use a more primitive method of getting the set ID, allowing it only be either a number or the word "set", followed by a number:

/usr/local/sbin/slonik_drop_set
/usr/local/sbin/slonik_execute_script
/usr/local/sbin/slonik_merge_sets
/usr/local/sbin/slonik_move_set
/usr/local/sbin/slonik_subscribe_set
/usr/local/sbin/slonik_unsubscribe_set

Until these are also refactored to also use "get_set()", using memorable names as set identifiers is not possible. 

Thanks!

   Mark
Comment 1 Peter Eisentraut 2010-01-04 03:59:45 UTC
Created attachment 38 [details]
patch to fix the issue

Here is a patch to fix the issue.  It uses get_set() everywhere a set name/number is wanted.
Comment 2 Steve Singer 2010-06-30 07:05:33 UTC
This patch has been applied to the 2.0 and HEAD branches.
It should be included with 2.0.5

Thanks