[postgis-tickets] r17316 - Schema qualify all geometry casts in raster code, otherwise materialized views do not resture
Regina Obe
lr at pcorp.us
Sat Mar 9 11:20:42 PST 2019
Author: robe
Date: 2019-03-09 23:20:42 -0800 (Sat, 09 Mar 2019)
New Revision: 17316
Modified:
branches/2.5/raster/rt_pg/rtpostgis.sql.in
Log:
Schema qualify all geometry casts in raster code, otherwise materialized views do not resture
Closes #4291 for PostGIS 2.5.2
Missed some spots in last commit
Modified: branches/2.5/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- branches/2.5/raster/rt_pg/rtpostgis.sql.in 2019-03-09 18:43:26 UTC (rev 17315)
+++ branches/2.5/raster/rt_pg/rtpostgis.sql.in 2019-03-10 07:20:42 UTC (rev 17316)
@@ -282,7 +282,7 @@
msg text;
msgset text[];
BEGIN
- extent := @extschema at .ST_Extent(rast::geometry);
+ extent := @extschema at .ST_Extent(rast::@extschema at .geometry);
metadata := @extschema at .ST_Metadata(rast);
msg := 'Raster of ' || metadata.width || 'x' || metadata.height || ' pixels has ' || metadata.numbands || ' ';
@@ -341,7 +341,7 @@
CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, pixelsize float8)
RETURNS raster
- AS $$ SELECT @extschema at .ST_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, @extschema at .ST_SRID('POINT(0 0)'::geometry)) $$
+ AS $$ SELECT @extschema at .ST_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, @extschema at .ST_SRID('POINT(0 0)'::@extschema at .geometry)) $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
CREATE OR REPLACE FUNCTION st_makeemptyraster(rast raster)
@@ -7447,7 +7447,7 @@
CREATE OR REPLACE FUNCTION _raster_constraint_info_extent(rastschema name, rasttable name, rastcolumn name)
RETURNS geometry AS $$
SELECT
- trim(both '''' from split_part(trim(split_part(s.consrc, ' @ ', 2)), '::', 1))::geometry
+ trim(both '''' from split_part(trim(split_part(s.consrc, ' @ ', 2)), '::', 1))::@extschema at .geometry
FROM pg_class c, pg_namespace n, pg_attribute a
, (SELECT connamespace, conrelid, conkey, pg_get_constraintdef(oid) As consrc
FROM pg_constraint) AS s
@@ -7496,7 +7496,7 @@
|| ' ADD CONSTRAINT ' || quote_ident(cn)
|| ' CHECK ( @extschema at .st_envelope('
|| quote_ident($3)
- || ') @ ''' || attr || '''::geometry) NOT VALID';
+ || ') @ ''' || attr || '''::@extschema at .geometry) NOT VALID';
RETURN @extschema at ._add_raster_constraint(cn, sql);
END;
$$ LANGUAGE 'plpgsql' VOLATILE STRICT
@@ -7584,7 +7584,7 @@
AND s.contype = 'x'
AND 0::smallint = ANY (s.conkey)
AND idx.indexrelid = s.conindid
- AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::geometry)'
+ AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::@extschema at .geometry)'
AND s.conexclop[1] = op.oid
AND op.oprname = '=';
$$ LANGUAGE sql STABLE STRICT
@@ -7635,7 +7635,7 @@
AND s.contype = 'x'
AND 0::smallint = ANY (s.conkey)
AND idx.indexrelid = s.conindid
- AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::geometry)'
+ AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::@extschema at .geometry)'
AND s.conexclop[1] = op.oid
AND op.oprname = '=';
@@ -8604,7 +8604,7 @@
n.nspname AS r_table_schema,
c.relname AS r_table_name,
a.attname AS r_raster_column,
- COALESCE(_raster_constraint_info_srid(n.nspname, c.relname, a.attname), (SELECT ST_SRID('POINT(0 0)'::geometry))) AS srid,
+ COALESCE(_raster_constraint_info_srid(n.nspname, c.relname, a.attname), (SELECT ST_SRID('POINT(0 0)'::@extschema at .geometry))) AS srid,
_raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'x') AS scale_x,
_raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'y') AS scale_y,
_raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'width') AS blocksize_x,
More information about the postgis-tickets
mailing list