次の plpgsql 関数があります。
CREATE FUNCTION user_delete(
IN id INT4
)
RETURNS VOID
AS
$BODY$
BEGIN
DELETE FROM user_role WHERE user_id = id;
DELETE FROM user_permission WHERE user_id = id;
DELETE FROM permission_cache WHERE user_id = id;
DELETE FROM access WHERE user_id = id;
DELETE FROM "user" WHERE user_id = id;
END;
$BODY$
LANGUAGE plpgsql VOLATILE;
単一の select for update クエリを使用して、すべてのテーブルで used_id に関連する行をロックすることは可能ですか?