On Thu, Apr 15, 2010 at 12:29 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote: > Bruce Momjian <bruce@xxxxxxxxxx> writes: >> Merlin Moncure wrote: >>> aside: anyone know if postgres properly handles csv according to rfc4180? > >> Wow, I had no idea there was an RFC for CSV. > > Me either. I'd bet the percentage of "CSV"-using programs that actually > conform to the RFC is very small anyway; so while it might be smart to > make sure that what we *emit* follows the RFC, it's probably useless as > a guide to what we need to *accept*. I took a quick look at the rfc. It's very short and appears to codify common practices. We follow it for both input and output except: *) trailing spaces are supposed to preserved. we follow sql rules on trailing spaces which I think makes this point moot. *) csv is supposed to be CRLF *always*. We do not do this. We do however read different types of newlines. So we are a 4180 reader but not an emitter. Not so sure if I think changing this is a good idea though without exposing a knob. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general