feat: add housekeeper task interceptor trigger and update docs
This commit is contained in:
@@ -226,3 +226,14 @@ BEGIN
|
||||
END LOOP;
|
||||
END;
|
||||
$$;
|
||||
|
||||
-- Trigger function to silently discard housekeeper tasks for partitioned tables
|
||||
CREATE OR REPLACE FUNCTION partitions.housekeeper_insert_trigger()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
IF EXISTS (SELECT 1 FROM partitions.config WHERE table_name = NEW.tablename) THEN
|
||||
RETURN NULL;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
Reference in New Issue
Block a user