]> granicus.if.org Git - postgresql/commitdiff
More psprintf goodness
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 25 Aug 2014 19:32:15 +0000 (15:32 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 25 Aug 2014 19:32:15 +0000 (15:32 -0400)
src/backend/parser/gram.y

index 327f2d2811f33ccf1376b7abcba470d31d0a1017..71ce7ee2ddffcbfd2e7986c6811eb08217ef8a45 100644 (file)
@@ -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); }