Christopher Browne cbbrowne
Mon Aug 30 15:20:08 PDT 2004
Jan Wieck <JanWieck at Yahoo.com> writes:
> On 8/29/2004 9:15 PM, Brian Hirt wrote:
>
>> i'm looking through the solnik commands, and i don't see an obvious
>> way to remove a table from a set.
>> do i have to drop the set, create a new set and subscribe it?
>
> You are right, this command is (still) missing. I was hoping that 
> someone will find this annoying and actually sit down and get familiar 
> with all the code pieces involved to implement it :-)

This should be a Simple Matter Of Programming based on how tables get
subscribed/unsubscribed within the context of a subscription, right?

Thus, on each node, we do:
  perform schemadoc.alterTableRestore(v_tab_row.tab_id);
  perform schemadoc.tableDropKey(v_tab_row.tab_id);
  delete from sl_table where id = tab_id;

I should see if I can do this one; there's a few more components to
it, but it oughtn't be too bad:

 1.  Need to augment the grammar to know about "set drop table"

 2.  Need to have a C function for set_drop_table

 3.  Need a stored procedure, droptable(), which initiates the event

 4.  Need another stored procedure, droptable_int() which does the
      alterTableRestore(), tableDropKey()

 5.  I presume (haven't looked) that slon needs to have a case
      statement added to allow it to propagate the "DROP_TABLE" 
      event.

That doesn't look too terribly nasty, as little projects go.
-- 
let name="cbbrowne" and tld="ca.afilias.info" in name ^ "@" ^ tld;;
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)


More information about the Slony1-general mailing list