Closed a1ea321 closed 1 week ago
The regex ops are exposing a bug in the parser generator; it is not jumping to the correct pattern
I was wrong, parser generator is fine. Just-a-bug on my part.
https://github.com/klahnakoski/mo-sql-parsing/pull/251/files
@a1ea321 thanks again for this bug report. I got stumped by a dumb bug: Another NOT_REGEXP
was hiding in the keyword.py file. I am going to sort that file to better prevent that type of mistake.
This raises a
ParseException
.pip show mo-sql-parsing
says:Version: 10.652.24214
There's also the
~*
variant: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXPThese are operators so the problem is actually more generic, since it is possible to define new operators: https://www.postgresql.org/docs/current/sql-createoperator.html
For instance this works on PostgreSQL 16:
It returns
42
as expected.I don't care whether your library supports arbitrary operators because I never define any. I suppose most people will be like me. I just wanted to bring it to your attention.