Re: JSONB filed with default JSON from a file
От | Tom Lane |
---|---|
Тема | Re: JSONB filed with default JSON from a file |
Дата | |
Msg-id | 23116.1534183874@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: JSONB filed with default JSON from a file (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: JSONB filed with default JSON from a file
|
Список | pgsql-general |
Merlin Moncure <mmoncure@gmail.com> writes: > On Mon, Aug 13, 2018 at 12:56 PM mrcasa bengaluru <mrcasablr@gmail.com> wrote: >> Thanks! However, this involves writing the entire JSON in the schema file looks inconvenient. I was hoping I would beable to reference to an external JSON file which could be used for the default value. > [ put it in a table instead ] Yeah. If you really insist on having it in a file outside the database, you can, but you'll need a superuser-privileged function to read it from that file. Aside from the security aspects, this sort of thing is an antipattern because it opens you up to backup/restore problems ("oh, we needed that file too?"), replication problems, yadda yadda. And what are you buying by doing it like that? Better to keep it inside the DB instead. regards, tom lane
В списке pgsql-general по дате отправления: