From a82c996120630e4a3d06ae8f1ae0ac52d4c853ca Mon Sep 17 00:00:00 2001 From: Chris Hajas Date: Fri, 2 Jun 2017 09:35:56 -0700 Subject: [PATCH] Fix dump of functions in pg_dump to not add extra semicolon (#2563) pg_dump will append an extra semicolon to function definitions prior to printing SET statements for function GUCs. This results in the SET statements actually being printed outside the CREATE FUNCTION statement, so the GUCs are set on a session level rather than being set for the scope of the function. --- src/bin/pg_dump/pg_dump.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 60c053f4a1..6c0e5e4c69 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -7307,8 +7307,6 @@ dumpFunc(Archive *fout, FuncInfo *finfo) else if (prodataaccess[0] == PRODATAACCESS_MODIFIES) appendPQExpBuffer(q, " MODIFIES SQL DATA"); - appendPQExpBuffer(q, ";\n"); - for (i = 0; i < nconfigitems; i++) { /* we feel free to scribble on configitems[] here */ -- GitLab