1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Add more use of psprintf()

This commit is contained in:
Peter Eisentraut
2014-01-06 21:30:26 -05:00
parent 10a82cda67
commit edc43458d7
15 changed files with 52 additions and 119 deletions

View File

@ -116,15 +116,12 @@ anytimestamp_typmodin(bool istz, ArrayType *ta)
static char *
anytimestamp_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);
}