]> granicus.if.org Git - postgis/commitdiff
List parent partition tables and have geography_view only list things like tables...
authorRegina Obe <lr@pcorp.us>
Sat, 27 May 2017 17:07:42 +0000 (17:07 +0000)
committerRegina Obe <lr@pcorp.us>
Sat, 27 May 2017 17:07:42 +0000 (17:07 +0000)
Closes #3766

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

postgis/geography.sql.in
postgis/postgis.sql.in
raster/rt_pg/rtpostgis.sql.in

index 36a21555b67f5cbd18e1aff50c84f8d9a0a7a613..5d27cc30dd7d49fff749e89efe4299db0463e349 100644 (file)
@@ -147,6 +147,7 @@ CREATE OR REPLACE FUNCTION postgis_typmod_type(integer)
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
 -- Availability: 1.5.0
+-- Changed: 2.4.0 Limit to only list things that are tables
 CREATE OR REPLACE VIEW geography_columns AS
        SELECT
                current_database() AS f_table_catalog, 
@@ -162,12 +163,13 @@ CREATE OR REPLACE VIEW geography_columns AS
                pg_type t, 
                pg_namespace n
        WHERE t.typname = 'geography'
-        AND a.attisdropped = false
-        AND a.atttypid = t.oid
-        AND a.attrelid = c.oid
-        AND c.relnamespace = n.oid
-        AND NOT pg_is_other_temp_schema(c.relnamespace)
-        AND has_table_privilege( c.oid, 'SELECT'::text );
+               AND a.attisdropped = false
+               AND a.atttypid = t.oid
+               AND a.attrelid = c.oid
+               AND c.relnamespace = n.oid
+               AND c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char", 'f'::"char", 'p'::"char"] )
+               AND NOT pg_is_other_temp_schema(c.relnamespace)
+               AND has_table_privilege( c.oid, 'SELECT'::text );
 
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography(geometry)
index 67c53dfdebdd475d2c493e80131a96a6eaba7881..90a5900a50ea795e2b35584be36a490f4f7598a0 100644 (file)
@@ -5433,7 +5433,8 @@ LANGUAGE 'sql' STABLE STRICT _PARALLEL;
 
 -- Availability: 2.0.0
 -- Changed: 2.1.8 significant performance improvement for constraint based columns
--- Changed: 2.2.0 get rid of scheman, table, column cast to improve performance
+-- Changed: 2.2.0 get rid of schema, table, column cast to improve performance
+-- Changed: 2.4.0 List also Parent partitioned tables
 CREATE OR REPLACE VIEW geometry_columns AS
  SELECT current_database()::character varying(256) AS f_table_catalog,
     n.nspname AS f_table_schema,
@@ -5467,7 +5468,7 @@ CREATE OR REPLACE VIEW geometry_columns AS
           WHERE s.consrc ~~* '%srid(% = %'::text
 
 ) sr ON sr.connamespace = n.oid AND sr.conrelid = c.oid AND (a.attnum = ANY (sr.conkey))
-  WHERE (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char", 'f'::"char"]))
+  WHERE (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char", 'f'::"char", 'p'::"char"]))
   AND NOT c.relname = 'raster_columns'::name AND t.typname = 'geometry'::name
   AND NOT pg_is_other_temp_schema(c.relnamespace) AND has_table_privilege(c.oid, 'SELECT'::text);
 
index 480345cfd2b781ab731d5a9ada12e7d9ca60e1f2..e88c2e34312c3f91b4fcbf18ffb4117dd73c55eb 100644 (file)
@@ -8250,6 +8250,7 @@ CREATE OR REPLACE FUNCTION DropRasterConstraints (
 ------------------------------------------------------------------------------
 -- Availability: 2.0.0
 -- Changed: 2.2.0
+-- Changed: 2.4.0 List partitioned parent tables
 CREATE OR REPLACE VIEW raster_columns AS
        SELECT
                current_database() AS r_table_catalog,
@@ -8279,7 +8280,7 @@ CREATE OR REPLACE VIEW raster_columns AS
                AND a.atttypid = t.oid
                AND a.attrelid = c.oid
                AND c.relnamespace = n.oid
-               AND c.relkind = ANY(ARRAY['r'::char, 'v'::char, 'm'::char, 'f'::char])
+               AND c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char", 'f'::"char", 'p'::"char"] )
                AND NOT pg_is_other_temp_schema(c.relnamespace)  AND has_table_privilege(c.oid, 'SELECT'::text);
 
 ------------------------------------------------------------------------------