我有一个带有列的表格
ALTER TABLE foo
ADD COLUMN modified_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP
由触发器修改的
CREATE OR REPLACE FUNCTION trigger_set_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.modified_at = CURRENT_TIMESTAMP;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER set_timestamp BEFORE UPDATE ON foo FOR EACH ROW EXECUTE PROCEDURE trigger_set_timestamp();
在这种情况下,BRIN索引是否是标准BTREE索引的良好替代品?