gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (cc7d7707 -> d91750ca)


From: gnunet
Subject: [taler-exchange] branch master updated (cc7d7707 -> d91750ca)
Date: Sat, 08 Jan 2022 19:48:39 +0100

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

oec pushed a change to branch master
in repository exchange.

    from cc7d7707 [age restriction] progress 10/n
     new d6bf2002 Fixed prepared statement for extensions
     new d91750ca drop extensions table

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchangedb/drop0001.sql                 |  1 +
 src/exchangedb/plugin_exchangedb_postgres.c | 10 +++-------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/exchangedb/drop0001.sql b/src/exchangedb/drop0001.sql
index f28a6b77..cab193db 100644
--- a/src/exchangedb/drop0001.sql
+++ b/src/exchangedb/drop0001.sql
@@ -27,6 +27,7 @@ SELECT _v.unregister_patch('exchange-0001');
 
 -- Drops for exchange-0001.sql
 DROP TABLE IF EXISTS revolving_work_shards CASCADE;
+DROP TABLE IF EXISTS extensions CASCADE;
 DROP TABLE IF EXISTS auditors CASCADE;
 DROP TABLE IF EXISTS auditor_denom_sigs CASCADE;
 DROP TABLE IF EXISTS exchange_sign_keys CASCADE;
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]