Attempt to fix compiler warning on old compiler
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 16 Jul 2022 11:45:57 +0000 (13:45 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 16 Jul 2022 11:45:57 +0000 (13:45 +0200)
Build farm member lapwing (using gcc 4.7.2) didn't like one part of
9fd45870c1436b477264c0c82eb195df52bc0919, raising a compiler warning.
Revert that for now.

src/backend/optimizer/path/costsize.c

index 190302b9bde8ccdaa642e869fe4abf30e0e89865..5e5732f6e1207e96489777d19b4d08d36e557961 100644 (file)
@@ -2926,12 +2926,13 @@ cost_agg(Path *path, PlannerInfo *root,
    double      output_tuples;
    Cost        startup_cost;
    Cost        total_cost;
-   const AggClauseCosts dummy_aggcosts = {0};
+   AggClauseCosts dummy_aggcosts;
 
    /* Use all-zero per-aggregate costs if NULL is passed */
    if (aggcosts == NULL)
    {
        Assert(aggstrategy == AGG_HASHED);
+       MemSet(&dummy_aggcosts, 0, sizeof(AggClauseCosts));
        aggcosts = &dummy_aggcosts;
    }