Re: pg_dump: Too much in COPY ouput
От | Bruce Momjian |
---|---|
Тема | Re: pg_dump: Too much |
Дата | |
Msg-id | 200106011609.f51G9Bk21127@candle.pha.pa.us обсуждение исходный текст |
Ответ на |
Re: pg_dump: Too much |
Список | pgsql-bugs |
> pgsql-bugs@postgresql.org writes: > > Example form two pg_dump outputs > > 7.1.2 : > > COPY "list" FROM stdin; > > 7.0.2 : > > COPY "list" FROM stdin; > > I have a very hard time considering that a bug... Looks like an easy fix. In fact, the coder had a space after WITH OIDS already, so there is no need for the extra space after the second %s: if (oids == true) oidsPart = "WITH OIDS "; else oidsPart = ""; ... sprintf(copyBuf, "COPY %s %sFROM stdin;\n", fmtId(tblinfo[i].relname, force_quotes), oidsPart); Patch applied. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: src/bin/pg_dump/pg_dump.c =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v retrieving revision 1.210 diff -c -r1.210 pg_dump.c *** src/bin/pg_dump/pg_dump.c 2001/05/30 14:15:27 1.210 --- src/bin/pg_dump/pg_dump.c 2001/06/01 16:06:45 *************** *** 684,690 **** { dumpFn = dumpClasses_nodumpData; /* dumpClasses_nodumpData(fout, classname, oids); */ ! sprintf(copyBuf, "COPY %s %s FROM stdin;\n", fmtId(tblinfo[i].relname, force_quotes), oidsPart); copyStmt = copyBuf; } --- 684,690 ---- { dumpFn = dumpClasses_nodumpData; /* dumpClasses_nodumpData(fout, classname, oids); */ ! sprintf(copyBuf, "COPY %s %sFROM stdin;\n", fmtId(tblinfo[i].relname, force_quotes), oidsPart); copyStmt = copyBuf; }
В списке pgsql-bugs по дате отправления: