CREATE FUNCTION UpdateTotals(IN UserID int, IN AddToCount int, IN AddToSize bigint) RETURNS void AS $$ BEGIN UPDATE Totals SET TotalSize = TotalSize + $2, TotalCount = TotalCount + $3 WHERE UserID = $1; END IF; END $$ LANGUAGE 'plpgsql' VOLATILE;
CREATE FUNCTION UpdateTotals(IN UserID int, IN AddToCount int, IN AddToSize bigint) RETURNS void AS $$ BEGIN UPDATE Totals SET TotalSize = TotalSize + $2, TotalCount = TotalCount + $3 WHERE UserID = $1; END IF; END $$ LANGUAGE 'plpgsql' VOLATILE;