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

Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Ben Gould <ben(dot)gould(at)free(dot)fr>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #2114: (patch) COPY FROM ... end of copy
Date: 2005-12-27 14:51:08
Message-ID: 43B154DC.8090100@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches

Bruce Momjian wrote:

> The big problem is that \. is also a valid
>CSV data value (though not a valid non-CSV data value).  So, the
>solution we came up with was to require \. to appear alone on a line in
>CSV mode for it to be treated as end-of-copy.  
>

According to the docs, that's the way to specify EOD in both text and 
CSV mode:

  End of data can be represented by a single line containing just 
backslash-period.

Your analysis regarding line_buf.len seems correct.

We probably should have a regression test with \. in a CSV field.

cheers

andrew


In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-27 15:15:28
Subject: Re: BUG #2123: join between stored procedures
Previous:From: Guerra AntonioDate: 2005-12-27 08:28:45
Subject: BUG #2133: can't reinstall postgresql

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-12-27 17:45:07
Subject: Re: [HACKERS] Online backup vs Continuous backup
Previous:From: Peter EisentrautDate: 2005-12-27 12:50:14
Subject: Re: [HACKERS] Online backup vs Continuous backup

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