diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-12-05 11:15:59 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-12-05 11:15:59 +0100 |
commit | 461dc8e36ccc2e31799087bee4604c33bee9afc6 (patch) | |
tree | 800704428681ea66f1c19ea12fd76df4061447ed /src/exchangedb | |
parent | 07b4b1aa3f2c9ac74462ff3cb2b6a32c25e13c2e (diff) | |
download | exchange-461dc8e36ccc2e31799087bee4604c33bee9afc6.tar.xz |
-fix crash if there is a conflict on inserting into the purse_decision table
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/procedures.sql | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/exchangedb/procedures.sql b/src/exchangedb/procedures.sql index ff3ddb3f7..a869d4739 100644 --- a/src/exchangedb/procedures.sql +++ b/src/exchangedb/procedures.sql @@ -1557,7 +1557,14 @@ INSERT INTO purse_decision VALUES (in_purse_pub ,in_now - ,FALSE); + ,FALSE) +ON CONFLICT DO NOTHING; + +IF NOT FOUND +THEN + out_conflict=TRUE; + RETURN; +END IF; IF (my_in_reserve_quota) THEN |