Displaying 1 result from an estimated 1 matches for "dict_expire_prefix".
2009 Aug 09
1
Wiki entry for expire plugin, PostgreSQL trigger needs update
...ND mailbox = NEW.mailbox;
RETURN NULL;
ELSE
RETURN NEW;
END IF;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER mergeexpires BEFORE INSERT ON expires
FOR EACH ROW EXECUTE PROCEDURE merge_expires();
At least that's what I think after looking at the code:
iter = dict_iterate_init(dict, DICT_EXPIRE_PREFIX,
DICT_ITERATE_FLAG_RECURSE |
DICT_ITERATE_FLAG_SORT_BY_VALUE);
/* We'll get the oldest values (timestamps) first */
while (dict_iterate(iter, &key, &value) > 0) {
/* key = DICT_EXPIRE_PREFIX<user>/<mailbox> */
userp = key + s...