From 9720164d3426b0a223208b9dc5698264cdb9e2a0 Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Tue, 3 Sep 2013 13:27:34 +0100 Subject: [PATCH] Fix thinko in worker_spi, count(*) returns a bigint. Thanks RhodiumToad --- contrib/worker_spi/worker_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/worker_spi/worker_spi.c b/contrib/worker_spi/worker_spi.c index 3a75bb3f4e..99501fa566 100644 --- a/contrib/worker_spi/worker_spi.c +++ b/contrib/worker_spi/worker_spi.c @@ -120,7 +120,7 @@ initialize_worker_spi(worktable *table) if (SPI_processed != 1) elog(FATAL, "not a singleton result"); - ntup = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], + ntup = DatumGetInt64(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull)); if (isnull) -- 2.40.0