summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-10-17 00:25:23 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-10-17 00:25:23 +0200
commitbf666b1e675e51c7f90943cc1f413ffeb589fc0d (patch)
treed7ebd577128e92314b79c9bf09a935326931e157
parent69823ff11447df39ceeca879721a25153f840822 (diff)
downloadlibeufin-bf666b1e675e51c7f90943cc1f413ffeb589fc0d.tar.gz
libeufin-bf666b1e675e51c7f90943cc1f413ffeb589fc0d.tar.bz2
libeufin-bf666b1e675e51c7f90943cc1f413ffeb589fc0d.zip
-fix syntax
m---------build-system/taler-build-scripts0
-rw-r--r--database-versioning/procedures.sql8
2 files changed, 4 insertions, 4 deletions
diff --git a/build-system/taler-build-scripts b/build-system/taler-build-scripts
-Subproject 001f5dd081fc8729ff8def90c4a1c3f93eb8689
+Subproject 47f14fcf1d03d9dad1bae59987488ea05ecd307
diff --git a/database-versioning/procedures.sql b/database-versioning/procedures.sql
index e719cd9b..5a619e40 100644
--- 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(