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

Commitb0dfc47

Browse files
committed
2) Can't dump/restore varchar fields (See attached bug report/patch)
Cary B. O'Brien
1 parent8a7bec3 commitb0dfc47

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 3 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.91 1998/10/06 22:14:19 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.92 1998/10/12 02:05:42 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -2649,10 +2649,14 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
26492649
(actual_atts>0) ?", " :"",
26502650
fmtId(tblinfo[i].attnames[j]),
26512651
tblinfo[i].typnames[j]);
2652-
2653-
sprintf(q,"%s(%d)",
2652+
if(tblinfo[i].atttypmod[j]!=-1) {
2653+
sprintf(q,"%s(%d)",
26542654
q,
26552655
tblinfo[i].atttypmod[j]-VARHDRSZ);
2656+
}
2657+
else {
2658+
sprintf(q,"%s",q);
2659+
}
26562660
actual_atts++;
26572661
}
26582662
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp