Re: [GENERAL] inserting a text file via json

2014-09-08 Thread Emanuel Calvo
Did you mean something like...?: postgres=# \! echo "{\"menu\": { \"id\": \"file\" }}" > /opt/pgdata/exampl.json postgres=# select pg_read_file('/opt/pgdata/exampl.json'); pg_read_file {"menu": { "id": "file" }}+ (1 row) postgres=# select pg_read_file('/opt/

[GENERAL] inserting a text file via json

2014-09-05 Thread john.tiger
we want to store markdown text files into our json fields - can this be done ? I guess we could have a separate json field and bytea field for the markdown file but this might be difficult when it comes to our REST response - anyone do something like this ? -- Sent via pgsql-general mailing