Skip to content

Commit

Permalink
plpgsql: fix reading of ^1, now two tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon authored and kanaka committed Oct 29, 2024
1 parent 1395a60 commit 1627483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impls/plpgsql/reader.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1627483

Please sign in to comment.