Bug 43 - get_set() is used inconsistently in altperl tools
Summary: get_set() is used inconsistently in altperl tools
Status: RESOLVED FIXED
Alias: None
Product: Slony-I
Classification: Unclassified
Component: altperl (show other bugs)
Version: 1.2
Hardware: PC Linux
: high minor
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2008-03-27 13:00 UTC by Mark Stosberg
Modified: 2010-06-30 07:05 UTC (History)
2 users (show)

See Also:


Attachments
patch to fix the issue (3.84 KB, patch)
2010-01-04 03:59 UTC, Peter Eisentraut
Details

Note You need to log in before you can comment on or make changes to this bug.
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