Search Postgresql Archives

Re: copy error with json/jsonb types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux