Skip to content

Commit 6354986

Browse files
committed
Hi, all,
This is the patch for the final bit. Sorry that it's separate. Cheers... MikeA
1 parent 24a0f02 commit 6354986

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.127 1999/12/27 15:42:43 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.128 1999/12/27 15:45:04 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -1700,7 +1700,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
17001700
int tgnargs = atoi(PQgetvalue(res2, i2, i_tgnargs));
17011701
const char *tgargs = PQgetvalue(res2, i2, i_tgargs);
17021702
const char *p;
1703-
char farg[MAX_QUERY_SIZE];
1703+
PQExpBuffer farg = createPQExpBuffer();
17041704
int findx;
17051705

17061706
for (findx = 0; findx < numFuncs; findx++)
@@ -1786,14 +1786,13 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
17861786
break;
17871787
}
17881788
p--;
1789-
for (s = tgargs, d = &(farg[0]); s < p;)
1789+
for (s = tgargs; s < p;)
17901790
{
17911791
if (*s == '\'')
1792-
*d++ = '\\';
1793-
*d++ = *s++;
1792+
appendPQExpBufferChar(farg, '\\');
1793+
appendPQExpBufferChar(farg, *s++);
17941794
}
1795-
*d = 0;
1796-
appendPQExpBuffer(query, "'%s'%s", farg,
1795+
appendPQExpBuffer(query, "'%s'%s", farg->data,
17971796
(findx < tgnargs - 1) ? ", " : "");
17981797
tgargs = p + 4;
17991798
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy