Re: Should CSV parsing be stricter about mid-field quotes? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should CSV parsing be stricter about mid-field quotes?
Date
Msg-id 1728940.1683985541@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should CSV parsing be stricter about mid-field quotes?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Should CSV parsing be stricter about mid-field quotes?
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I could see an argument for a STRICT mode which would disallow partially 
> quoted fields, although I'd like some evidence that we're dealing with a 
> real problem here. Is there really a CSV producer that produces output 
> like that you showed in your example? And if so has anyone objected to 
> them about the insanity of that?

I think you'd want not just "some evidence" but "compelling evidence".
Any such option is going to add cycles into the low-level input parser
for COPY, which we know is a hot spot and we've expended plenty of
sweat on.  Adding a speed penalty that will be paid by the 99.99%
of users who don't have an issue here is going to be a hard sell.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Should CSV parsing be stricter about mid-field quotes?
Next
From: Tomas Vondra
Date:
Subject: Re: Memory leak from ExecutorState context?