Do this:
testdb=> create table foo (word varchar(30)); CREATE testdb=> insert into foo values ('\217\210'); INSERT
23372891 testdb=> copy "foo" to '/usr/local/pgsql/foo.out'; COPY testdb=> \q % od -c foo.out 0000000 217 210
\0 \n 0000004
One run produced: 0000000 217 210 \0 \b \n
In all cases, though, it emits a null. This, of course, causes "copy from" to
fail when it tries to parse a null-containing field in a multi-field record.
As for what the sequence "\217\210" represents, that's not really relevant
(it's not even a valid Chinese character, so far as I can tell). Someone
just entered this into our web interface and broke our database.
-Michael Robinson
P.S. As an aside, if "copy from" recognizes the \xxx octal convention, why
doesn't "copy to" use it to represent everything outside of \040..\176?