mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 17:12:35 +00:00
Do not raise an exception from DropGeometryTable if a non-existing table is given. Patch by Andrea Peri. Regress test mine. Closes ticket #861.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7014 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
87df11bcd3
commit
f14cf72b71
|
@ -2578,9 +2578,9 @@ BEGIN
|
|||
' f_table_name = ' || quote_literal(table_name);
|
||||
|
||||
-- Remove table
|
||||
EXECUTE 'DROP TABLE '
|
||||
EXECUTE 'DROP TABLE IF EXISTS '
|
||||
|| quote_ident(real_schema) || '.' ||
|
||||
quote_ident(table_name);
|
||||
quote_ident(table_name) || ' RESTRICT';
|
||||
|
||||
RETURN
|
||||
real_schema || '.' ||
|
||||
|
|
|
@ -6,3 +6,4 @@ CREATE TABLE test_pt(gid SERIAL PRIMARY KEY, geom geometry);
|
|||
INSERT INTO test_pt(geom) VALUES(ST_GeomFromEWKT('SRID=4326;POINT M(1 2 3)'));
|
||||
SELECT populate_geometry_columns('test_pt'::regclass);
|
||||
SELECT 'The result: ' || DropGeometryTable('test_pt');
|
||||
SELECT 'Unexistant: ' || DropGeometryTable('unexistent'); -- see ticket #861
|
||||
|
|
|
@ -2,3 +2,6 @@ NOTICE: CREATE TABLE will create implicit sequence "test_pt_gid_seq" for serial
|
|||
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.
|
||||
|
|
Loading…
Reference in a new issue