gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: Fixed prepared statement for extensions


From: gnunet
Subject: [taler-exchange] 01/02: Fixed prepared statement for extensions
Date: Sat, 08 Jan 2022 19:48:40 +0100

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

oec pushed a commit to branch master
in repository exchange.

commit d6bf20028dc55174cd413a37ed70d8c73f7519e6
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Sat Jan 8 19:45:00 2022 +0100

    Fixed prepared statement for extensions
---
 src/exchangedb/plugin_exchangedb_postgres.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index 268279f3..fc90f37a 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -2746,13 +2746,9 @@ prepare_statements (struct PostgresClosure *pg)
     /* Used in #postgres_set_extension_config */
     GNUNET_PQ_make_prepare (
       "set_extension_config",
-      "WITH upsert AS "
-      " (UPDATE extensions "
-      "    SET  config=$2 "
-      "         config_sig=$3 "
-      "   WHERE name=$1 RETURNING *) "
-      "INSERT INTO extensions (config, config_sig) VALUES ($2, $3) "
-      "WHERE NOT EXISTS (SELECT * FROM upsert);",
+      "INSERT INTO extensions (name, config, config_sig) VALUES ($1, $2, $3) "
+      "ON CONFLICT (name) "
+      "DO UPDATE SET (config, config_sig) = ($2, $3)",
       3),
     /* Used in #postgres_get_extension_config */
     GNUNET_PQ_make_prepare (

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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