Skip to content

Commit fd84caf

Browse files
committed
|I took a look at this and I think pg_dump mishandles arrays of ints and floats
|by neglecting to quote them. | |I have made a minor change to pg_dump.c that will fix this. | |Dates are dumped and restored OK with pg_dump in V6 | |We'll still need to fix the dump in both cases if the original dump is from V1.09. From Keith Parks
1 parent e2292e0 commit fd84caf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*
2222
* IDENTIFICATION
23-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.22 1997/01/07 00:04:16 scrappy Exp $
23+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.23 1997/02/09 03:00:09 scrappy Exp $
2424
*
2525
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2626
*
@@ -284,12 +284,15 @@ dumpClasses_dumpData(FILE *fout, const char *classname,
284284
switch(PQftype(res,field)) {
285285
case 21: case 22: case 23: /* int types */
286286
case 810: case 910: /* oldint types */
287-
case 1005: case 1006: case 1007: /* _int types */
288287
case 700: case 701: /* float types */
289-
case 1021: case 1022: /* _float types */
290288
fprintf(fout, "%s",
291289
PQgetvalue(res,tuple,field));
292290
break;
291+
case 1005: case 1006: case 1007: /* _int types */
292+
case 1021: case 1022: /* _float types */
293+
fprintf(fout, "'%s'",
294+
PQgetvalue(res,tuple,field));
295+
break;
293296
default: {
294297
char *expsrc,*expdest;
295298

0 commit comments

Comments
 (0)