summaryrefslogtreecommitdiff
path: root/src/backenddb/plugin_merchantdb_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 5e247d2e..cf0ed8a1 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -4993,7 +4993,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5022,7 +5022,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5033,7 +5033,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5041,7 +5041,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5065,8 +5065,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5077,7 +5077,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5085,8 +5085,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5118,9 +5118,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5153,7 +5153,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5164,9 +5164,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5174,7 +5174,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5198,7 +5198,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5209,9 +5209,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5219,7 +5219,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5255,11 +5255,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time > $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial ASC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5339,7 +5339,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5368,7 +5368,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5379,7 +5379,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5387,7 +5387,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5411,8 +5411,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5423,7 +5423,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5431,8 +5431,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5464,9 +5464,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5499,7 +5499,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5510,9 +5510,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5520,7 +5520,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($6)" /* otherwise $6 is unused and Postgres unhappy */
+ ",CAST($6 as BOOL)" /* otherwise $6 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5544,7 +5544,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_orders"
" WHERE merchant_orders.merchant_serial="
" (SELECT merchant_serial "
@@ -5555,9 +5555,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */
@@ -5565,7 +5565,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" order_id"
",order_serial"
",creation_time"
- ",BOOL($5)" /* otherwise $5 is unused and Postgres unhappy */
+ ",CAST($5 as BOOL)" /* otherwise $5 is unused and Postgres unhappy */
" FROM merchant_contract_terms"
" WHERE merchant_contract_terms.merchant_serial="
" (SELECT merchant_serial "
@@ -5601,11 +5601,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" AND"
" creation_time < $4"
" AND"
- " NOT BOOL($5)" /* unclaimed orders are never paid */
+ " NOT CAST($5 as BOOL)" /* unclaimed orders are never paid */
" AND"
- " NOT BOOL ($6)"/* unclaimed orders are never refunded */
+ " NOT CAST($6 as BOOL)"/* unclaimed orders are never refunded */
" AND"
- " NOT BOOL ($7)" /* unclaimed orders are never wired */
+ " NOT CAST($7 as BOOL)" /* unclaimed orders are never wired */
" ORDER BY order_serial DESC"
" LIMIT $2)"
"UNION " /* union ensures elements are distinct! */