pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Haslam <araqnid@googlemail.com>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: BUG #6083: psql script line numbers incorrectly count \copy data
Date: Mon, 04 Jul 2011 12:02:12 -0400
Message-ID: <2822.1309795332@sss.pgh.pa.us> (raw)
In-Reply-To: <201106291338.p5TDcPTZ012367@wwwmaster.postgresql.org>
References: <201106291338.p5TDcPTZ012367@wwwmaster.postgresql.org>

"Steve Haslam" <araqnid@googlemail.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

view thread (4+ messages)  latest in thread

Message-ID: <2822.1309795332@sss.pgh.pa.us>
Permalink:  ../2822.1309795332@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2822.1309795332@sss.pgh.pa.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, araqnid@googlemail.com, pgsql-hackers@postgresql.org
  Subject: Re: BUG #6083: psql script line numbers incorrectly count \copy data
  In-Reply-To: <2822.1309795332@sss.pgh.pa.us>
  References: <201106291338.p5TDcPTZ012367@wwwmaster.postgresql.org> <2822.1309795332@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox