summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/db/schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/gentoobrowse-api/db/schema.sql b/gentoobrowse-api/db/schema.sql
index f9bf489..d4bbce6 100644
--- a/gentoobrowse-api/db/schema.sql
+++ b/gentoobrowse-api/db/schema.sql
@@ -69,7 +69,7 @@ CREATE FUNCTION bugpackages(b bugs) RETURNS text[]
LANGUAGE plpgsql IMMUTABLE
AS $$
BEGIN
- RETURN ARRAY_AGG(p[1]) FROM REGEXP_MATCHES(b.summary, '([[:alnum:]-]+/[[:alnum:]_-]+?)(?:-(?:[0-9][.0-9]*[[:alpha:]]?\*?(?:(?:_(?:alpha|beta|pre|rc|p))?[[:digit:]]*)*(?:-r[[:digit:]]+)?))?', 'g') p;
+ RETURN ARRAY_AGG(p[1]) FROM REGEXP_MATCHES(b.summary, E'([[:alnum:]-]+/[[:alnum:]_-]+?)(?:-(?:[0-9][.0-9]*[[:alpha:]]?\\*?(?:(?:_(?:alpha|beta|pre|rc|p))?[[:digit:]]*)*(?:-r[[:digit:]]+)?))?', 'g') p;
END
$$;
ALTER FUNCTION gentoobrowse.bugpackages(b bugs) OWNER TO gentoo;
@@ -97,7 +97,7 @@ CREATE FUNCTION textclean(t text) RETURNS text
LANGUAGE plpgsql IMMUTABLE
AS $$
BEGIN
- RETURN TRIM(REGEXP_REPLACE(t, '\s+', ' ', 'g'));
+ RETURN TRIM(REGEXP_REPLACE(t, E'\\s+', ' ', 'g'));
END
$$;
ALTER FUNCTION gentoobrowse.textclean(t text) OWNER TO gentoo;