diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-08-02 12:13:24 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-08-02 12:13:24 +0200 |
commit | 59b817cafdc1eeecffdce3667ad52d5c648b43e4 (patch) | |
tree | 75c1e3eb99feae64c502a630144833e87b407460 | |
parent | b91f4280a7e17ea164ca33c0f3a5e16b13ff4af9 (diff) | |
parent | aee288438cf7c92c9e6596f7efcdcdefa074820c (diff) |
Merge branch 'master' of git+ssh://git.taler.net/exchange
-rw-r--r-- | src/exchangedb/exchange_do_amount_specific.sql | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exchangedb/exchange_do_amount_specific.sql b/src/exchangedb/exchange_do_amount_specific.sql index 96846cce0..e8f60f40d 100644 --- a/src/exchangedb/exchange_do_amount_specific.sql +++ b/src/exchangedb/exchange_do_amount_specific.sql @@ -2,7 +2,7 @@ -- Taler amounts and helper functions ------------------------------------------------------------- -CREATE OR REPLACE PROCEDURE amount_normalize( +CREATE OR REPLACE FUNCTION amount_normalize( IN amount taler_amount ,OUT normalized taler_amount ) @@ -13,10 +13,10 @@ BEGIN 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 @@ -33,7 +33,7 @@ BEGIN 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( |