I'm new at PostgreSQL. I'm trying to import JSON file into PostgreSQL table. I created an empty table:
covid19=# CREATE TABLE temp_cov(
covid19(# data jsonb
covid19(# );
and tried to copy my data from JSON in this table with this command in Command line:
cat output.json | psql -h localhost -p 5432 covid19 -U postgres -c "COPY temp_cov (data) FROM STDIN;"
The output was just "COPY 1" and when I open my table in psql with
SELECT * FROM temp_cov;
But this command goes without an end and with this output.
Unfortunately, I couldn't find an answer or some similar problem solution. Thank you in advance for your advices.
Also my json file is already modified to "not pretty" form and it has over than 11k lines.