On Mon, Aug 13, 2018 at 12:56 PM mrcasa bengaluru <mrcasa...@gmail.com> 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 able to reference to an external > JSON file which could be used for the default value.
1) Stick the default json in a table somewhere, say default_json with one row, one column 2) Wrap the table with a function, default_json() that returns the value from the table 3) Make a default function for the table, DEFAULT default_json(). That way you externalize the default into the database merlin