aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.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/plugin_exchangedb_postgres.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/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 93ea09cd..4f8959ff 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -294,14 +294,6 @@ TEH_PG_internal_setup (struct PostgresClosure *pg)
if (NULL == db_conn)
return GNUNET_SYSERR;
- if (GNUNET_OK != TALER_PQ_load_oids_for_composite_types (db_conn))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to load OIDs for composite types\n");
- GNUNET_PQ_disconnect (db_conn);
- return GNUNET_SYSERR;
- }
-
pg->prep_gen++;
pg->conn = db_conn;
}
@@ -787,6 +779,12 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
plugin->batch_ensure_coin_known
= &TEH_PG_batch_ensure_coin_known;
+ if (GNUNET_OK != TALER_PQ_load_oids_for_composite_types (pg->conn))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to load OIDs for composite types\n");
+ }
+
return plugin;
}