Re: pg_dump: Too much <SPACE> in COPY ouput

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: leveque(at)webmails(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dump: Too much <SPACE> in COPY ouput
Date: 2001-06-01 16:09:11
Message-ID: 200106011609.f51G9Bk21127@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> pgsql-bugs(at)postgresql(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 879 bytes

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-06-01 17:09:43 Re: Trigger causes the server to crash with SEGV
Previous Message pgsql-bugs 2001-06-01 14:48:39 Trigger causes the server to crash with SEGV