]> granicus.if.org Git - postgis/commitdiff
Missed a spot in last commit
authorRegina Obe <lr@pcorp.us>
Fri, 23 Nov 2018 07:49:49 +0000 (07:49 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 23 Nov 2018 07:49:49 +0000 (07:49 +0000)
Closes #4231 for postgis 2.5.2

git-svn-id: http://svn.osgeo.org/postgis/branches/2.5@17061 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/postgis.sql.in

index 0915846262c01d2b0a070e3a8c3f31b9c4f5c41e..54c554d57e7cbec202b4426488afca365bcac09c 100644 (file)
@@ -5541,7 +5541,9 @@ LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL COST 200;
 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
+                FROM pg_class c, pg_namespace n, pg_attribute a
+                , (SELECT connamespace, conrelid, conkey, pg_get_constraintdef(oid) As consrc
+                   FROM pg_constraint) AS s
                 WHERE n.nspname = $1
                 AND c.relname = $2
                 AND a.attname = $3