pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org, Matthew Wakeling <matthew@flymine.org>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Maciek Sakrejda <msakrejda@truviso.com>
Cc: Samuel Gendler <sgendler@ideasculptor.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [HACKERS] Trouble with COPY IN
Date: Fri, 23 Jul 2010 06:50:30 -0700
Message-ID: <4C499E26.4060307@ejurka.com> (raw)
In-Reply-To: <9143.1279892435@sss.pgh.pa.us>
References: <alpine.DEB.2.00.1007161753160.8895@aragorn.flymine.org>
	<AANLkTim0dNU58e_Zg3OGTlylkYVAA9rtyhnb-xfzyLTl@mail.gmail.com>
	<alpine.DEB.2.00.1007191455550.8895@aragorn.flymine.org>
	<alpine.DEB.2.00.1007191514510.8895@aragorn.flymine.org>
	<AANLkTimCYa3fvWu2-NwcUc_7GibTpFB1RjNC09IVk8IS@mail.gmail.com>
	<alpine.DEB.2.00.1007201114080.8895@aragorn.flymine.org>
	<alpine.DEB.2.00.1007201128560.8895@aragorn.flymine.org>
	<AANLkTinVNt56ZuxRf0KNgBR-kJPN1NkTgDkHY2DXIPQr@mail.gmail.com>
	<alpine.DEB.2.00.1007201229110.8895@aragorn.flymine.org>
	<alpine.DEB.2.00.1007201422270.8895@aragorn.flymine.org>
	<4C4562C50200002500033951@gw.wicourts.gov>
	<alpine.DEB.2.00.1007201452360.8895@aragorn.flymine.org>
	<alpine.DEB.2.00.1007201507500.8895@aragorn.flymine.org>
	<alpine.BSO.2.00.1007201455220.5084@leary.csoft.net>
	<alpine.BSO.2.00.1007221723230.16703@leary.csoft.net>
	<9143.1279892435@sss.pgh.pa.us>

On 7/23/2010 6:40 AM, Tom Lane wrote:
> Kris Jurka<books@ejurka.com>  writes:
>> Attached is a patch to make the server continue to consume protocol data
>> until instructed to stop by the client in the same way as copying text
>> data to the server currently works.
>
> I believe this is a misunderstanding of the protocol spec.  The spec is
> (intended to say that) we'll continue to accept data after reporting an
> error, not that we will silently swallow an incorrect data stream and
> not complain about it.  Which is what this patch will do.
>

All this does is make binary mode match text mode.  Are you planning on 
changing text mode to match binary mode instead?  Currently text mode 
parsing ends at the data end marker (\.) and throws away any further 
data which may or may not be ill formatted.  For example there's no 
complaint about copying the following data file into a single column 
integer table even though there is bogus data after the file end marker

3
4
\.
asdf
aff
5
qq

Kris Jurka





view thread (48+ messages)  latest in thread

Message-ID: <4C499E26.4060307@ejurka.com>
Permalink:  ../4C499E26.4060307@ejurka.com/
Also on:    postgresql.org/message-id/4C499E26.4060307@ejurka.com

 · 

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-jdbc@postgresql.org
  Cc: books@ejurka.com, tgl@sss.pgh.pa.us, matthew@flymine.org, Kevin.Grittner@wicourts.gov, msakrejda@truviso.com, sgendler@ideasculptor.com
  Subject: Re: [HACKERS] Trouble with COPY IN
  In-Reply-To: <4C499E26.4060307@ejurka.com>
  References: <alpine.DEB.2.00.1007161753160.8895@aragorn.flymine.org> <AANLkTim0dNU58e_Zg3OGTlylkYVAA9rtyhnb-xfzyLTl@mail.gmail.com> <alpine.DEB.2.00.1007191455550.8895@aragorn.flymine.org> <alpine.DEB.2.00.1007191514510.8895@aragorn.flymine.org> <AANLkTimCYa3fvWu2-NwcUc_7GibTpFB1RjNC09IVk8IS@mail.gmail.com> <alpine.DEB.2.00.1007201114080.8895@aragorn.flymine.org> <alpine.DEB.2.00.1007201128560.8895@aragorn.flymine.org> <AANLkTinVNt56ZuxRf0KNgBR-kJPN1NkTgDkHY2DXIPQr@mail.gmail.com> <alpine.DEB.2.00.1007201229110.8895@aragorn.flymine.org> <alpine.DEB.2.00.1007201422270.8895@aragorn.flymine.org> <4C4562C50200002500033951@gw.wicourts.gov> <alpine.DEB.2.00.1007201452360.8895@aragorn.flymine.org> <alpine.DEB.2.00.1007201507500.8895@aragorn.flymine.org> <alpine.BSO.2.00.1007201455220.5084@leary.csoft.net> <alpine.BSO.2.00.1007221723230.16703@leary.csoft.net> <9143.1279892435@sss.pgh.pa.us> <4C499E26.4060307@ejurka.com>

* 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