Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any easy way to migrate json file to Postgres database?

I googled, but it seems to me that there in no psql command to load json data, like there is for example \copy for csv.

share|improve this question
2  
Do you want to convert non structural data into a row - column table data or just add a json content from file to a field of a record ? – Sahap Asci Dec 21 '15 at 9:36
    
I'd appreciate first approach – vedar Dec 21 '15 at 9:43
    
You may want to check JSON Processing Functions. postgresql provides some json to record (row) functions such as json_populate_record – Sahap Asci Dec 25 '15 at 11:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.