aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_insert_aml_officer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_insert_aml_officer.c')
-rw-r--r--src/exchangedb/pg_insert_aml_officer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/exchangedb/pg_insert_aml_officer.c b/src/exchangedb/pg_insert_aml_officer.c
index 33e6c86f7..c1f635a64 100644
--- a/src/exchangedb/pg_insert_aml_officer.c
+++ b/src/exchangedb/pg_insert_aml_officer.c
@@ -47,20 +47,20 @@ TEH_PG_insert_aml_officer (
GNUNET_PQ_query_param_timestamp (&last_change),
GNUNET_PQ_query_param_end
};
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_timestamp ("out_last_change",
+ previous_change),
+ GNUNET_PQ_result_spec_end
+ };
- // FIXME: need to check for previous record!
PREPARE (pg,
- "insert_aml_staff",
- "INSERT INTO aml_staff "
- "(decider_pub"
- ",master_sig"
- ",decider_name"
- ",is_active"
- ",read_only"
- ",last_change"
- ") VALUES "
+ "do_insert_aml_staff",
+ "SELECT"
+ " out_last_change"
+ " FROM exchange_do_insert_aml_officer"
"($1, $2, $3, $4, $5, $6);");
- return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "insert_aml_staff",
- params);
+ return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "do_insert_aml_staff",
+ params,
+ rs);
}