From 89b762e509285968b757e3376dfc6fdaab509a85 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 16 Mar 1999 04:26:01 +0000 Subject: Fix snprintf with strings, and nextval('"Aa"'); --- src/backend/commands/_deadcode/recipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/_deadcode') diff --git a/src/backend/commands/_deadcode/recipe.c b/src/backend/commands/_deadcode/recipe.c index 0c8f3985ad..b3ec01b915 100644 --- a/src/backend/commands/_deadcode/recipe.c +++ b/src/backend/commands/_deadcode/recipe.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.1 1999/02/24 17:29:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.2 1999/03/16 04:25:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -878,8 +878,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) snprintf(newquery, 1000, "select %s($1", funcName); for (i = 1; i < parameterCount; i++) - snprintf(newquery, 1000, "%s,$%d", newquery, i); - snprintf(newquery, 1000, "%s)", newquery); + snprintf(newquery, 1000, "%s,$%d", pstrdup(newquery), i); + snprintf(newquery, 1000, "%s)", pstrdup(newquery)); } else snprintf(newquery, 1000, "select %s()", funcName); -- cgit v1.2.1