URX_PUBLIC._postgis_deprecate(oldname text, newname text, version text) - Procedure
Home|Tables|Schemas|Diagrams|Foreign Keys|Indexes

NameURX_PUBLIC._postgis_deprecate(oldname text, newname text, version text)
Comment
Src
CREATE FUNCTION "URX_PUBLIC"."_postgis_deprecate"(oldname text, newname text, version text) 
 RETURNS void AS 
$BODY$
DECLARE
  curver_text text;
BEGIN
  --
  -- Raises a NOTICE if it was deprecated in this version,
  -- a WARNING if in a previous version (only up to minor version checked)
  --
    curver_text := '2.4.6';
    IF split_part(curver_text,'.',1)::int > split_part(version,'.',1)::int OR
       ( split_part(curver_text,'.',1) = split_part(version,'.',1) AND
         split_part(curver_text,'.',2) != split_part(version,'.',2) )
    THEN
      RAISE WARNING '% signature was deprecated in %. Please use %', oldname, version, newname;
    ELSE
      RAISE DEBUG '% signature was deprecated in %. Please use %', oldname, version, newname;
    END IF;
END;
$BODY$
 LANGUAGE 'plpgsql' IMMUTABLESTRICT ;