-
-
Save ErshKUS/54d9414e9ea628275f6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: ershkus_fn_buildarea(geometry) | |
-- DROP FUNCTION ershkus_fn_buildarea(geometry); | |
CREATE OR REPLACE FUNCTION ershkus_fn_buildarea(geometry) | |
RETURNS geometry AS | |
$BODY$ | |
BEGIN | |
RETURN (SELECT ST_BuildArea($1)); | |
EXCEPTION | |
WHEN SQLSTATE 'XX000' THEN | |
RETURN null; | |
WHEN SQLSTATE '21000' THEN | |
RETURN null; | |
END; | |
$BODY$ | |
LANGUAGE plpgsql VOLATILE | |
COST 100; | |
ALTER FUNCTION ershkus_fn_buildarea(geometry) | |
OWNER TO ershkus; | |
GRANT EXECUTE ON FUNCTION ershkus_fn_buildarea(geometry) TO public; | |
GRANT EXECUTE ON FUNCTION ershkus_fn_buildarea(geometry) TO ershkus; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment