dynamobi/dynamobi — Issue #430: [FRG-378] Regular expressions in SIMILAR TO predicates potentially dont match SQL:2008 spec in a few cases.
Author: dynamobi-build
Created: 2011-12-30 03:13:34+00:00
State: open
Labels: FRG

[reporter="sunil", created="Fri, 8 May 2009 01:46:18 -0500 (GMT-05:00)"]
Certain meta characters dont parse well while adjecent to each other.

e.g.

VALUES('y' SIMILAR TO 'x*+y'); -- returns true

VALUES('y' SIMILAR TO 'x+*y');

Error: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 2

x?*y

^ (state=,code=0)

Interestingly, VALUES('y' SIMILAR TO '(x+)*y') returns true.

This may very well be expected behavior. However, I verified on postgreSQL install, both patterns return illegal regex error. If farrago behavior is indeed SQL:2008 compliant, then we need to make sure there is elaborate section on regular expressions explaining these cases in farrago documents.