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 committed Oct 25, 2024
1 parent dc18c55 commit 53a2511
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 53a2511

Please sign in to comment.