diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-08 22:36:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-08 22:36:39 +0200 |
commit | 06bfbd9150e61a1b076175b22b27be4c88e058f3 (patch) | |
tree | dfadd02f66763bf79212f1bac58eb4e2f3e03033 /src/exchangedb/plugin_exchangedb_postgres.c | |
parent | 60c08dccecd7e1aa578e497c57cc1fb6b29b655d (diff) |
-sql fixes
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 83a64be8..aaf38ea4 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -3538,6 +3538,7 @@ prepare_statements (struct PostgresClosure *pg) "INSERT INTO purse_requests" " (purse_pub" " ,merge_pub" + " ,purse_creation" " ,purse_expiration" " ,h_contract_terms" " ,age_limit" @@ -3549,9 +3550,9 @@ prepare_statements (struct PostgresClosure *pg) " ,purse_fee_frac" " ,purse_sig" " ) VALUES " - " ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)" + " ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)" " ON CONFLICT DO NOTHING;", - 12), + 13), /* Used in #postgres_select_purse */ GNUNET_PQ_make_prepare ( "select_purse", @@ -13511,12 +13512,14 @@ postgres_insert_purse_request ( { struct PostgresClosure *pg = cls; enum GNUNET_DB_QueryStatus qs; + struct GNUNET_TIME_Timestamp now = GNUNET_TIME_timestamp_get (); uint32_t flags32 = (uint32_t) flags; bool in_reserve_quota = (TALER_WAMF_MODE_CREATE_WITH_PURSE_FEE == (flags & TALER_WAMF_MERGE_MODE_MASK)); struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (purse_pub), GNUNET_PQ_query_param_auto_from_type (merge_pub), + GNUNET_PQ_query_param_timestamp (&now), GNUNET_PQ_query_param_timestamp (&purse_expiration), GNUNET_PQ_query_param_auto_from_type (h_contract_terms), GNUNET_PQ_query_param_uint32 (&age_limit), |