aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_batch_reserves_in_insert.sql
diff options
context:
space:
mode:
authorJoseph <Joseph.xu@efrei.net>2023-01-05 06:07:20 -0500
committerJoseph <Joseph.xu@efrei.net>2023-01-05 06:07:20 -0500
commit7933815ce6e6043aeb9e93e4a6ba472d74ddf89b (patch)
tree8d80f420cfea859779f518de02f7f7817dfd1a06 /src/exchangedb/exchange_do_batch_reserves_in_insert.sql
parentd1491fb4215ff861d8ab77cc5aa564461490fb01 (diff)
downloadexchange-7933815ce6e6043aeb9e93e4a6ba472d74ddf89b.tar.xz
corrections applied to batch test
Diffstat (limited to 'src/exchangedb/exchange_do_batch_reserves_in_insert.sql')
-rw-r--r--src/exchangedb/exchange_do_batch_reserves_in_insert.sql3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/exchangedb/exchange_do_batch_reserves_in_insert.sql b/src/exchangedb/exchange_do_batch_reserves_in_insert.sql
index 4ae7f68a2..d86bd1ee7 100644
--- a/src/exchangedb/exchange_do_batch_reserves_in_insert.sql
+++ b/src/exchangedb/exchange_do_batch_reserves_in_insert.sql
@@ -67,7 +67,6 @@ transaction_duplicate= TRUE;
ELSE
-- We made no change, which means the reserve existed.
out_reserve_found = TRUE;
- RETURN;
END IF;
PERFORM pg_notify(in_notify, NULL);
INSERT INTO reserves_in
@@ -91,13 +90,11 @@ transaction_duplicate= TRUE;
THEN
-- HAPPY PATH THERE IS NO DUPLICATE TRANS
transaction_duplicate = FALSE;
- RETURN;
ELSE
-- Unhappy...
RAISE EXCEPTION 'Reserve did not exist, but INSERT into reserves_in gave conflict';
transaction_duplicate = TRUE;
ROLLBACK;
- RETURN;
END IF;
RETURN;
END $$;