Using the following SQL Code
copy (select row_to_json(t) from (select * from mytable) t) to '/home/soti/myfile.json';
I can export an arbitrary table to a JSON File. Each record is serialized in a single line. That means if the table has 5000 rows, the file will have 5000 rows, too.
Now I want to do the reverse: I want to import an json-file into the table. I.e. if the file contains 5000 lines, each line containing a single json-document, 5000 rows should be inserted into the table.
Is there an easy posibility?