FWIW,因爲似乎沒有成爲一個正式的卸載腳本(即我所知道的),這是我在結束運行,刪除所有數據類型和功能的腳本通過PostGIS的創建:
DROP TYPE IF EXISTS box2d CASCADE;
DROP TYPE IF EXISTS box2df CASCADE;
DROP TYPE IF EXISTS box3d CASCADE;
DROP TYPE IF EXISTS geography CASCADE;
DROP TYPE IF EXISTS geometry CASCADE;
DROP TYPE IF EXISTS geometry_dump CASCADE;
DROP TYPE IF EXISTS gidx CASCADE;
DROP TYPE IF EXISTS pgis_abs CASCADE;
DROP TYPE IF EXISTS spheroid CASCADE;
DROP TYPE IF EXISTS valid_detail CASCADE;
DROP TABLE IF EXISTS spatial_ref_sys CASCADE;
DROP FUNCTION IF EXISTS _postgis_join_selectivity(regclass, text, regclass, text, text) CASCADE;
DROP FUNCTION IF EXISTS _postgis_stats(tbl regclass, att_name text, text) CASCADE;
DROP FUNCTION IF EXISTS checkauth(text, text) CASCADE;
DROP FUNCTION IF EXISTS checkauthtrigger() CASCADE;
DROP FUNCTION IF EXISTS dropgeometrytable(table_name character varying) CASCADE;
DROP FUNCTION IF EXISTS dropgeometrytable(schema_name character varying, table_name character varying) CASCADE;
DROP FUNCTION IF EXISTS geography_analyze(internal) CASCADE;
DROP FUNCTION IF EXISTS geography_gist_compress(internal) CASCADE;
DROP FUNCTION IF EXISTS geography_gist_decompress(internal) CASCADE;
DROP FUNCTION IF EXISTS geography_gist_penalty(internal, internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geography_gist_picksplit(internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geography_gist_union(bytea, internal) CASCADE;
DROP FUNCTION IF EXISTS geography_typmod_in(cstring[]) CASCADE;
DROP FUNCTION IF EXISTS geography_typmod_out(integer) CASCADE;
DROP FUNCTION IF EXISTS geometry_analyze(internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_compress_2d(internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_compress_nd(internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_decompress_2d(internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_decompress_nd(internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_penalty_2d(internal, internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_penalty_nd(internal, internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_picksplit_2d(internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_picksplit_nd(internal, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_union_2d(bytea, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_gist_union_nd(bytea, internal) CASCADE;
DROP FUNCTION IF EXISTS geometry_typmod_in(cstring[]) CASCADE;
DROP FUNCTION IF EXISTS geometry_typmod_out(integer) CASCADE;
DROP FUNCTION IF EXISTS gettransactionid() CASCADE;
DROP FUNCTION IF EXISTS gserialized_gist_joinsel_2d(internal, oid, internal, smallint) CASCADE;
DROP FUNCTION IF EXISTS gserialized_gist_joinsel_nd(internal, oid, internal, smallint) CASCADE;
DROP FUNCTION IF EXISTS gserialized_gist_sel_2d(internal, oid, internal, integer) CASCADE;
DROP FUNCTION IF EXISTS gserialized_gist_sel_nd(internal, oid, internal, integer) CASCADE;
DROP FUNCTION IF EXISTS lockrow(text, text, text) CASCADE;
DROP FUNCTION IF EXISTS lockrow(text, text, text, text) CASCADE;
DROP FUNCTION IF EXISTS lockrow(text, text, text, timestamp without time zone) CASCADE;
DROP FUNCTION IF EXISTS postgis_cache_bbox() CASCADE;
DROP FUNCTION IF EXISTS postgis_constraint_dims(geomschema text, geomtable text, geomcolumn text) CASCADE;
DROP FUNCTION IF EXISTS postgis_constraint_srid(geomschema text, geomtable text, geomcolumn text) CASCADE;
DROP FUNCTION IF EXISTS postgis_constraint_type(geomschema text, geomtable text, geomcolumn text) CASCADE;
DROP FUNCTION IF EXISTS postgis_geos_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_lib_build_date() CASCADE;
DROP FUNCTION IF EXISTS postgis_lib_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_libjson_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_libxml_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_proj_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_scripts_build_date() CASCADE;
DROP FUNCTION IF EXISTS postgis_scripts_installed() CASCADE;
DROP FUNCTION IF EXISTS postgis_scripts_released() CASCADE;
DROP FUNCTION IF EXISTS postgis_svn_version() CASCADE;
DROP FUNCTION IF EXISTS postgis_type_name(geomname character varying, coord_dimension integer, use_new_name boolean) CASCADE;
DROP FUNCTION IF EXISTS postgis_typmod_dims(integer) CASCADE;
DROP FUNCTION IF EXISTS postgis_typmod_srid(integer) CASCADE;
DROP FUNCTION IF EXISTS postgis_typmod_type(integer) CASCADE;
DROP FUNCTION IF EXISTS postgis_version() CASCADE;
DROP FUNCTION IF EXISTS st_area(text) CASCADE;
DROP FUNCTION IF EXISTS st_asewkt(text) CASCADE;
DROP FUNCTION IF EXISTS st_asgeojson(text) CASCADE;
DROP FUNCTION IF EXISTS st_asgml(text) CASCADE;
DROP FUNCTION IF EXISTS st_askml(text) CASCADE;
DROP FUNCTION IF EXISTS st_assvg(text) CASCADE;
DROP FUNCTION IF EXISTS st_astext(text) CASCADE;
DROP FUNCTION IF EXISTS st_coveredby(text, text) CASCADE;
DROP FUNCTION IF EXISTS st_covers(text, text) CASCADE;
DROP FUNCTION IF EXISTS st_distance(text, text) CASCADE;
DROP FUNCTION IF EXISTS st_dwithin(text, text, double precision) CASCADE;
DROP FUNCTION IF EXISTS st_intersects(text, text) CASCADE;
DROP FUNCTION IF EXISTS st_length(text) CASCADE;
DROP FUNCTION IF EXISTS st_relatematch(text, text) CASCADE;
我不認爲這是對卸載OLT PostGIS的東西的工具,但如果你刪除使用'DROP TYPE ... CASCADE的PostGIS的類型;',你也將去除大部分的postgis功能。 Postgis類型是:'geometry','geometry_dump','box2d','box3d','geography'和其他一些。 –
不錯,謝謝!我猜想,這也將刪除功能,對吧? – Nuschk
是的,我想通了。謝謝你的幫助! – Nuschk