Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Sep 1, 2020 at 06:14:45AM +0000, Junfeng Yang wrote:
>> Data in file "/tmp/data".
>>
>> 122,as\.d,adad
>> 133,sa dad,adadad
> So, you are using comma as the delimiter, but have \. (backslash-period)
> as a data value. You need to double-up backslashes in your input data,
> no matter what is after the backslash. You just happen to hit backslash
> period, but other things like \N could cause problems --- literal
> backslashes have to be doubled.
As mentioned upthread, using CSV format might work better. In CSV
you aren't necessarily stuck with backslash being treated as an
escape character.
regards, tom lane