diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-10-12 02:05:42 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-10-12 02:05:42 +0000 |
commit | b0dfc477944565f3e5446f9b709b8db9c5496d4b (patch) | |
tree | 694a711f3b035601377322985ce5d7d455b2b470 /src | |
parent | 8a7bec3d45c9dfa322df0fe297829fb561f394e1 (diff) | |
download | postgresql-b0dfc477944565f3e5446f9b709b8db9c5496d4b.tar.gz postgresql-b0dfc477944565f3e5446f9b709b8db9c5496d4b.zip |
2) Can't dump/restore varchar fields (See attached bug report/patch)
Cary B. O'Brien
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 6151d2d1c74..59a823dbd05 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -21,7 +21,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.91 1998/10/06 22:14:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.92 1998/10/12 02:05:42 momjian Exp $ * * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * @@ -2649,10 +2649,14 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables, (actual_atts > 0) ? ", " : "", fmtId(tblinfo[i].attnames[j]), tblinfo[i].typnames[j]); - - sprintf(q, "%s(%d)", + if(tblinfo[i].atttypmod[j] != -1) { + sprintf(q, "%s(%d)", q, tblinfo[i].atttypmod[j] - VARHDRSZ); + } + else { + sprintf(q, "%s", q); + } actual_atts++; } else |