db: Fix statement expansion bugs found through dblog mode

This commit is contained in:
Christian Decker
2020-09-24 16:05:31 +02:00
committed by Rusty Russell
parent 7d6892abba
commit 77ca07e91d
4 changed files with 9 additions and 9 deletions

View File

@@ -1275,8 +1275,8 @@ struct db_query db_postgres_queries[] = {
.readonly = false,
},
{
.name = "UPDATE channels SET state=?, peer_id=?WHERE channels.id=?",
.query = "UPDATE channels SET state=$1, peer_id=$2WHERE channels.id=$3",
.name = "UPDATE channels SET state=?, peer_id=? WHERE channels.id=?",
.query = "UPDATE channels SET state=$1, peer_id=$2 WHERE channels.id=$3",
.placeholders = 3,
.readonly = false,
},
@@ -1654,4 +1654,4 @@ struct db_query db_postgres_queries[] = {
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
// SHA256STAMP:5fa02e1dbf8ea4e155e08671e9f36b66c8a5b8ad04226e6695eacf2ea423b8bd
// SHA256STAMP:b58d5903df88487b84515e511c1cd98e5fb15f86cf9676e3125ab56a27c27877