Re: Support UTF-8 files with BOM in COPY FROM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, david(at)kineticode(dot)com, itagaki(dot)takahiro(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Support UTF-8 files with BOM in COPY FROM
Date: 2011-09-27 14:32:03
Message-ID: 22884.1317133923@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Alternative consideration: We could allow this in CSV format if we made
> users quote the first value if it starts with a BOM. This might be a
> reasonable way to get MS compatibility.

I don't think we can get away with a retroactive restriction on the
contents of data files.

If we're going to do this at all, I still think an explicit BOM option
for COPY, to either eat (and require) a BOM on input or emit a BOM on
output, would be the sanest way. None of the "automatic" approaches
seem safe to me.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Royce Ausburn 2011-09-27 17:51:19 [PATCH] Addition of some trivial auto vacuum logging
Previous Message Alvaro Herrera 2011-09-27 14:22:43 Re: Postgresql parser