pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mrcasa bengaluru <mrcasablr@gmail.com>
To: Charles Clavadetscher <clavadetscher@swisspug.org>
Cc: pgsql-general@postgresql.org
Subject: Re: JSONB filed with default JSON from a file
Date: Mon, 13 Aug 2018 23:25:48 +0530
Message-ID: <CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com> (raw)
In-Reply-To: <7D710F90-3332-497E-9390-54B1F302961B@swisspug.org>
References: <CALpZ+ORgw=ZjZDBJ32E4ucuZBtVnHEHQ4=GM2Ex+w378QwBAXQ@mail.gmail.com>
	<7D710F90-3332-497E-9390-54B1F302961B@swisspug.org>

>
> 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.

view thread (6+ messages)  latest in thread

Message-ID: <CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com>
Permalink:  ../CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mrcasablr@gmail.com, clavadetscher@swisspug.org
  Subject: Re: JSONB filed with default JSON from a file
  In-Reply-To: <CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com>
  References: <CALpZ+ORgw=ZjZDBJ32E4ucuZBtVnHEHQ4=GM2Ex+w378QwBAXQ@mail.gmail.com> <7D710F90-3332-497E-9390-54B1F302961B@swisspug.org> <CALpZ+OStrE8EC51KgChTd4HTvd50LSXatHzCqLuUdK0_pdfANQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox