HighRoad icon indicating copy to clipboard operation
HighRoad copied to clipboard

explicit_layer regex

Open sttawm opened this issue 12 years ago • 0 comments

Seems like the number regex for explicit_layer should be converted from:

1: E'^-?[[:digit:]]+(\.[[:digit:]]+)?$'

to

2: E'^-?[[:digit:]]+(\\.[[:digit:]]+)?$'.

(unless the views are somehow executed in a context that does not require escaped backslashes?)

To test:

``select (CASE WHEN f ~ E'^-?[[:digit:]]+(.[[:digit:]]+)?$' THEN CAST (f AS FLOAT) else 0 END) as ff from (select '1;3'::text as f) as foo`

and

select (CASE WHEN f ~ E'^-?[[:digit:]]+(\\.[[:digit:]]+)?$' THEN CAST (f AS FLOAT) else 0 END) as ff from (select '1;3'::text as f) as foo;

sttawm avatar Dec 04 '13 07:12 sttawm