You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file "1_base.sql" the table ip_rib contains isPrePolicy and isAdjRibIn fields
CREATE TABLE ip_rib (
.....
isPrePolicy boolean NOT NULL DEFAULT true,
isAdjRibIn boolean NOT NULL DEFAULT true,
);
At same time, the table ip_rib_log lacks those fields, should be added
CREATE TABLE ip_rib_log (
id bigserial NOT NULL,
base_attr_hash_id uuid NOT NULL,
timestamp timestamp(6) without time zone default (now() at time zone 'utc') NOT NULL,
peer_hash_id uuid NOT NULL,
prefix inet NOT NULL,
prefix_len smallint NOT NULL,
origin_as bigint NOT NULL,
isWithdrawn boolean NOT NULL
) TABLESPACE timeseries;
v_ip_routes_history as dependent on ip_rib_log should also containthose fields, file "8_views.sql"
And, update function of ip_rib_log table, file "9_triggers.sql", should include new.isPrePolicy and new.isAdjRibIn values!
CREATE OR REPLACE FUNCTION t_ip_rib_update()
RETURNS trigger AS $$
BEGIN
IF (new.isWithdrawn) THEN
INSERT INTO ip_rib_log (isWithdrawn,prefix,prefix_len,base_attr_hash_id,peer_hash_id,origin_as,timestamp)
VALUES (true,new.prefix,new.prefix_len,old.base_attr_hash_id,new.peer_hash_id,
old.origin_as,new.timestamp);
ELSE
INSERT INTO ip_rib_log (isWithdrawn,prefix,prefix_len,base_attr_hash_id,peer_hash_id,origin_as,timestamp)
VALUES (false,new.prefix,new.prefix_len,new.base_attr_hash_id,new.peer_hash_id,
new.origin_as,new.timestamp);
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
The text was updated successfully, but these errors were encountered:
@v1shnya, Thanks. They can be added to the ip_rib_log table. While they are not there now, a log entry will be added because the rib hash ID includes those values in the hash.
In the file "1_base.sql" the table ip_rib contains isPrePolicy and isAdjRibIn fields
At same time, the table ip_rib_log lacks those fields, should be added
v_ip_routes_history as dependent on ip_rib_log should also containthose fields, file "8_views.sql"
And, update function of ip_rib_log table, file "9_triggers.sql", should include new.isPrePolicy and new.isAdjRibIn values!
The text was updated successfully, but these errors were encountered: