diff options
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 |
commit | a1dae0199f3bc3e9f66fc1375c652c6f99b26b2c (patch) | |
tree | ae2be069b97117bf65eb681a58cf3d74cd3cd471 /src/exchangedb/0002-reserves.sql | |
parent | 8f9731e83009f13a8b4e172aec1252bc79c4dee1 (diff) | |
download | exchange-a1dae0199f3bc3e9f66fc1375c652c6f99b26b2c.tar.xz |
FAILING attempt to make echange.reserve use taler_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/0002-reserves.sql')
-rw-r--r-- | src/exchangedb/0002-reserves.sql | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/exchangedb/0002-reserves.sql b/src/exchangedb/0002-reserves.sql index 3d345afd5..3e836133b 100644 --- a/src/exchangedb/0002-reserves.sql +++ b/src/exchangedb/0002-reserves.sql @@ -27,8 +27,7 @@ BEGIN 'CREATE TABLE %I' '(reserve_uuid BIGINT GENERATED BY DEFAULT AS IDENTITY' ',reserve_pub BYTEA PRIMARY KEY CHECK(LENGTH(reserve_pub)=32)' - ',current_balance_val INT8 NOT NULL DEFAULT(0)' - ',current_balance_frac INT4 NOT NULL DEFAULT(0)' + ',current_balance taler_amount NOT NULL DEFAULT (0, 0)' ',purses_active INT8 NOT NULL DEFAULT(0)' ',purses_allowed INT8 NOT NULL DEFAULT(0)' ',birthday INT4 NOT NULL DEFAULT(0)' @@ -52,7 +51,7 @@ BEGIN ); PERFORM comment_partitioned_column( 'Current balance remaining with the reserve.' - ,'current_balance_val' + ,'current_balance' ,table_name ,partition_suffix ); @@ -109,8 +108,7 @@ BEGIN 'CREATE INDEX ' || table_name || '_by_expiration_index ' 'ON ' || table_name || ' ' '(expiration_date' - ',current_balance_val' - ',current_balance_frac' + ',current_balance' ');' ); EXECUTE FORMAT ( |