' f_table_name = ' || quote_literal(table_name);\r
\r
-- Remove table\r
- EXECUTE 'DROP TABLE '\r
+ EXECUTE 'DROP TABLE IF EXISTS '\r
|| quote_ident(real_schema) || '.' ||\r
- quote_ident(table_name);\r
+ quote_ident(table_name) || ' RESTRICT';\r
\r
RETURN\r
real_schema || '.' ||\r
INSERT INTO test_pt(geom) VALUES(ST_GeomFromEWKT('SRID=4326;POINT M(1 2 3)'));\r
SELECT populate_geometry_columns('test_pt'::regclass);\r
SELECT 'The result: ' || DropGeometryTable('test_pt');\r
+SELECT 'Unexistant: ' || DropGeometryTable('unexistent'); -- see ticket #861\r
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_pt_pkey" for table "test_pt"
1
The result: public.test_pt dropped.
+NOTICE: table "unexistent" does not exist, skipping
+PL/pgSQL function "dropgeometrytable" line 22 at EXECUTE statement
+Unexistant: public.unexistent dropped.