]> granicus.if.org Git - postgis/commitdiff
Exclude raster_columns from geometry_columns (#1122)
authorSandro Santilli <strk@keybit.net>
Fri, 20 Jan 2012 09:11:42 +0000 (09:11 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 20 Jan 2012 09:11:42 +0000 (09:11 +0000)
Add regress test, with a newborn "tickets" testcase for raster

git-svn-id: http://svn.osgeo.org/postgis/trunk@8889 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/postgis.sql.in.c
raster/test/regress/Makefile.in
raster/test/regress/tickets.sql [new file with mode: 0644]
raster/test/regress/tickets_expected [new file with mode: 0644]

index 35a9356aa5ba4a42d68d7fb28434eae5f6dd20af..c19f4a4f3bb5620ed440a8a22247fd4369b6ce43 100644 (file)
@@ -4344,7 +4344,8 @@ CREATE OR REPLACE VIEW geometry_columns AS
     AND a.attrelid = c.oid \r
     AND c.relnamespace = n.oid \r
     AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char")\r
-    AND NOT pg_is_other_temp_schema(c.relnamespace);\r
+    AND NOT pg_is_other_temp_schema(c.relnamespace)\r
+    AND NOT ( n.nspname = 'public' AND c.relname = 'raster_columns' );\r
 \r
 -- TODO: support RETURNING and raise a WARNING\r
 CREATE OR REPLACE RULE geometry_columns_insert AS\r
index 3c7ab0d11cf02413248fd2ee8345e22278c33d19..09786b9c4cf213ac0869210d74fb0df5287d1e80 100644 (file)
@@ -123,7 +123,8 @@ TEST_SREL = \
        $(NULL)
        
 TEST_BUGS = \
-       bug_test_car5.sql
+       bug_test_car5.sql \
+       tickets.sql
 
 TESTS = $(TEST_METADATA) $(TEST_IO) $(TEST_FUNC) \
                $(TEST_PROPS) $(TEST_BANDPROPS) \
diff --git a/raster/test/regress/tickets.sql b/raster/test/regress/tickets.sql
new file mode 100644 (file)
index 0000000..9ea0f44
--- /dev/null
@@ -0,0 +1,3 @@
+-- #1485
+SELECT '#1485', count(*) FROM geometry_columns
+WHERE f_table_name = 'raster_columns';
diff --git a/raster/test/regress/tickets_expected b/raster/test/regress/tickets_expected
new file mode 100644 (file)
index 0000000..1c1b1e0
--- /dev/null
@@ -0,0 +1 @@
+#1485|0