Skip site navigation (1) Skip section navigation (2)

Re: BUG #6083: psql script line numbers incorrectly count \copy data

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Steve Haslam <araqnid(at)googlemail(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: BUG #6083: psql script line numbers incorrectly count \copy data
Date: 2011-07-05 13:07:47
Message-ID: CA+TgmoZGZ_tP0gU6G8Ke8WB-aJJzstuHQJ3nFL5oAm4x4s3ODQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Mon, Jul 4, 2011 at 12:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Steve Haslam" <araqnid(at)googlemail(dot)com> writes:
>> ... Apparently, the data read from \copy
>> is incrementing the script line number counter?
>
> Yeah, so it is.  That is correct behavior for COPY FROM STDIN,
> but not so much for copying from a separate file.
>
> The attached patch seems like an appropriate fix.  However, I'm unsure
> whether to apply it to released branches ... does anyone think this
> might break somebody's application?

I think this is pretty safe.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-07-05 13:24:31
Subject: Re: Crash dumps
Previous:From: Magnus HaganderDate: 2011-07-05 13:05:14
Subject: Re: Crash dumps

pgsql-bugs by date

Next:From: Pavel GolubDate: 2011-07-05 14:52:06
Subject: COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"
Previous:From: Craig RingerDate: 2011-07-05 09:59:29
Subject: Re: BUG #6090: Connection problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group