The following bug has been logged on the website:
Bug reference: 12320
Logged by: Aaron Botsis
Email address: postgres@bt-r.com
PostgreSQL version: 9.4.0
Operating system: Mac OSX
Description:
postgres=# create table ct (data jsonb);
CREATE TABLE
postgres=# copy ct (data) from '/Users/aaron/Desktop/queries.json';
ERROR: invalid input syntax for type json
DETAIL: Token "root" is invalid.
CONTEXT: JSON data, line 1: ...1418066241619 AND <=1418671041621) AND
user:"root...
COPY ct, line 3, column data:
"{"timestamp":"2014-12-15T19:17:32.505Z","duration":7.947,"query":{"query":{"filtered":{"filter":{"qu..."
This is a sample of the JSON:
{"timestamp":"2014-12-15T19:17:32.505Z","duration":7.947,"query":{"query":{"filtered":{"filter":{"query":{"query_string":{"query":"organization_id:[REDACTED]
AND timestamp:(>=1418066241619 AND <=1418671041621) AND
user:\"root\""}}}}},"from":0,"size":20,"timeout":10000,"sort":{"timestamp":{"order":"desc"}},"facets":{}},"organization_id":"[REDACTED]","indices":["logs.[REDACTED].20141209","logs.[REDACTED].20141208","logs.[REDACTED].20141215","logs.[REDACTED].20141210","logs.[REDACTED].20141213","logs.[REDACTED].20141214","logs.[REDACTED].20141211","logs.[REDACTED].20141212"],"type":"all","level":"info","message":""}