[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: use LEFT JOIN as aml_status tabl
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: use LEFT JOIN as aml_status table may be empty |
Date: |
Mon, 10 Apr 2023 10:52:47 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 27c9fef5 use LEFT JOIN as aml_status table may be empty
27c9fef5 is described below
commit 27c9fef5ea725ad9b80acbf7f99f6fa6486d59c7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Apr 10 10:52:45 2023 +0200
use LEFT JOIN as aml_status table may be empty
---
src/exchangedb/pg_lookup_kyc_requirement_by_row.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
b/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
index 9651359e..6f9d7678 100644
--- a/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
+++ b/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
@@ -34,7 +34,7 @@ TEH_PG_lookup_kyc_requirement_by_row (
struct TALER_PaytoHashP *h_payto)
{
struct PostgresClosure *pg = cls;
- uint32_t status;
+ uint32_t status = TALER_AML_NORMAL;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&requirement_row),
GNUNET_PQ_query_param_end
@@ -44,8 +44,10 @@ TEH_PG_lookup_kyc_requirement_by_row (
requirements),
GNUNET_PQ_result_spec_auto_from_type ("h_payto",
h_payto),
- GNUNET_PQ_result_spec_uint32 ("status",
- &status),
+ GNUNET_PQ_result_spec_allow_null (
+ GNUNET_PQ_result_spec_uint32 ("status",
+ &status),
+ NULL),
GNUNET_PQ_result_spec_end
};
enum GNUNET_DB_QueryStatus qs;
@@ -57,7 +59,7 @@ TEH_PG_lookup_kyc_requirement_by_row (
",lr.h_payto"
",aml.status"
" FROM legitimization_requirements lr"
- " JOIN aml_status aml USING (h_payto)"
+ " LEFT JOIN aml_status aml USING (h_payto)"
" WHERE legitimization_requirement_serial_id=$1;");
qs = GNUNET_PQ_eval_prepared_singleton_select (
pg->conn,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: use LEFT JOIN as aml_status table may be empty,
gnunet <=