libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit bf666b1e675e51c7f90943cc1f413ffeb589fc0d
parent 69823ff11447df39ceeca879721a25153f840822
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Tue, 17 Oct 2023 00:25:23 +0200

-fix syntax

Diffstat:
Mdatabase-versioning/procedures.sql | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/database-versioning/procedures.sql b/database-versioning/procedures.sql @@ -1,7 +1,7 @@ BEGIN; SET search_path TO libeufin_bank; -CREATE OR REPLACE PROCEDURE amount_normalize( +CREATE OR REPLACE FUNCTION amount_normalize( IN amount taler_amount ,OUT normalized taler_amount ) @@ -11,10 +11,10 @@ BEGIN normalized.val = amount.val + amount.frac / 100000000; normalized.frac = amount.frac % 100000000; END $$; -COMMENT ON PROCEDURE amount_normalize +COMMENT ON FUNCTION amount_normalize IS 'Returns the normalized amount by adding to the .val the value of (.frac / 100000000) and removing the modulus 100000000 from .frac.'; -CREATE OR REPLACE PROCEDURE amount_add( +CREATE OR REPLACE FUNCTION amount_add( IN a taler_amount ,IN b taler_amount ,OUT sum taler_amount @@ -29,7 +29,7 @@ BEGIN RAISE EXCEPTION 'addition overflow'; END IF; END $$; -COMMENT ON PROCEDURE amount_add +COMMENT ON FUNCTION amount_add IS 'Returns the normalized sum of two amounts. It raises an exception when the resulting .val is larger than 2^52'; CREATE OR REPLACE FUNCTION amount_left_minus_right(