2009/10/20 Tom Lane <t...@sss.pgh.pa.us>: > Andrew Dunstan <and...@dunslane.net> writes: >> What I think we might sensibly do is to eat the leading BOM of an SQL >> file iff the client encoding is UTF8, and otherwise treat it as just >> bytes in whatever the encoding is. > > That seems relatively non-risky.
+1. >> Should we also do the same for files passed via \copy? What about >> streams on stdin? What about files read from the backend via COPY? > > Not thrilled about doing this on stdin --- you have no good > justification for assuming that start of stdin corresponds to a file > boundary somewhere. COPY files, maybe. Yeah, that seems a lot more error-prone. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers