Displaying 2 results from an estimated 2 matches for "mergequota".
2009 Jul 20
1
Problem with quota-dict
...rname_field = username
My database table:
CREATE TABLE quota
(
username character varying(255) NOT NULL,
path character varying(100) NOT NULL,
"current" integer,
CONSTRAINT quota_pkey PRIMARY KEY (username, path)
)
WITH (OIDS=FALSE);
ALTER TABLE quota OWNER TO mail;
-- Trigger: mergequota on quota
-- DROP TRIGGER mergequota ON quota;
CREATE TRIGGER mergequota
BEFORE INSERT
ON quota
FOR EACH ROW
EXECUTE PROCEDURE merge_quota();
connect = host=localhost dbname=mail user=dovecot password=jianueyeePeev5o
table = quota
select_field = current
where_field = path
username_field =...
2015 Oct 16
0
quotas configuration a few questions
...ERT INTO quota (bytes, messages, username)
VALUES (NEW.bytes, -NEW.messages, NEW.username);
END IF;
return NULL;
EXCEPTION WHEN unique_violation THEN
-- someone just inserted the record, update it
END;
END LOOP;
END;
$$ LANGUAGE plpgsql;
DROP TRIGGER IF EXISTS mergequota ON quota;
CREATE TRIGGER mergequota BEFORE INSERT ON quota
FOR EACH ROW EXECUTE PROCEDURE merge_quota();
--(postgresql stuff)--
============ /etc/dovecot/dovecot-dict-sql.conf
connect = host=/run/postgresql dbname=mail user=mailreader
map {
pattern = priv/quota/storage...