I added a shapefile to the PostGIS using,
ogr2ogr -f PostgreSQL PG:"host=server_ip user=username dbname=dbname password=password" yourshapefile.shp;
Now I want to remove it. What is the command line code for that?
The table list is as follows \d,
List of relations
Schema | Name | Type | Owner
--------+----------------------+----------+---------
public | pimapine | table | smaranh
public | pimapine_ogc_fid_seq | sequence | smaranh
(2 rows)
And when I execute DROP TABLE public.pimapine there is no change to the output of \d.
Answer
The cleanest way is with the DropGeometryTable function. This will remove the table as well as entries in the geometry_columns table.
No comments:
Post a Comment