1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

Fix snprintf with strings, and nextval('"Aa"');

This commit is contained in:
Bruce Momjian
1999-03-16 04:26:01 +00:00
parent 434762b559
commit 89b762e509
7 changed files with 6454 additions and 6451 deletions

View File

@@ -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);