From bacf197a7b3cd6fea18d9d6bf1f4d40645053a21 Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Thu, 2 Feb 2017 23:34:52 +0900 Subject: [PATCH] Change format identifier of SPI_processed to uint64. Because commit 23a27b039d94ba359286694831eafe03cd970eef has extended the type of SPI_processed from uint32 to uint64, pg_repack emit warning when compiling with PostgreSQL 9.6 or later. To fix that, we cast it to uint64 and change format identifier from %d to %lu. --- lib/repack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repack.c b/lib/repack.c index a79449c..a5405af 100644 --- a/lib/repack.c +++ b/lib/repack.c @@ -1306,8 +1306,8 @@ repack_index_swap(PG_FUNCTION_ARGS) orig_idx_oid); execute(SPI_OK_SELECT, str.data); if (SPI_processed != 1) - elog(ERROR, "Could not find index 'index_%u', found %d matches", - orig_idx_oid, SPI_processed); + elog(ERROR, "Could not find index 'index_%u', found %lu matches", + orig_idx_oid, (uint64) SPI_processed); tuptable = SPI_tuptable; desc = tuptable->tupdesc;