0002-preamble.sql (1946B)
1 -- 2 -- This file is part of TALER 3 -- Copyright (C) 2014--2023 Taler Systems SA 4 -- 5 -- TALER is free software; you can redistribute it and/or modify it under the 6 -- terms of the GNU General Public License as published by the Free Software 7 -- Foundation; either version 3, or (at your option) any later version. 8 -- 9 -- TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 -- A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 -- 13 -- You should have received a copy of the GNU General Public License along with 14 -- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 -- 16 17 BEGIN; 18 19 SELECT _v.register_patch('exchange-0002', NULL, NULL); 20 SET search_path TO exchange; 21 22 CREATE DOMAIN gnunet_hashcode 23 AS BYTEA 24 CHECK(LENGTH(VALUE) = 32); 25 26 CREATE TYPE taler_amount 27 AS 28 (val INT8 29 ,frac INT4 30 ); 31 COMMENT ON TYPE taler_amount 32 IS 'Stores an amount, fraction is in units of 1/100000000 of the base value'; 33 34 CREATE TYPE exchange_do_array_reserve_insert_return_type 35 AS 36 (transaction_duplicate BOOLEAN 37 ,ruuid INT8 38 ); 39 COMMENT ON TYPE exchange_do_array_reserve_insert_return_type 40 IS 'Return type for exchange_do_array_reserves_insert() stored procedure'; 41 42 CREATE TYPE exchange_do_select_deposits_missing_wire_return_type 43 AS 44 ( 45 batch_deposit_serial_id INT8, 46 total_amount taler_amount, 47 wire_target_h_payto BYTEA, 48 deadline INT8 49 ); 50 COMMENT ON TYPE exchange_do_select_deposits_missing_wire_return_type 51 IS 'Return type for exchange_do_select_deposits_missing_wire'; 52 53 CREATE TYPE exchange_do_select_aggregations_above_serial_return_type 54 AS 55 ( 56 batch_deposit_serial_id INT8, 57 aggregation_serial_id INT8, 58 total_amount taler_amount 59 ); 60 COMMENT ON TYPE exchange_do_select_aggregations_above_serial_return_type 61 IS 'Return type for exchange_do_select_aggregations_above_serial';