Re: Fixing backslash dot for COPY FROM...CSV

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
Cc: "Artur Zakirov" <zaartur(at)gmail(dot)com>, Sutou Kouhei <kou(at)clear-code(dot)com>, bruce(at)momjian(dot)us, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fixing backslash dot for COPY FROM...CSV
Date: 2024-09-30 22:45:02
Message-ID: 1719392.1727736302@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Daniel Verite" <daniel(at)manitou-mail(dot)org> writes:
> [ v6-0001-Support-backslash-dot-on-a-line-by-itself-as-vali.patch ]

I did some more work on the docs and comments, and pushed that.

Returning to my upthread thought that

>>> I think we should fix it so that \. that's not alone on a line
>>> throws an error, but I wouldn't go further than that.

here's a quick follow-on patch to make that happen. It could
probably do with a test case to demonstrate the error, but
I didn't bother yet pending approval that we want to do this.
(This passes check-world as it stands, indicating we have no
existing test that expects this case to work.)

Also, I used the same error message "end-of-copy marker corrupt"
that we have for the case of junk following the marker, but
I can't say that I think much of that phrasing. What do people
think of "end-of-copy marker is not alone on its line", instead?

regards, tom lane

Attachment Content-Type Size
v1-forbid-copy-EOF-marker-not-at-start-of-line.patch text/x-diff 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-10-01 00:05:06 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Michael Banck 2024-09-30 22:43:49 Re: Changing the state of data checksums in a running cluster