merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 325db6147719e85ea9bdf96fc384d98c7067f54d
parent 1c7e4862cd896ca5731a1b15cce16e7d99b8a3e2
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Fri, 17 Mar 2017 21:08:04 +0100

FETCH FIRST arg ROW ONLY -> LIMIT arg, in prepared statement,
as postgresql doesn't like FETCH FIRST arg when arg is a $-parameter.
DB testcase does not pass yet, logic is likely to be wrong.

Diffstat:
Msrc/backenddb/plugin_merchantdb_postgres.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -323,7 +323,7 @@ postgres_initialize (void *cls) " timestamp<$1" " AND merchant_pub=$2" " ORDER BY timestamp DESC, row_id DESC" - " FETCH FIRST $3 ROWS ONLY", + " LIMIT $3", 3); PG_PREPARE (pg, @@ -338,7 +338,7 @@ postgres_initialize (void *cls) " AND merchant_pub=$2" " AND row_id<$3" " ORDER BY timestamp DESC, row_id DESC" - " FETCH FIRST $4 ROWS ONLY", + " LIMIT $4", 4); /* Setup prepared "SELECT" statements */