При выполнении команды psql база < путь к дампу базы выдает ошибки
CREATE SEQUENCE
ERROR: invalid UTF-8 byte sequence detected near byte 0xd0
CONTEXT: COPY clients2, line 1, column type: "\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff"
ERROR: invalid UTF-8 byte sequence detected near byte 0xc2
CONTEXT: COPY dogovors, line 2, column tarif: "\uffff\uffff\uffff\uffff\uffff\uffff\uffff"Дамп создан командой pg_dump база /путь в версии Pstgres 7.4. Как можно ее устранить (установить нужную кодировку).
В версии PG 8.1 гораздо строже проверки на коррекность UTF.Выдержка из release notes PG 8.1 ( http://www.postgresql.org/docs/8.1/static/release-8-1.html ):
Some users are having problems loading UTF-8 data into 8.1.X. This is because previous versions allowed invalid UTF-8 byte sequences to be entered into the database, and this release properly accepts only valid UTF-8 sequences. One way to correct a dumpfile is to run the command iconv -c -f UTF-8 -t UTF-8 -o cleanfile.sql dumpfile.sql. The -c option removes invalid character sequences. A diff of the two files will show the sequences that are invalid. iconv reads the entire input file into memory so it might be necessary to use split to break up the dump into multiple smaller files for processing.