Re: Support UTF-8 files with BOM in COPY FROM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support UTF-8 files with BOM in COPY FROM
Date
Msg-id 22884.1317133923@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support UTF-8 files with BOM in COPY FROM  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Postgresql parser
Next
From: Royce Ausburn
Date:
Subject: [PATCH] Addition of some trivial auto vacuum logging