Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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 12:27:34 +0000 (13:27 +0100)
contrib/worker_spi/worker_spi.c

index 8aec9b2199db1992953de95b4364ee498efbfb62..23ace7a8afe5bdee13569851eca79fbaf828db2c 100644 (file)
@@ -123,7 +123,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)