I am new to both PostgreSQL and GeoJson. While following some of the tutorials online and some answer over here I wrote this line to import my geojson file:
ogr2ogr -f "PostgreSQL" PG:"dbname=In user=postgres" "C:\Users\hp\Downloads\red\map.geojson" -nln locations -append
But this line produces a syntax errorERROR: syntax error at or near "ogr2ogr"
I also followed the instructions on this answer Store GeoJson with Feature Collection
The data is shown but only on running the query given in the answer above. But how do I store this data. I am not able to find it by doing select * from table _name. Also the answer given on the above link shows data as expected but It is only shown the data and not storing it.
If anyone can help me insert the geojson file either by using the ogr2ogr or by helping me to insert data in table by using the link above.