Renamed st_bytea to bytea as per PostGIS convention. Existing databases will not be affected if upgraded using the upgrade scripts. Associated ticket is #1003

git-svn-id: http://svn.osgeo.org/postgis/trunk@8423 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Bborie Park 2011-12-15 00:21:31 +00:00
parent 0dec0afaba
commit e105d93474
3 changed files with 14 additions and 8 deletions

View 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

View 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);

View 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')
;
-----------------------------------------------------------------------