On Thu, Nov 30, 2017 at 3:01 PM, tao tony <tonytao0505@xxxxxxxxxxx> wrote: > hi dears, > > > I'm using copy and jdbc copyin to build load data to pg,data type in table > is jsonb.postgresql version are 9.6 and 10.0. > > Some records with escape characters would be failed with error"ERROR: > invalid input syntax for type json" > > but when using insert they could be executed successfully. > > please kindly tell me how to fix this issue? The lookup of JSON strings is done in json_lex_string(). If I copy-paste the upthread values into a manual INSERT the tuples get inserted, operation done using UTF-8. And both json and jsonb are proving to work. -- Michael