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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steve Haslam" <araqnid(at)googlemail(dot)com>
Cc: 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-04 16:02:12
Message-ID: 2822.1309795332@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

"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?

regards, tom lane

Attachment Content-Type Size
copy-lineno.patch text/x-patch 443 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2011-07-04 19:01:16 Re: [HACKERS] BUG #6083: psql script line numbers incorrectly count \copy data
Previous Message Sidney Cadot 2011-07-04 14:30:03 BUG #6089: error in documentation: incorrect string literal for SSL mode; 'disabled' vs 'disable'

Browse pgsql-hackers by date

  From Date Subject
Next Message Marios Vodas 2011-07-04 16:30:00 Perl 5.8 requirement for compiling on windows?
Previous Message Heikki Linnakangas 2011-07-04 15:53:43 Re: Latch implementation that wakes on postmaster death on both win32 and Unix