Re: [GENERAL] Regexp confusion

2009-10-09 Thread Tom Lane
Alvaro Herrera writes: > I think the confusion is about what SIMILAR TO supports. ? it doesn't. Actually, upon looking into SQL:2008, it seems it's supposed to support ? now, and also {m,n} style bounds. Those weren't there in SQL99 ... I've changed the similar_escape code to not escape ? and

Re: [GENERAL] Regexp confusion

2009-10-09 Thread Tom Lane
Alvaro Herrera writes: > Doug Gorley escribió: >> Trying to match some numbers, and I'm having some regexp problems. >> I've boiled it down to the following: >> >> /* (1) */ select '3.14' similar to E'^\\d+\\.\\d+$'; -- true >> /* (2) */ select '3.14' similar to E'^\\d+(\\.\\d+)$';

Re: [GENERAL] Regexp confusion

2009-10-09 Thread Alvaro Herrera
Doug Gorley escribió: > Trying to match some numbers, and I'm having some regexp problems. > I've boiled it down to the following: > > /* (1) */ select '3.14' similar to E'^\\d+\\.\\d+$'; -- true > /* (2) */ select '3.14' similar to E'^\\d+(\\.\\d+)$'; -- true > /* (3) */ select '3

[GENERAL] Regexp confusion

2009-10-09 Thread Doug Gorley
Trying to match some numbers, and I'm having some regexp problems. I've boiled it down to the following: /* (1) */ select '3.14' similar to E'^\\d+\\.\\d+$'; -- true /* (2) */ select '3.14' similar to E'^\\d+(\\.\\d+)$'; -- true /* (3) */ select '3.14' similar to E'^\\d+(\\.\\d+