[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 02/05: select on denom_pub_hash instead of
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 02/05: select on denom_pub_hash instead of denom_pub as the hash is a primary key |
Date: |
Fri, 14 Jul 2017 19:28:26 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit e1aa257ee1f05a6e281f188a6512d6c4946b86bd
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jul 14 17:49:34 2017 +0200
select on denom_pub_hash instead of denom_pub as the hash is a primary key
---
src/exchangedb/plugin_exchangedb_postgres.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c
b/src/exchangedb/plugin_exchangedb_postgres.c
index a1039d1..7b84b23 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -504,7 +504,7 @@ postgres_prepare (PGconn *db_conn)
",fee_refund_frac"
",fee_refund_curr" /* must match coin_curr */
" FROM denominations"
- " WHERE denom_pub=$1;",
+ " WHERE denom_pub_hash=$1;",
1),
/* Used in #postgres_insert_denomination_revocation() */
GNUNET_PQ_make_prepare ("denomination_revocation_insert",
@@ -1687,8 +1687,9 @@ postgres_get_denomination_info (void *cls,
struct
TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
{
enum GNUNET_DB_QueryStatus qs;
+ struct GNUNET_HashCode dph;
struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_rsa_public_key (denom_pub->rsa_public_key),
+ GNUNET_PQ_query_param_auto_from_type (&dph),
GNUNET_PQ_query_param_end
};
struct GNUNET_PQ_ResultSpec rs[] = {
@@ -1717,6 +1718,8 @@ postgres_get_denomination_info (void *cls,
GNUNET_PQ_result_spec_end
};
+ GNUNET_CRYPTO_rsa_public_key_hash (denom_pub->rsa_public_key,
+ &dph);
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"denomination_get",
params,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-exchange] branch master updated (e140b41 -> a301aad), gnunet, 2017/07/14
- [GNUnet-SVN] [taler-exchange] 02/05: select on denom_pub_hash instead of denom_pub as the hash is a primary key,
gnunet <=
- [GNUnet-SVN] [taler-exchange] 03/05: make reserves_update more canonical, avoiding odd WHERE constraint that is unnecessary, gnunet, 2017/07/14
- [GNUnet-SVN] [taler-exchange] 05/05: add missing indices where needed, gnunet, 2017/07/14
- [GNUnet-SVN] [taler-exchange] 04/05: add UNIQUE constraint on BIGSERIAL columns as that is not automatic in Postgres, gnunet, 2017/07/14
- [GNUnet-SVN] [taler-exchange] 01/05: clean up PQ tables (renamings, remove redunant column), and primarily fix #4751, gnunet, 2017/07/14