]> granicus.if.org Git - postgresql/commitdiff
Fix thinko in worker_spi, count(*) returns a bigint. Thanks RhodiumToad
authorGreg Stark <stark@mit.edu>
Tue, 3 Sep 2013 12:27:34 +0000 (13:27 +0100)
committerGreg Stark <stark@mit.edu>
Tue, 3 Sep 2013 15:44:20 +0000 (16:44 +0100)
contrib/worker_spi/worker_spi.c

index 3a75bb3f4eb190f28e28f892e9f212caeb1a752c..99501fa56680e14699c01868945beca95abc155d 100644 (file)
@@ -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)