diff --git a/services/horizon/internal/db2/schema/migrations/47_precompute_trade_aggregations.sql b/services/horizon/internal/db2/schema/migrations/47_precompute_trade_aggregations.sql index 5aee54bac8..b9ed12700d 100644 --- a/services/horizon/internal/db2/schema/migrations/47_precompute_trade_aggregations.sql +++ b/services/horizon/internal/db2/schema/migrations/47_precompute_trade_aggregations.sql @@ -42,8 +42,7 @@ CREATE TABLE history_trades_60000 ( -- TODO: This should probably handle updates, not just inserts. -- TODO: This shouldn't assume we are always inserting in order. CREATE OR REPLACE FUNCTION update_history_trades_compute_1m() - RETURNS trigger - language plpgsql AS $$ + RETURNS trigger AS $$ DECLARE timestamp bigint; key text; @@ -90,7 +89,8 @@ CREATE OR REPLACE FUNCTION update_history_trades_compute_1m() AND h.counter_asset_id = new.counter_asset_id; RETURN NULL; - END $$; + END; +$$ LANGUAGE plpgsql; -- Wire up the trigger on inserts. CREATE TRIGGER htrd_compute_1m