[HACKERS] SIMILAR TO bug?

2009-02-18 Thread David Fetter
Folks, Perhaps I've misunderstood this, but in PostgreSQL 8.3.5, I get disparate results from ~ and SIMILAR TO. For example: This gives an unexpected result: davidfet...@davidfetter=# SELECT 'abc' SIMILAR TO '^[a]'; ?column? -- f (1 row) This one is what I expected.

Re: [HACKERS] SIMILAR TO bug?

2009-02-18 Thread Alvaro Herrera
David Fetter wrote: Folks, Perhaps I've misunderstood this, but in PostgreSQL 8.3.5, I get disparate results from ~ and SIMILAR TO. For example: Did you read the docs? ^ is not an anchor. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL

Re: [HACKERS] SIMILAR TO bug?

2009-02-18 Thread Peter Eisentraut
David Fetter wrote: Folks, Perhaps I've misunderstood this, but in PostgreSQL 8.3.5, I get disparate results from ~ and SIMILAR TO. For example: This gives an unexpected result: davidfet...@davidfetter=# SELECT 'abc' SIMILAR TO '^[a]'; ?column? -- f (1 row) This one is what I