関数特性
言語: PLPGSQL
戻り値: integer
no_id - ノード識別子番号 no_comment - 人手によるコメント no_spool - 仮想スプールノードに対するフラグ ノード no_id に対する STORE_NODE 事象を処理する内部関数。declare p_no_id alias for $1; p_no_comment alias for $2; p_no_spool alias for $3; v_old_row record; begin -- ---- -- 中枢構成のロックを取得 -- ---- lock table sl_config_lock; -- ---- -- ノードの存在を検査 -- ---- select * into v_old_row from sl_node where no_id = p_no_id for update; if found then -- ---- -- ノードが存在し、存在する行を更新 -- ---- update sl_node set no_comment = p_no_comment, no_spool = p_no_spool where no_id = p_no_id; else -- ---- -- 新規ノード、sl_node 行を挿入 -- ---- insert into sl_node (no_id, no_active, no_comment, no_spool) values (p_no_id, 'f', p_no_comment, p_no_spool); end if; return p_no_id; end;