diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-12-28 12:41:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-12-28 12:41:49 +0100 |
commit | 1e7e0058e85e7399ff39e1fc9eaa4316afd5b91c (patch) | |
tree | b36cb9da2e5b7a227ed0f179d754cad137d86254 /src/exchangedb | |
parent | 7212cd12bc1ac962b59c9542b28e7c2b55f2d171 (diff) |
handle idempotency on purse deletion
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchange_do_delete_purse.sql | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/exchangedb/exchange_do_delete_purse.sql b/src/exchangedb/exchange_do_delete_purse.sql index 3d493e624..1e6540ecf 100644 --- a/src/exchangedb/exchange_do_delete_purse.sql +++ b/src/exchangedb/exchange_do_delete_purse.sql @@ -54,7 +54,13 @@ INSERT INTO purse_deletion ,purse_sig) VALUES (in_purse_pub - ,in_purse_sig); + ,in_purse_sig) +ON CONFLICT DO NOTHING; + +IF NOT FOUND +THEN + RETURN; +END IF; -- store purse decision INSERT INTO purse_decision |