Re: JSONB filed with default JSON from a file

2018-08-13 Thread mrcasa bengaluru
> > I assume that you could declare the column as > > address jsonb not null default 'your json here'::jsonb; > Thanks! However, this involves writing the entire JSON in the schema file looks inconvenient. I was hoping I would be able to reference to an external JSON file which could be used for t

JSONB filed with default JSON from a file

2018-08-13 Thread mrcasa bengaluru
All, I'm new to JSONB datatype. We would like to store a nested JSON file in this field. Since the JSON is nested, we wanted to create JSON with default value from an external JSON file. My address table looks like, CREATE TABLE address ( id CHAR(36) UNIQUE NOT NULL, address JSONB NOT NULL ); F