]> granicus.if.org Git - postgis/commitdiff
Renamed st_bytea to bytea as per PostGIS convention. Existing databases will not...
authorBborie Park <bkpark at ucdavis.edu>
Thu, 15 Dec 2011 00:21:31 +0000 (00:21 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Thu, 15 Dec 2011 00:21:31 +0000 (00:21 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8423 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in.c
raster/rt_pg/rtpostgis_drop.sql.in.c
raster/test/regress/rt_bytea.sql

index 0684e96c4aa25d8f8c4369e03bc1077b71d750ac..eb271654da3b37de34ff9b811dcc627dea738b3a 100644 (file)
@@ -2804,12 +2804,12 @@ CREATE OR REPLACE FUNCTION ST_MinPossibleVal(pixeltype text)
 CREATE OR REPLACE FUNCTION st_asbinary(raster)
     RETURNS bytea
     AS 'MODULE_PATHNAME', 'RASTER_to_binary'
-    LANGUAGE 'C' IMMUTABLE;
+    LANGUAGE 'C' IMMUTABLE STRICT;
 
-CREATE OR REPLACE FUNCTION st_bytea(raster)
+CREATE OR REPLACE FUNCTION bytea(raster)
     RETURNS bytea
     AS 'MODULE_PATHNAME', 'RASTER_to_bytea'
-    LANGUAGE 'C' IMMUTABLE;
+    LANGUAGE 'C' IMMUTABLE STRICT;
 
 ------------------------------------------------------------------------------
 --  Casts
@@ -2822,7 +2822,7 @@ CREATE CAST (raster AS geometry)
     WITH FUNCTION st_convexhull(raster) AS IMPLICIT;
 
 CREATE CAST (raster AS bytea)
-    WITH FUNCTION st_bytea(raster) AS IMPLICIT;
+    WITH FUNCTION bytea(raster) AS IMPLICIT;
 
 ------------------------------------------------------------------------------
 --  GiST index OPERATOR support functions
index 949a310674b88e41001b3ce9342146f75eb7e9c1..9e14ae2e16f4c80374d161240c144f4b6f8fcdf6 100644 (file)
@@ -51,6 +51,12 @@ DROP OPERATOR IF EXISTS ~ (raster, raster);
 DROP FUNCTION IF EXISTS st_contain(raster, raster);
 */
 
+-- drop st_bytea
+/* commented out for Regina's consideration
+DROP CAST IF EXITS (raster as bytea);
+DROP FUNCTION IF EXISTS st_bytea(raster);
+*/
+
 -- drop box2d
 /* commented out for Regina's consideration
 DROP CAST IF EXISTS (raster AS box2d);
index 47965d24cd9f145c7a82b1beb15055448dff1e4b..08458d13d11b391e877ea1adddcf0070213bce19 100644 (file)
@@ -16,9 +16,9 @@ SELECT
     name
 FROM rt_bytea_test
 WHERE
-    encode(st_bytea(rast), 'hex') != encode(rast::bytea, 'hex')
+    encode(bytea(rast), 'hex') != encode(rast::bytea, 'hex')
     OR
-    encode(st_bytea(rast), 'hex') != encode(rast, 'hex')
+    encode(bytea(rast), 'hex') != encode(rast, 'hex')
     ;
 
 -----------------------------------------------------------------------
@@ -30,9 +30,9 @@ SELECT
     name
 FROM rt_bytea_test
 WHERE
-    encode(st_bytea(rast), 'base64') != encode(rast::bytea, 'base64')
+    encode(bytea(rast), 'base64') != encode(rast::bytea, 'base64')
     OR
-    encode(st_bytea(rast), 'base64') != encode(rast, 'base64')
+    encode(bytea(rast), 'base64') != encode(rast, 'base64')
     ;
 
 -----------------------------------------------------------------------