Displaying 1 result from an estimated 1 matches for "dict_iterate_flag_sort_by_valu".
Did you mean:
dict_iterate_flag_sort_by_value
2009 Aug 09
1
Wiki entry for expire plugin, PostgreSQL trigger needs update
...$$ 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 + strlen(DICT_EXPIRE_PREFIX);
[...]
T_BEGIN {
username = t_strdup_until(userp, p);
If thi...