Sometimes we think that certain restrictions are not documented when in fact they are. Where do we forget to look? Database Error Messages
As mentioned recently on asktom.oracle.com (thanks, Connor), all error messages and event codes are listed in $ORACLE_HOME/rdbms/mesg/oraus.msg. Searching for “pattern matching”, we read “62500 – 62549 are reserved for PATTERN MATCHING”.
So here is a link to all the MATCH_RECOGNIZE error messages: ORA-60001 to ORA-65535
As of version 19c, the range actually used is 62500 through 62521.
It was a surprise to discover that “bounded quantifiers” are limited to 200, but there it is in black and white:
“ORA-62518: MATCH_RECOGNIZE pattern is too large.”
“Permute with more than 7 elements or bounded quantifier bound greater than 200 are … currently not supported.”
I’m not suggesting we spend our lives reading database error messages, but we have to admit they are documented ;-)
P.S. Where are the values of UB2MAXVAL and UB4MAXVAL documented? If you know, please post a link in the comments below. I suspect UB2MAXVAL is 0XFFFF and UB4MAXVAL is 0XFFFFFFFF.
FOOTNOTE 2019-11-05 : thanks to Maxim Demenko for pointing out where UB*MAXVAL are documented. In the OCI Programmer’s Guide, at the very end of the chapter on Data Types, it says
“Throughout this guide there are references to data types like ub2 or sb4, or to constants like UB4MAXVAL. These types are defined in the oratypes.h header file, which is found in the public directory. The exact contents may vary according to the operating system that you are using.”