commit c204a2a63b509cfe9310fd3a41fcbbed671b7a85
parent be0fec7f89952f07765cb1010f0ff619177c24a0
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 26 Dec 2025 12:37:44 +0100
more of the new pot/report/group SQL functions
Diffstat:
16 files changed, 472 insertions(+), 18 deletions(-)
diff --git a/src/backenddb/merchant-0028.sql b/src/backenddb/merchant-0028.sql
@@ -56,7 +56,7 @@ COMMENT ON COLUMN merchant_reports.target_address
COMMENT ON COLUMN merchant_reports.frequency
IS 'Relative time with the desired report frequency';
COMMENT ON COLUMN merchant_reports.frequency_shift
- IS 'Relative time (possibly negative!) by which to offset the actual transmission from the frequency multiple';
+ IS 'Relative time by which to offset the actual transmission from the frequency multiple';
COMMENT ON COLUMN merchant_reports.next_transmission
IS 'Absolute time at which we should do the next transmission';
COMMENT ON COLUMN merchant_reports.last_error_code
@@ -65,7 +65,7 @@ COMMENT ON COLUMN merchant_reports.last_error_detail
IS 'Additional human-readable text explaining errors from the last transmission attempt (for diagnostics), NULL on success';
-CREATE TABLE merchant_product_group
+CREATE TABLE merchant_product_groups
(product_group_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
,merchant_serial BIGINT NOT NULL
REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
@@ -73,21 +73,21 @@ CREATE TABLE merchant_product_group
,product_group_description TEXT NOT NULL
,UNIQUE (merchant_serial,product_group_name)
);
-COMMENT ON TABLE merchant_product_group
+COMMENT ON TABLE merchant_product_groups
IS 'Specifies a product group';
-COMMENT ON COLUMN merchant_product_group.product_group_serial
+COMMENT ON COLUMN merchant_product_groups.product_group_serial
IS 'Unique identifier for the group';
-COMMENT ON COLUMN merchant_product_group.merchant_serial
+COMMENT ON COLUMN merchant_product_groups.merchant_serial
IS 'Merchant instance using the group';
-COMMENT ON COLUMN merchant_product_group.product_group_name
+COMMENT ON COLUMN merchant_product_groups.product_group_name
IS 'Name for the group';
-COMMENT ON COLUMN merchant_product_group.product_group_description
+COMMENT ON COLUMN merchant_product_groups.product_group_description
IS 'Human-readable description for the group';
ALTER TABLE merchant_inventory
ADD COLUMN product_group_serial INT8 DEFAULT (NULL)
- REFERENCES merchant_product_group (product_group_serial)
+ REFERENCES merchant_product_groups (product_group_serial)
ON DELETE SET NULL,
ADD COLUMN price_is_net BOOL DEFAULT (FALSE);
@@ -97,7 +97,7 @@ COMMENT ON COLUMN merchant_inventory.price_is_net
IS 'If true, the price given is the net price; if false, it is the gross price.';
-CREATE TABLE merchant_money_pot
+CREATE TABLE merchant_money_pots
(money_pot_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
,merchant_serial BIGINT NOT NULL
REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
@@ -106,17 +106,17 @@ CREATE TABLE merchant_money_pot
,pot_total taler_amount_currency NOT NULL
,UNIQUE (merchant_serial,money_pot_name)
);
-COMMENT ON TABLE merchant_money_pot
+COMMENT ON TABLE merchant_money_pots
IS 'Accounting construct for tracking finances by groups such as net income, taxes, tips to be paid to staff, etc.';
-COMMENT ON COLUMN merchant_money_pot.money_pot_serial
+COMMENT ON COLUMN merchant_money_pots.money_pot_serial
IS 'Unique identifier for the money pot';
-COMMENT ON COLUMN merchant_money_pot.merchant_serial
+COMMENT ON COLUMN merchant_money_pots.merchant_serial
IS 'Merchant instance using the group';
-COMMENT ON COLUMN merchant_money_pot.money_pot_name
+COMMENT ON COLUMN merchant_money_pots.money_pot_name
IS 'Name for the money pot';
-COMMENT ON COLUMN merchant_money_pot.money_pot_description
+COMMENT ON COLUMN merchant_money_pots.money_pot_description
IS 'Human-readable description for the money pot';
-COMMENT ON COLUMN merchant_money_pot.pot_total
+COMMENT ON COLUMN merchant_money_pots.pot_total
IS 'Total amount in the pot';
diff --git a/src/backenddb/pg_delete_money_pot.c b/src/backenddb/pg_delete_money_pot.c
@@ -31,4 +31,24 @@ TMH_PG_delete_money_pot (void *cls,
const char *instance_id,
uint64_t money_pot_id)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&money_pot_id),
+ GNUNET_PQ_query_param_end
+ };
+
+ check_connection (pg);
+ PREPARE (pg,
+ "delete_money_pot",
+ "DELETE"
+ " FROM merchant_money_pots"
+ " WHERE merchant_money_pots.merchant_serial="
+ " (SELECT merchant_serial "
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1)"
+ " AND merchant_money_pots.money_pot_serial=$2");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "delete_money_pot",
+ params);
}
diff --git a/src/backenddb/pg_delete_product_group.c b/src/backenddb/pg_delete_product_group.c
@@ -30,4 +30,24 @@ TMH_PG_delete_product_group (void *cls,
const char *instance_id,
uint64_t product_group_id)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&product_group_id),
+ GNUNET_PQ_query_param_end
+ };
+
+ check_connection (pg);
+ PREPARE (pg,
+ "delete_product_group",
+ "DELETE"
+ " FROM merchant_product_groups"
+ " WHERE merchant_product_groups.merchant_serial="
+ " (SELECT merchant_serial "
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1)"
+ " AND merchant_product_groups.product_group_serial=$2");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "delete_product_group",
+ params);
}
diff --git a/src/backenddb/pg_delete_report.c b/src/backenddb/pg_delete_report.c
@@ -31,4 +31,24 @@ TMH_PG_delete_report (void *cls,
const char *instance_id,
uint64_t report_id)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&report_id),
+ GNUNET_PQ_query_param_end
+ };
+
+ check_connection (pg);
+ PREPARE (pg,
+ "delete_report",
+ "DELETE"
+ " FROM merchant_reports"
+ " WHERE merchant_reports.merchant_serial="
+ " (SELECT merchant_serial "
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1)"
+ " AND merchant_reports.report_serial=$2");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "delete_report",
+ params);
}
diff --git a/src/backenddb/pg_insert_money_pot.c b/src/backenddb/pg_insert_money_pot.c
@@ -35,4 +35,43 @@ TMH_PG_insert_money_pot (
const char *pod_currency,
uint64_t *money_pot_id)
{
+ struct PostgresClosure *pg = cls;
+ struct TALER_Amount zero_c;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_string (name),
+ GNUNET_PQ_query_param_string (description),
+ TALER_PQ_query_param_amount_with_currency (pg->conn,
+ &zero_c),
+ GNUNET_PQ_query_param_end
+ };
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_uint64 ("money_pot_serial",
+ money_pot_id),
+ GNUNET_PQ_result_spec_end
+ };
+
+ if (GNUNET_OK !=
+ TALER_amount_set_zero (pod_currency,
+ &zero_c))
+ {
+ GNUNET_break (0);
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
+ check_connection (pg);
+ PREPARE (pg,
+ "insert_money_pot",
+ "INSERT INTO merchant_money_pots"
+ "(merchant_serial"
+ ",money_pot_name"
+ ",money_pot_description"
+ ",pot_total)"
+ " SELECT merchant_serial, $2, $3, $4"
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1"
+ " RETURNING money_pot_serial;");
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "insert_money_pot",
+ params,
+ rs);
}
diff --git a/src/backenddb/pg_insert_product_group.c b/src/backenddb/pg_insert_product_group.c
@@ -34,4 +34,33 @@ TMH_PG_insert_product_group (
const char *description,
uint64_t *product_group_id)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_string (name),
+ GNUNET_PQ_query_param_string (description),
+ GNUNET_PQ_query_param_end
+ };
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_uint64 ("product_group_serial",
+ product_group_id),
+ GNUNET_PQ_result_spec_end
+ };
+
+ check_connection (pg);
+ PREPARE (pg,
+ "insert_product_group",
+ "INSERT INTO merchant_product_groups"
+ "(merchant_serial"
+ ",product_group_name"
+ ",product_group_description)"
+ " SELECT merchant_serial, $2, $3"
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1"
+ " RETURNING product_group_serial");
+
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "insert_product_group",
+ params,
+ rs);
}
diff --git a/src/backenddb/pg_insert_report.c b/src/backenddb/pg_insert_report.c
@@ -39,4 +39,55 @@ TMH_PG_insert_report (
struct GNUNET_TIME_Relative frequency_shift,
uint64_t *report_id)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_TIME_Timestamp start;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_string (report_program_section),
+ GNUNET_PQ_query_param_string (report_description),
+ GNUNET_PQ_query_param_string (mime_type),
+ GNUNET_PQ_query_param_string (data_source),
+ GNUNET_PQ_query_param_string (target_address),
+ GNUNET_PQ_query_param_relative_time (&frequency),
+ GNUNET_PQ_query_param_relative_time (&frequency_shift),
+ GNUNET_PQ_query_param_timestamp (&start),
+ GNUNET_PQ_query_param_end
+ };
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_uint64 ("report_serial",
+ report_id),
+ GNUNET_PQ_result_spec_end
+ };
+
+ start =
+ GNUNET_TIME_absolute_to_timestamp (
+ GNUNET_TIME_absolute_add (
+ GNUNET_TIME_absolute_round_down (GNUNET_TIME_absolute_get (),
+ frequency),
+ GNUNET_TIME_relative_add (frequency,
+ frequency_shift)));
+
+ check_connection (pg);
+ PREPARE (pg,
+ "insert_report",
+ "INSERT INTO merchant_reports"
+ "(merchant_serial"
+ ",report_program_section"
+ ",report_description"
+ ",mime_type"
+ ",data_source"
+ ",target_address"
+ ",frequency"
+ ",frequency_shift"
+ ",next_transmission)"
+ " SELECT merchant_serial, $2, $3, $4, $5,"
+ " $6, $7, $8, $9, $10, $11, $12"
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1"
+ " ON CONFLICT DO NOTHING;");
+
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "insert_report",
+ params,
+ rs);
}
diff --git a/src/backenddb/pg_update_money_pot.c b/src/backenddb/pg_update_money_pot.c
@@ -37,4 +37,44 @@ TMH_PG_update_money_pot (
const struct TALER_Amount *new_pot_total,
bool *conflict)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&money_pot_id),
+ GNUNET_PQ_query_param_string (name),
+ GNUNET_PQ_query_param_string (description),
+ TALER_PQ_query_param_amount_with_currency (pg->conn,
+ old_pot_total),
+ TALER_PQ_query_param_amount_with_currency (pg->conn,
+ new_pot_total),
+ GNUNET_PQ_query_param_end
+ };
+ bool not_found;
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_bool ("conflict",
+ conflict),
+ GNUNET_PQ_result_spec_bool ("not_found",
+ ¬_found),
+ GNUNET_PQ_result_spec_end
+ };
+ enum GNUNET_DB_QueryStatus qs;
+
+ check_connection (pg);
+
+ PREPARE (pg,
+ "update_money_pot",
+ "SELECT"
+ " out_conflict AS conflict"
+ " out_not_found AS not_found"
+ " FROM merchant_do_update_money_pot"
+ "($1,$2,$3,$4,$5,$6);");
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "update_money_pot",
+ params,
+ rs);
+ if (qs <= 0)
+ return qs;
+ if (not_found)
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
+ return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}
diff --git a/src/backenddb/pg_update_money_pot.sql b/src/backenddb/pg_update_money_pot.sql
@@ -0,0 +1,69 @@
+--
+-- This file is part of TALER
+-- Copyright (C) 2025 Taler Systems SA
+--
+-- TALER is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 3, or (at your option) any later version.
+--
+-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+-- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License along with
+-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+--
+
+
+DROP FUNCTION IF EXISTS merchant_do_update_money_pot;
+CREATE FUNCTION merchant_do_update_money_pot (
+ IN in_instance_id TEXT,
+ IN in_money_pot_serial TEXT,
+ IN in_name TEXT,
+ IN in_description TEXT,
+ IN in_old_total taler_amount_currency,
+ IN in_new_total taler_amount_currency,
+ OUT out_conflict BOOL,
+ OUT out_not_found BOOL)
+LANGUAGE plpgsql
+AS $$
+DECLARE
+ my_merchant_id INT8;
+BEGIN
+
+SELECT merchant_serial
+ INTO my_merchant_id
+ FROM merchant_instances
+ WHERE merchant_id=in_instance_id;
+
+BEGIN
+ UPDATE merchant_money_pots SET
+ money_pot_name=in_name
+ ,money_pot_description=in_description
+ ,pot_total=in_new_total
+ WHERE merchant_serial=my_merchant_id
+ AND money_pot_serial=in_money_pot_serial
+ AND pot_total=in_old_total;
+ IF NOT FOUND
+ THEN
+ -- Check if pot_total was the problem
+ PERFORM FROM merchant_money_pots
+ WHERE merchant_serial=my_merchant_id
+ AND money_pot_serial=in_money_pot_serial;
+ out_conflict = FOUND;
+ out_not_found = FALSE;
+ ELSE
+ out_conflict = FALSE;
+ out_not_found = FALSE;
+ END IF;
+ RETURN;
+EXCEPTION
+ -- money_pot_name already used
+ WHEN unique_violation
+ THEN
+ out_conflict = TRUE;
+ RETURN;
+ END;
+
+
+END $$;
diff --git a/src/backenddb/pg_update_product_group.c b/src/backenddb/pg_update_product_group.c
@@ -35,4 +35,40 @@ TMH_PG_update_product_group (
const char *description,
bool *conflict)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&product_group_id),
+ GNUNET_PQ_query_param_string (name),
+ GNUNET_PQ_query_param_string (description),
+ GNUNET_PQ_query_param_end
+ };
+ bool not_found;
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_bool ("conflict",
+ conflict),
+ GNUNET_PQ_result_spec_bool ("not_found",
+ ¬_found),
+ GNUNET_PQ_result_spec_end
+ };
+ enum GNUNET_DB_QueryStatus qs;
+
+ check_connection (pg);
+
+ PREPARE (pg,
+ "update_product_group",
+ "SELECT"
+ " out_conflict AS conflict"
+ " out_not_found AS not_found"
+ " FROM merchant_do_update_product_group"
+ "($1,$2,$3,$4);");
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "update_product_group",
+ params,
+ rs);
+ if (qs <= 0)
+ return qs;
+ if (not_found)
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
+ return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
}
diff --git a/src/backenddb/pg_update_product_group.sql b/src/backenddb/pg_update_product_group.sql
@@ -0,0 +1,54 @@
+--
+-- This file is part of TALER
+-- Copyright (C) 2025 Taler Systems SA
+--
+-- TALER is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 3, or (at your option) any later version.
+--
+-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+-- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License along with
+-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+--
+
+
+DROP FUNCTION IF EXISTS merchant_do_update_product_group;
+CREATE FUNCTION merchant_do_update_product_group (
+ IN in_instance_id TEXT,
+ IN in_product_group_serial TEXT,
+ IN in_name TEXT,
+ IN in_description TEXT,
+ OUT out_conflict BOOL,
+ OUT out_not_found BOOL)
+LANGUAGE plpgsql
+AS $$
+DECLARE
+ my_merchant_id INT8;
+BEGIN
+
+SELECT merchant_serial
+ INTO my_merchant_id
+ FROM merchant_instances
+ WHERE merchant_id=in_instance_id;
+
+BEGIN
+ UPDATE merchant_product_groups SET
+ product_group_name=in_name
+ ,product_group_description=in_description
+ WHERE merchant_serial=my_merchant_id
+ AND product_group_serial=in_product_group_serial;
+ out_not_found = NOT FOUND;
+ out_conflict = FALSE;
+ RETURN;
+EXCEPTION
+ WHEN unique_violation
+ THEN
+ out_conflict = TRUE;
+ RETURN;
+ END;
+
+
+END $$;
diff --git a/src/backenddb/pg_update_report.c b/src/backenddb/pg_update_report.c
@@ -39,4 +39,48 @@ TMH_PG_update_report (
struct GNUNET_TIME_Relative frequency,
struct GNUNET_TIME_Relative frequency_shift)
{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_TIME_Timestamp start;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&report_id),
+ GNUNET_PQ_query_param_string (report_program_section),
+ GNUNET_PQ_query_param_string (report_description),
+ GNUNET_PQ_query_param_string (mime_type),
+ GNUNET_PQ_query_param_string (data_source),
+ GNUNET_PQ_query_param_string (target_address),
+ GNUNET_PQ_query_param_relative_time (&frequency),
+ GNUNET_PQ_query_param_relative_time (&frequency_shift),
+ GNUNET_PQ_query_param_timestamp (&start),
+ GNUNET_PQ_query_param_end
+ };
+
+ start =
+ GNUNET_TIME_absolute_to_timestamp (
+ GNUNET_TIME_absolute_add (
+ GNUNET_TIME_absolute_round_down (GNUNET_TIME_absolute_get (),
+ frequency),
+ GNUNET_TIME_relative_add (frequency,
+ frequency_shift)));
+
+ check_connection (pg);
+ PREPARE (pg,
+ "update_report",
+ "UPDATE merchant_reports SET"
+ " report_program_section=$3"
+ " ,report_description=$4"
+ " ,mime_type=$5"
+ " ,data_source=$6"
+ " ,target_address=$7"
+ " ,frequency=$8"
+ " ,frequency_shift=$9"
+ " ,next_transmission=$10"
+ " WHERE merchant_serial="
+ " (SELECT merchant_serial"
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1)"
+ " AND report_serial=$2;");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "update_report",
+ params);
}
diff --git a/src/backenddb/pg_update_report_status.c b/src/backenddb/pg_update_report_status.c
@@ -31,8 +31,38 @@ TMH_PG_update_report_status (
void *cls,
const char *instance_id,
uint64_t report_id,
- struct GNUNET_TIME_Absolute next_transmission,
+ struct GNUNET_TIME_Timestamp next_transmission,
enum TALER_ErrorCode last_error_code,
const char *last_error_detail)
{
+ struct PostgresClosure *pg = cls;
+ uint32_t ec = (uint32_t) last_error_code;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_string (instance_id),
+ GNUNET_PQ_query_param_uint64 (&report_id),
+ GNUNET_PQ_query_param_timestamp (&next_transmission),
+ TALER_EC_NONE == ec
+ ? GNUNET_PQ_query_param_null ()
+ : GNUNET_PQ_query_param_uint32 (&ec),
+ NULL == last_error_detail
+ ? GNUNET_PQ_query_param_null ()
+ : GNUNET_PQ_query_param_string (last_error_detail),
+ GNUNET_PQ_query_param_end
+ };
+
+ check_connection (pg);
+ PREPARE (pg,
+ "update_report_status",
+ "UPDATE merchant_reports SET"
+ " next_transmission=$3"
+ ",last_error_code=$4"
+ ",last_error_detail=$5"
+ " WHERE merchant_serial="
+ " (SELECT merchant_serial"
+ " FROM merchant_instances"
+ " WHERE merchant_id=$1)"
+ " AND report_serial=$2;");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "update_report_status",
+ params);
}
diff --git a/src/backenddb/pg_update_report_status.h b/src/backenddb/pg_update_report_status.h
@@ -41,7 +41,7 @@ TMH_PG_update_report_status (
void *cls,
const char *instance_id,
uint64_t report_id,
- struct GNUNET_TIME_Absolute next_transmission,
+ struct GNUNET_TIME_Timestamp next_transmission,
enum TALER_ErrorCode last_error_code,
const char *last_error_detail);
diff --git a/src/backenddb/procedures.sql.in b/src/backenddb/procedures.sql.in
@@ -30,6 +30,8 @@ SET search_path TO merchant;
#include "pg_statistics_helpers.sql"
#include "pg_do_handle_inventory_changes.sql"
#include "pg_do_handle_category_changes.sql"
+#include "pg_do_update_product_group.sql"
+#include "pg_do_update_money_pot.sql"
DROP PROCEDURE IF EXISTS merchant_do_gc;
CREATE PROCEDURE merchant_do_gc(in_now INT8)
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
@@ -5107,7 +5107,7 @@ struct TALER_MERCHANTDB_Plugin
void *cls,
const char *instance_id,
uint64_t report_id,
- struct GNUNET_TIME_Absolute next_transmission,
+ struct GNUNET_TIME_Timestamp next_transmission,
enum TALER_ErrorCode last_error_code,
const char *last_error_detail);