From: Regina Obe Date: Fri, 1 Jul 2011 13:10:08 +0000 (+0000) Subject: convert to CREATE OR REPLACE postgis_constraint_srid X-Git-Tag: 2.0.0alpha1~1300 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef5f4100f93092aacaf99ae8ba73264c8786aae7;p=postgis convert to CREATE OR REPLACE postgis_constraint_srid git-svn-id: http://svn.osgeo.org/postgis/trunk@7542 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/postgis.sql.in.c b/postgis/postgis.sql.in.c index f820bddd5..3fd274163 100644 --- a/postgis/postgis.sql.in.c +++ b/postgis/postgis.sql.in.c @@ -4873,7 +4873,7 @@ $$ $$ language 'sql' IMMUTABLE STRICT COST 200; -CREATE FUNCTION postgis_constraint_srid(geomschema text, geomtable text, geomcolumn text) RETURNS integer AS +CREATE OR REPLACE FUNCTION postgis_constraint_srid(geomschema text, geomtable text, geomcolumn text) RETURNS integer AS $$ SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s