]> granicus.if.org Git - postgis/commitdiff
Do not require XML support in PostgreSQL for testing purposes
authorSandro Santilli <strk@keybit.net>
Mon, 23 Feb 2015 18:19:10 +0000 (18:19 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 23 Feb 2015 18:19:10 +0000 (18:19 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13271 b70326c6-7e19-0410-871a-916f4a2858ee

regress/regress_index.sql

index 22e141758560f2ee4750683870fad0c30c430e42..5397dc3452d987ea693b71b6d79ee5b5ea601181 100644 (file)
@@ -7,14 +7,10 @@ CREATE FUNCTION qnodes(q text) RETURNS text
 LANGUAGE 'plpgsql' AS
 $$
 DECLARE
-  exp XML;
+  exp TEXT;
 BEGIN
-  EXECUTE 'EXPLAIN (FORMAT XML, VERBOSE) ' || q INTO STRICT exp;
-  RETURN array_to_string(
-    xpath('//x:Node-Type/text()', exp,
-          ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]),
-    ','
-  );
+  EXECUTE 'EXPLAIN ' || q INTO exp;
+  RETURN (regexp_matches(exp, ' *(.*Scan)'))[1];
 END;
 $$;