From: Alvaro Herrera Date: Mon, 25 Aug 2014 19:32:15 +0000 (-0400) Subject: More psprintf goodness X-Git-Tag: REL9_5_ALPHA1~1577 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6d6020f1cf33a63bbae59d370b75fa5e98017f0;p=postgresql More psprintf goodness --- diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 327f2d2811..71ce7ee2dd 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -4610,9 +4610,7 @@ TriggerFuncArgs: TriggerFuncArg: Iconst { - char buf[64]; - snprintf(buf, sizeof(buf), "%d", $1); - $$ = makeString(pstrdup(buf)); + $$ = makeString(psprintf("%d", $1)); } | FCONST { $$ = makeString($1); } | Sconst { $$ = makeString($1); }