From edc43458d797a5956f4bf39af18cf62abb0077db Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 6 Jan 2014 21:30:26 -0500 Subject: Add more use of psprintf() --- src/backend/utils/adt/date.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/adt/date.c') diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index fe091daec81..2bafd6145c2 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -91,14 +91,12 @@ anytime_typmodin(bool istz, ArrayType *ta) static char * anytime_typmodout(bool istz, int32 typmod) { - char *res = (char *) palloc(64); const char *tz = istz ? " with time zone" : " without time zone"; if (typmod >= 0) - snprintf(res, 64, "(%d)%s", (int) typmod, tz); + return psprintf("(%d)%s", (int) typmod, tz); else - snprintf(res, 64, "%s", tz); - return res; + return psprintf("%s", tz); } -- cgit v1.2.3