]> granicus.if.org Git - postgis/commitdiff
#3103 Get rid of casting of table, schema, and column name. though oddly find_srid...
authorRegina Obe <lr@pcorp.us>
Mon, 27 Apr 2015 17:29:55 +0000 (17:29 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 27 Apr 2015 17:29:55 +0000 (17:29 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13453 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/postgis.sql.in
postgis/postgis_drop_before.sql

index cd6c7e885f8f1894394ee25b1e9a0f7804b8b42b..ee791ef480167f849421a2021c93ba36dadbc6a4 100644 (file)
@@ -4991,13 +4991,12 @@ LANGUAGE 'sql' STABLE STRICT;
 
 -- 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
 CREATE OR REPLACE VIEW geometry_columns AS 
  SELECT current_database()::character varying(256) AS f_table_catalog,
--- TODO: consider getting rid of CASTING it slows things down by 2 to 6 fold for table/column exact matches.  
---      Geography doesn't have casting by the way
-    n.nspname::varchar(256) AS f_table_schema,
-    c.relname::varchar(256) AS f_table_name,
-    a.attname::varchar(256) AS f_geometry_column,
+    n.nspname AS f_table_schema,
+    c.relname AS f_table_name,
+    a.attname AS f_geometry_column,
     COALESCE(postgis_typmod_dims(a.atttypmod), sn.ndims, 2) AS coord_dimension,
     COALESCE(NULLIF(postgis_typmod_srid(a.atttypmod), 0), sr.srid, 0) AS srid,
     replace(replace(COALESCE(NULLIF(upper(postgis_typmod_type(a.atttypmod)), 'GEOMETRY'::text), st.type, 'GEOMETRY'::text), 'ZM'::text, ''::text), 'Z'::text, ''::text)::character varying(30) AS type
index 2ddc9f1cf4c4ee93c9eef436cf8940d0c9286268..dbaf912a00f9643b6620cae25fa4d55291b1dcc8 100644 (file)
@@ -65,3 +65,5 @@ $$ ;
 DROP FUNCTION IF EXISTS ST_AsTWKB(geometry,int4);
 DROP FUNCTION IF EXISTS ST_AsTWKB(geometry,int4,int8);
 DROP FUNCTION IF EXISTS ST_AsTWKB(geometry,int4,int8,boolean);
+
+DROP VIEW geometry_columns; -- removed cast 2.2.0 so need to recreate