Code

Fixed compilation with PostgreSQL 9.2.
authorSebastian Harl <sh@tokkee.org>
Fri, 8 Nov 2013 13:19:10 +0000 (14:19 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 8 Nov 2013 13:19:10 +0000 (14:19 +0100)
Now, it doesn't compile with 9.1, though, but that's old anyway ;-)

src/rrtimeslice.c

index 1e8283c30235a0cced110368739c1cbb1b410407..d9b82753227026e75713c55ec53f12d627385ef1 100644 (file)
@@ -374,7 +374,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS)
        fsec_t fsec = 0;
        int tz = 0;
 
-       char *tz_str = NULL;
+       const char *tz_str = NULL;
 
        char  ts_str[MAXDATELEN + 1];
        char  buf_l[MAXDATELEN + 1];
@@ -399,7 +399,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS)
                                        errmsg("invalid (non-finite) timestamp")
                                ));
 
-       EncodeDateTime(&tm, fsec, &tz, &tz_str, DateStyle, buf_u);
+       EncodeDateTime(&tm, fsec, 1, tz, tz_str, DateStyle, buf_u);
 
        if (! rrtimeslice_get_spec(tslice->tsid, &len, &num)) {
                TimestampTz lower = tslice->tstamp - (len * USECS_PER_SEC);
@@ -410,7 +410,7 @@ rrtimeslice_out(PG_FUNCTION_ARGS)
                                                errmsg("invalid (non-finite) lower timestamp")
                                        ));
 
-               EncodeDateTime(&tm, fsec, &tz, &tz_str, DateStyle, buf_l);
+               EncodeDateTime(&tm, fsec, 1, tz, tz_str, DateStyle, buf_l);
        }
        else {
                strncpy(buf_l, "ERR", sizeof(buf_l));