Re: [HACKERS] SIMILAR TO bug?
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 Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] SIMILAR TO bug?
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 expected. davidfet...@davidfetter=# SELECT 'abc' ~ '^[a]'; ?column? -- t (1 row) Did I misunderstand what SIMILAR TO does, or...? Well, SIMILAR TO is not the same thing as ~. For example, ^ is not a special character in its pattern language. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers