[jsr-221-eg] SQL 2016 MATCH RECOGNIZE JDBC parameter Marker / Escape Characters
Douglas Surber
douglas.surber at oracle.com
Tue Oct 9 20:21:37 UTC 2018
All correct.
> On Oct 9, 2018, at 1:18 PM, Mark Rotteveel <mark at lawinegevaar.nl> wrote:
>
> On 9-10-2018 21:50, Douglas Surber wrote:
>> Mark,
>> The Oracle Database Driver uses the first interpretation, any occurrence of ‘/‘ must be doubled except for the single ‘/‘ that precedes the ‘}’ that ends the escape sequence. Your formal definition is correct modulo character sequence literals and comments.
>
> Ok, rephrasing to check if we're on the same page:
>
> Within {\..\}, occurrences of `\` must be doubled to `\\` except if contained in string literals or comments.
>
> Some examples:
>
> 1. `{\'literal with {\..\}'\}` => `'literal with {\..\}'`
> 2. `{\something -- comment with {\..\} + linebreak
> something \\ else\}`
> =>
> `something -- comment with {\..\} + linebreak
> something \ else`
> 3. `{\/*comment {\..\}*/\} => /*comment {\..\}*/
> 4. `{\q'{\abc\}'\}` => q'{\abc\}'`
> 5. `{\{\\inception\\}\}` => `{\inception\}`
>
> While `{\x \ y\}` would be a syntax error and should be `{\x \\ y\}`.
> --
> Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list