Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24a0f02

Browse files
committed
Hi, all
I finally got around to schlepping through pg_dump, to finish what I startedabout three months (or more) ago. Attached is a gzipped diff file to applyin the bin/pg_dump directory. This should remove all string lengthdependencies, except one, which I'm working on. It has been through somerudimentary unit testing, but that's about it, so if any of you would giveit a more strenuous run-through, I'd be grateful for the feedback.Cheers... Ansley, Michael
1 parentbc036a0 commit24a0f02

File tree

3 files changed

+295
-264
lines changed

3 files changed

+295
-264
lines changed

‎src/bin/pg_dump/common.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.35 1999/11/22 17:56:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.36 1999/12/27 15:42:43 momjian Exp $
1111
*
1212
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1313
*
@@ -39,6 +39,8 @@ static void flagInhAttrs(TableInfo *tbinfo, int numTables,
3939
InhInfo*inhinfo,intnumInherits);
4040
staticintstrInArray(constchar*pattern,char**arr,intarr_size);
4141

42+
PQExpBufferid_return;
43+
4244
/*
4345
* findTypeByOid
4446
* given an oid of a type, return its typename
@@ -496,21 +498,26 @@ const char *
496498
fmtId(constchar*rawid,boolforce_quotes)
497499
{
498500
constchar*cp;
499-
staticcharid[MAX_QUERY_SIZE];
500501

502+
if (id_return)
503+
resetPQExpBuffer(id_return);
504+
else
505+
id_return=createPQExpBuffer();
506+
501507
if (!force_quotes)
502508
for (cp=rawid;*cp!='\0';cp++)
503509
if (!(islower(*cp)||isdigit(*cp)|| (*cp=='_')))
504510
break;
505511

506512
if (force_quotes|| (*cp!='\0'))
507513
{
508-
strcpy(id,"\"");
509-
strcat(id,rawid);
510-
strcat(id,"\"");
511-
cp=id;
514+
appendPQExpBuffer(id_return,"\"");
515+
appendPQExpBuffer(id_return,rawid);
516+
appendPQExpBuffer(id_return,"\"");
512517
}
513518
else
514-
cp=rawid;
519+
appendPQExpBuffer(id_return,rawid);
520+
521+
cp=id_return->data;
515522
returncp;
516523
}/* fmtId() */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp