COPY
명령은 전처리를 지원하지 않습니다 - 당신이 가장 좋은 방법은 다음 공간과 데이터를 가져 오는 것입니다
https://www.postgresql.org/docs/current/static/sql-copy.html
In CSV format, all characters are significant. A quoted value surrounded by white space, or any characters other than DELIMITER, will include those characters. This can cause errors if you import data from a system that pads CSV lines with white space out to some fixed width. If such a situation arises you might need to preprocess the CSV file to remove the trailing white space, before importing the data into PostgreSQL.
내가 여기 생각 "로딩시"그것을 할 수 없습니다
update t set attr = rtim(attr);
전처리시이 작업을 수행하는 최적의 방법이 있습니까? –
나는 매우 비슷한 질문에 답했다. https://stackoverflow.com/a/47324806/5315974 - 공간을 가져 와서 그것을 가져온다. –
공백으로 가져 오는 경우에도이 오류가 발생한다. '오류 : 인코딩을위한 바이트 시퀀스가 유효하지 않다. "UTF8": 0xa0' –