Compare commits

..

No commits in common. "d91750ca0fa635379deaf6d6641981e6d449bc1d" and "cc7d7707ab2bd43bc9e95c0eeec9ce95cdc0c523" have entirely different histories.

2 changed files with 7 additions and 4 deletions

View File

@ -27,7 +27,6 @@ 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;

View File

@ -2746,9 +2746,13 @@ prepare_statements (struct PostgresClosure *pg)
/* Used in #postgres_set_extension_config */
GNUNET_PQ_make_prepare (
"set_extension_config",
"INSERT INTO extensions (name, config, config_sig) VALUES ($1, $2, $3) "
"ON CONFLICT (name) "
"DO UPDATE SET (config, config_sig) = ($2, $3)",
"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);",
3),
/* Used in #postgres_get_extension_config */
GNUNET_PQ_make_prepare (