aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_get_expired_reserves.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-07-28 19:01:57 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-07-28 19:01:57 +0200
commita1dae0199f3bc3e9f66fc1375c652c6f99b26b2c (patch)
treeae2be069b97117bf65eb681a58cf3d74cd3cd471 /src/exchangedb/pg_get_expired_reserves.c
parent8f9731e83009f13a8b4e172aec1252bc79c4dee1 (diff)
FAILING attempt to make echange.reserve use taler_amountfail-amount
Fails with > TALER_PREFIX=/usr/local ./test-exchangedb-postgres 2023-07-28T19:02:25.150845+0200 /home/oec/projects/taler/exchange/src/exchangedb/.libs/test-exchangedb-postgres-2559159 WARNING Could not run PSQL on file /usr/local/share/taler//sql/exchange/drop.sql: psql exit code was 3 2023-07-28T19:02:32.488085+0200 pq-2559159 ERROR Query `call_withdraw' failed with result: invalid input syntax for type bigint: "(1,1000)"/(null)/ERROR: invalid input syntax for type bigint: "(1,1000)" CONTEXT: PL/pgSQL function exchange_do_withdraw(bytea,taler_amount,bytea,bytea,bytea,bytea,bytea,bigint,bigint,boolean) line 23 at SQL statement /PGRES_FATAL_ERROR/ERROR: invalid input syntax for type bigint: "(1,1000)" CONTEXT: PL/pgSQL function exchange_do_withdraw(bytea,taler_amount,bytea,bytea,bytea,bytea,bytea,bigint,bigint,boolean) line 23 at SQL statement 2023-07-28T19:02:32.488146+0200 /home/oec/projects/taler/exchange/src/exchangedb/.libs/test-exchangedb-postgres-2559159 ERROR Assertion failed at test_exchangedb.c:1428.
Diffstat (limited to 'src/exchangedb/pg_get_expired_reserves.c')
-rw-r--r--src/exchangedb/pg_get_expired_reserves.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/exchangedb/pg_get_expired_reserves.c b/src/exchangedb/pg_get_expired_reserves.c
index c7162dc6..d94a9305 100644
--- a/src/exchangedb/pg_get_expired_reserves.c
+++ b/src/exchangedb/pg_get_expired_reserves.c
@@ -84,8 +84,9 @@ reserve_expired_cb (void *cls,
&account_details),
GNUNET_PQ_result_spec_auto_from_type ("reserve_pub",
&reserve_pub),
- TALER_PQ_RESULT_SPEC_AMOUNT ("current_balance",
- &remaining_balance),
+ TALER_PQ_result_spec_amount_tuple ("current_balance",
+ pg->currency,
+ &remaining_balance),
GNUNET_PQ_result_spec_end
};
@@ -137,7 +138,7 @@ TEH_PG_get_expired_reserves (void *cls,
" SELECT * "
" FROM reserves "
" WHERE expiration_date <= $1 "
- " AND (current_balance_val != 0 OR current_balance_frac != 0) "
+ " AND (current_balance.val != 0 OR current_balance.frac != 0) "
" ORDER BY expiration_date ASC "
" LIMIT 1 "
") "
@@ -145,8 +146,7 @@ TEH_PG_get_expired_reserves (void *cls,
" ed.expiration_date "
" ,payto_uri AS account_details "
" ,ed.reserve_pub "
- " ,current_balance_val "
- " ,current_balance_frac "
+ " ,current_balance "
"FROM ( "
" SELECT "
" * "