From 16274839983e6418e33b23b095d3d53684f5a5d2 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Fri, 25 Oct 2024 16:55:09 +0200 Subject: [PATCH] plpgsql: fix reading of ^1, now two tokens --- impls/plpgsql/reader.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impls/plpgsql/reader.sql b/impls/plpgsql/reader.sql index 1ac54b3f10..de4ff83d81 100644 --- a/impls/plpgsql/reader.sql +++ b/impls/plpgsql/reader.sql @@ -5,7 +5,7 @@ CREATE SCHEMA reader; CREATE FUNCTION reader.tokenize(str varchar) RETURNS varchar[] AS $$ DECLARE - re varchar = E'[[:space:] ,]*(~@|[\\[\\]{}()\'`~@]|"(?:[\\\\].|[^\\\\"])*"?|;[^\n]*|[^\\s \\[\\]{}()\'"`~@,;]*)'; + re varchar = E'[[:space:] ,]*(~@|[\\[\\]{}()\'`~@^]|"(?:[\\\\].|[^\\\\"])*"?|;[^\n]*|[^\\s \\[\\]{}()\'"`~@,;^]*)'; BEGIN RETURN ARRAY(SELECT tok FROM (SELECT (regexp_matches(str, re, 'g'))[1] AS tok) AS x