> [EMAIL PROTECTED] 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
  [EMAIL PROTECTED]               |  (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;
                        }

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to