関数特性
言語: PLPGSQL
戻り値: bigint
セット set_id のレプリケーションを削除する DROP_SET 事象の処理。これには以下を含む:ー 元のトリガーとルールのリストア。ー シーケンス、テーブル、購読ノード、sync、およびセットそのものを含むセット構成の全てのトレースの削除。declare
p_set_id alias for $1;
v_origin int4;
begin
-- ----
-- 中枢構成にロックの取得
-- ----
lock table sl_config_lock;
-- ----
-- セットが存在しここに発生することの検査
-- ----
select set_origin into v_origin from sl_set
where set_id = p_set_id;
if not found then
raise exception 'Slony-I: set % not found', p_set_id;
end if;
if v_origin != getLocalNodeId('_schemadoc') then
raise exception 'Slony-I: set % does not originate on local node',
p_set_id;
end if;
-- ----
-- 内部セット削除機能の呼び出しと事象の生成
-- ----
perform dropSet_int(p_set_id);
return createEvent('_schemadoc', 'DROP_SET',
p_set_id);
end;