Re: JSONB filed with default JSON from a file

2018-08-13 Thread Rob Sargent
On 08/13/2018 12:11 PM, Tom Lane wrote: Merlin Moncure writes: On Mon, Aug 13, 2018 at 12:56 PM mrcasa bengaluru wrote: 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 c

Re: JSONB filed with default JSON from a file

2018-08-13 Thread Tom Lane
Merlin Moncure writes: > On Mon, Aug 13, 2018 at 12:56 PM mrcasa bengaluru wrote: >> 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 the default value.

Re: JSONB filed with default JSON from a file

2018-08-13 Thread Merlin Moncure
On Mon, Aug 13, 2018 at 12:56 PM mrcasa bengaluru wrote: >> >> 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

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

Re: JSONB filed with default JSON from a file

2018-08-13 Thread Charles Clavadetscher
Hi --- Charles Clavadetscher Neugasse 84 CH - 8005 Zürich Tel: +41-79-345 18 88 - > On 13.08.2018, at 19:40, mrcasa bengaluru wrote: > > All, > > I'm new to JSONB datatype. We would like to store a nested JSON file in this >