gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] branch master updated: exchangedb/postgres


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: exchangedb/postgres: handle duplicate wire transfers correctly
Date: Mon, 05 Feb 2018 21:49:48 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 48fd50f  exchangedb/postgres: handle duplicate wire transfers correctly
48fd50f is described below

commit 48fd50f922a7385dfd46c81dc6ecef65ef94812b
Author: Florian Dold <address@hidden>
AuthorDate: Mon Feb 5 21:49:35 2018 +0100

    exchangedb/postgres: handle duplicate wire transfers correctly
---
 src/exchangedb/plugin_exchangedb_postgres.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index a9d5db7..a4f32cd 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -583,7 +583,8 @@ postgres_prepare (PGconn *db_conn)
                             ",sender_account_details"
                             ",execution_date"
                             ") VALUES "
-                            "($1, $2, $3, $4, $5, $6, $7);",
+                            "($1, $2, $3, $4, $5, $6, $7) "
+                            "ON CONFLICT DO NOTHING;",
                             7),
     /* Used in postgres_select_reserves_in_above_serial_id() to obtain inbound
        transactions for reserves with serial id '\geq' the given parameter */
@@ -1870,9 +1871,8 @@ postgres_reserves_in_insert (void *cls,
       return GNUNET_DB_STATUS_SOFT_ERROR;
     }
   }
-  /* Create new incoming transaction, SQL "primary key" logic
-     is used to guard against duplicates.  If a duplicate is
-     detected, we just "succeed" with no changes. */
+  /* Create new incoming transaction, "ON CONFLICT DO NOTHING"
+     is used to guard against duplicates. */
   {
     struct GNUNET_PQ_QueryParam params[] = {
       GNUNET_PQ_query_param_auto_from_type (&reserve.pub),

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]