[postgis-tickets] r15409 - List parent partition tables and have geography_view only list things like tables (exclude helper types)
Regina Obe
lr at pcorp.us
Sat May 27 10:07:42 PDT 2017
Author: robe
Date: 2017-05-27 10:07:42 -0700 (Sat, 27 May 2017)
New Revision: 15409
Modified:
trunk/postgis/geography.sql.in
trunk/postgis/postgis.sql.in
trunk/raster/rt_pg/rtpostgis.sql.in
Log:
List parent partition tables and have geography_view only list things like tables (exclude helper types)
Closes #3766
Modified: trunk/postgis/geography.sql.in
===================================================================
--- trunk/postgis/geography.sql.in 2017-05-27 16:40:48 UTC (rev 15408)
+++ trunk/postgis/geography.sql.in 2017-05-27 17:07:42 UTC (rev 15409)
@@ -147,6 +147,7 @@
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 @@
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)
Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in 2017-05-27 16:40:48 UTC (rev 15408)
+++ trunk/postgis/postgis.sql.in 2017-05-27 17:07:42 UTC (rev 15409)
@@ -5433,7 +5433,8 @@
-- 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 @@
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);
Modified: trunk/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- trunk/raster/rt_pg/rtpostgis.sql.in 2017-05-27 16:40:48 UTC (rev 15408)
+++ trunk/raster/rt_pg/rtpostgis.sql.in 2017-05-27 17:07:42 UTC (rev 15409)
@@ -8250,6 +8250,7 @@
------------------------------------------------------------------------------
-- 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 @@
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);
------------------------------------------------------------------------------
More information about the postgis-tickets
mailing list